From eaa329e76e72da518a1b185a804f6bb5d41b7ff4 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Mon, 19 Jul 2021 20:17:40 +1000 Subject: [PATCH] [ORC-RT] Handle missing __has_builtin operator. For compilers that do not support __has_builtin just return '0'. This should fix the bot failure at https://lab.llvm.org/buildbot/#/builders/165/builds/3761. --- compiler-rt/lib/orc/compiler.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler-rt/lib/orc/compiler.h b/compiler-rt/lib/orc/compiler.h index fcc4f2011adb..a262fb48bda8 100644 --- a/compiler-rt/lib/orc/compiler.h +++ b/compiler-rt/lib/orc/compiler.h @@ -18,6 +18,10 @@ #define ORC_RT_INTERFACE extern "C" __attribute__((visibility("default"))) #define ORC_RT_HIDDEN __attribute__((visibility("hidden"))) +#ifndef __has_builtin +# define __has_builtin(x) 0 +#endif + // Only use __has_cpp_attribute in C++ mode. GCC defines __has_cpp_attribute in // C mode, but the :: in __has_cpp_attribute(scoped::attribute) is invalid. #ifndef ORC_RT_HAS_CPP_ATTRIBUTE