Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bazel/luajit.BUILD] Reinstate "-u" linker flag with external unwinder.
The flag is needed when the gold linker is used on Linux. (The LLD linker on Linux and macOS does not need it, nor does the LD64 linker on macOS.) The gold linker otherwise incorrectly removes this symbol when called with --gc-sections; it does not seem to recognize that the symbol is used as the personality routine in an eh_frame CIE entry. We are careful to not set this symbol as undefined when it is actually never defined, i.e. when using the internal unwinder, so as not to introduce undefined symbols into the final binary. (ELF linkers seem to ignore such undefined symbols if they are never referenced, but macOS's LD64 fails with "Undefined symbols" if it is not also called with "-undefined dynamic_lookup".
- Loading branch information