apple_support icon indicating copy to clipboard operation
apple_support copied to clipboard

`-no_warn_duplicate_libraries` flag isn't recognized by ldd when overriding the linker

Open cerisier opened this issue 1 year ago • 2 comments

When using lld as the linker using rules_apple_linker, linking fails with the following error:

unknown argument: -no_warn_duplicate_libraries

Happy to provide a patch wherever feels best, even if this means submitting a patch to llvm

cerisier avatar Mar 22 '24 15:03 cerisier

quick workaround is to pass --features=-no_warn_duplicate_libraries

keith avatar Mar 22 '24 16:03 keith

here's the upstream lld flag: https://github.com/llvm/llvm-project/pull/86303

note that as of xcode 15 the perf differences with lld decreased a lot, if that was the primary reason you were using it you might want to re-test on your project

keith avatar Mar 22 '24 16:03 keith

Just seeing the reply, sorry about that... Closing the issue since the llvm PR is merged.

As for why we use lld, I haven't had time to dig properly why exactly but that's the only way for us to get DWARF info from rust static libraries in the dSYM for debug builds and therefore have Rust breakpoints working in Xcode (Works fine for release builds but not for debug builds for some reason...)

cerisier avatar May 08 '24 01:05 cerisier