mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-27 11:55:49 +00:00
[libc] Only use __has_builtin on clang
The preprocessor reads the whole line even if the first condition of an and is false so this broke when compiling on older gcc versions which don't recognize `__has_builtin`
This commit is contained in:
parent
81f173ed0e
commit
6a4f8423ae
@ -14,8 +14,10 @@
|
||||
|
||||
// __builtin_memcpy_inline guarantees to never call external functions.
|
||||
// Unfortunately it is not widely available.
|
||||
#if defined(__clang__) && __has_builtin(__builtin_memcpy_inline)
|
||||
#ifdef __clang__
|
||||
#if __has_builtin(__builtin_memcpy_inline)
|
||||
#define USE_BUILTIN_MEMCPY_INLINE
|
||||
#endif
|
||||
#elif defined(__GNUC__)
|
||||
#define USE_BUILTIN_MEMCPY
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user