[llvm] [CMake] Fix __builtin_thread_pointer check with LTO (PR #70968)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 4 16:24:11 PDT 2023


MaskRay wrote:

> With LTO, gcc's IPA passes might drop the foo() function and then the test will pass even on platforms where __builtin_thread_pointer is unavailable.

Interesting. `powerpc64le-linux-gnu-gcc -O2 -flto a.cc` incorrectly passes in the absence of `used`. `used` makes the command fail as expected.

Suggest: add something like `powerpc64le-linux-gnu-gcc -O2 -flto a.cc` to the description.

https://github.com/llvm/llvm-project/pull/70968


More information about the llvm-commits mailing list