[PATCH] D135402: [LLD] Enable --no-undefined-version by default.

Joseph Huber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 13 15:32:50 PDT 2022


jhuber6 added a comment.

In D135402#3857064 <https://reviews.llvm.org/D135402#3857064>, @danalbert wrote:

>> What would you suggest for solving [differing exported symbols between debug and release builds]?
>
> Two version scripts. In Android we have similar issues, especially in places like libc that differ from ABI to ABI, and we solve this by preprocessing the version script before giving it to the linker.

I was considering if preprocessing the version script was a possibility given the `#if` usage, basically feeding it through the compiler's preprocessor, but I wasn't sure if there was an easy way to achieve that via CMake.

>> Also, I mentioned previously in this thread the errors I was getting with the lto version script. Do you happen to know why these aren't defined?
>
> tbh that sounds like a bug. If you're expecting symbols to be public and LTO is making that not the case (DCE?), the expected ABI is not being fulfilled. Or maybe those weren't meant to be public anyway so it doesn't actually matter and they should just be removed.

It seems like they were put there deliberately from the commit history, but it may be out of date following some other changes. It was a bizarre failure that went away if I did a completely clean build but showed up again whenever I did a pull & build so I was unsure what the issue was.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135402/new/

https://reviews.llvm.org/D135402



More information about the llvm-commits mailing list