diff options
author | Markus Böck <markus.boeck02@gmail.com> | 2023-07-21 07:43:43 +0200 |
---|---|---|
committer | Markus Böck <markus.boeck02@gmail.com> | 2023-07-21 08:03:26 +0200 |
commit | 822c31a0fe827a6f33601ad6b44eb2818350da36 (patch) | |
tree | 14d2c3fc470c3086f4b4d4502886d61860206ab0 /clang/lib/Lex/ModuleMap.cpp | |
parent | f117bbca041c9b0c59002835d939e1bc9e76cf39 (diff) | |
download | llvm-822c31a0fe827a6f33601ad6b44eb2818350da36.zip llvm-822c31a0fe827a6f33601ad6b44eb2818350da36.tar.gz llvm-822c31a0fe827a6f33601ad6b44eb2818350da36.tar.bz2 |
[llvm-exegesis] Guard `__builtin_thread_pointer` behind a configure check
Due to arguably a bug in GCC[0], using `__has_builtin` is not sufficient to check whether `__builtin_thread_pointer` can actually be compiled by GCC. This makes it impossible to compile LLVM with `llvm-exegesis` enabled with e.g. GCC 10 as it does have the builtin, but no implementation for architectures such as x86.
This patch works around this issue by making it a cmake configure check whether the builtin can be compiled and used, rather than relying on the broken preprocessor macro.
[0] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96952, demonstration: https://godbolt.org/z/9z5nWM6Ef
Differential Revision: https://reviews.llvm.org/D155828
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
0 files changed, 0 insertions, 0 deletions