Skip to content

Commit 127e804

Browse files
committed
Another attempt to fix MacOS: remove RTLD_DEEPBIND from dlopen
1 parent e167b05 commit 127e804

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

arrayjit/lib/cc_backend.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ let c_compile_and_load ~f_name =
114114
while not @@ (Stdlib.Sys.file_exists libname && Stdlib.Sys.file_exists log_fname) do
115115
()
116116
done;
117-
let result = { lib = Dl.dlopen ~filename:libname ~flags:[ RTLD_NOW; RTLD_DEEPBIND ]; libname } in
117+
(* Note: RTLD_DEEPBIND not available on MacOS. *)
118+
let result = { lib = Dl.dlopen ~filename:libname ~flags:[ RTLD_NOW ]; libname } in
118119
Stdlib.Gc.finalise (fun lib -> Dl.dlclose ~handle:lib.lib) result;
119120
result
120121

test/dune

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
; A non-crash run counts as a success for moons_demo_parallel_run.
12
(test
23
(name moons_demo_parallel_run)
34
(package neural_nets_lib)

0 commit comments

Comments
 (0)