Issue 144732
Summary [OCaml] Getting "duplicate libraries" warning from linker
Labels new issue
Assignees
Reporter ColMcp
    _Bindings version_: llvm.19-shared
_OCaml version_: 5.3
_OS_: macOS Sequoia 15.5 on M4 iMac

### Minor annoyance
Dune builds of an executable which references more than one of the libraries in the llvm package get a warning:
`ld: warning: ignoring duplicate libraries: '-lLLVM-19', '-lc++', '-lm', '-lz', '-lzstd'`. The executable runs OK.

I’ve looked at dune’s log file and at some tracing from the `ocamlopt.opt` command dune invokes to link my executable. From the latter I can see that for each library from the llvm bindings package that my executable references `ocamlopt.opt` emits a `-l` argument for the appropriate library plus five others: `-lLLVM-19 -lc++ -lm -lz -lzstd`. The macOS build tool (`clang`) generates the warning I see about these duplicate libraries.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to