llvm-dune icon indicating copy to clipboard operation
llvm-dune copied to clipboard

ocamlmklib can be passed unknown flags

Open jberdine opened this issue 2 years ago • 0 comments

The setup.sh script uses llvm-config --ldflags to populate the c_library_flags fields of the generated dune files. These flags then make their way eventually to ocamlmklib.

It is a minor point, but llvm-config --ldflags can include flags such as -Wl,-search_paths_first -Wl,-headerpad_max_install_names which ocamlmklib complains about:

  ocamlmklib llvm-dune/src/linker/shared/dllllvm_linker_shared_stubs.so,llvm-dune/src/linker/shared/libllvm_linker_shared_stubs.a [debug]
Unknown option -Wl,-search_paths_first
Unknown option -Wl,-headerpad_max_install_names

Should the result of llvm-config --ldflags be filtered to keep only the flags that ocamlmklib understands?

jberdine avatar Aug 09 '21 14:08 jberdine