llvm-dune
llvm-dune copied to clipboard
ocamlmklib can be passed unknown flags
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?