This symbol is defined in avr-gcc. Because AVR normally uses the ELF
format, define the symbol unconditionally.
This patch is needed to get Clang to compile compiler-rt.
Differential Revision: https://reviews.llvm.org/D78117
Builder.defineMacro("AVR");
Builder.defineMacro("__AVR");
Builder.defineMacro("__AVR__");
+ Builder.defineMacro("__ELF__");
if (!this->CPU.empty()) {
auto It = llvm::find_if(
// CHECK: #define __AVR 1
// CHECK: #define __AVR_ATmega328P__ 1
// CHECK: #define __AVR__ 1
+// CHECK: #define __ELF__ 1
// CHECK: #define __AVR 1
// CHECK: #define __AVR_ATtiny104__ 1
// CHECK: #define __AVR__ 1
+// CHECK: #define __ELF__ 1
// CHECK: #define AVR 1
// CHECK: #define __AVR 1
// CHECK: #define __AVR__ 1
+// CHECK: #define __ELF__ 1