forked from OSchip/llvm-project
[ARM,AArch64] Define __ELF__ for arm-none-eabihf and AArch64
This macro is defined for arm-none-eabi as of r266625, but it should also be defined for eabihf and aarch64. llvm-svn: 300549
This commit is contained in:
parent
36e23ecad0
commit
233310f3e6
|
@ -5467,9 +5467,11 @@ public:
|
|||
Builder.defineMacro("__arm__");
|
||||
// For bare-metal none-eabi.
|
||||
if (getTriple().getOS() == llvm::Triple::UnknownOS &&
|
||||
getTriple().getEnvironment() == llvm::Triple::EABI)
|
||||
(getTriple().getEnvironment() == llvm::Triple::EABI ||
|
||||
getTriple().getEnvironment() == llvm::Triple::EABIHF))
|
||||
Builder.defineMacro("__ELF__");
|
||||
|
||||
|
||||
// Target properties.
|
||||
Builder.defineMacro("__REGISTER_PREFIX__", "");
|
||||
|
||||
|
@ -6118,6 +6120,11 @@ public:
|
|||
MacroBuilder &Builder) const override {
|
||||
// Target identification.
|
||||
Builder.defineMacro("__aarch64__");
|
||||
// For bare-metal none-eabi.
|
||||
if (getTriple().getOS() == llvm::Triple::UnknownOS &&
|
||||
(getTriple().getEnvironment() == llvm::Triple::EABI ||
|
||||
getTriple().getEnvironment() == llvm::Triple::EABIHF))
|
||||
Builder.defineMacro("__ELF__");
|
||||
|
||||
// Target properties.
|
||||
Builder.defineMacro("_LP64");
|
||||
|
|
|
@ -2378,6 +2378,9 @@
|
|||
// ARM-NETBSD:#define __arm__ 1
|
||||
|
||||
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=arm-none-eabi < /dev/null | FileCheck -match-full-lines -check-prefix ARM-NONE-EABI %s
|
||||
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=arm-none-eabihf < /dev/null | FileCheck -match-full-lines -check-prefix ARM-NONE-EABI %s
|
||||
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=aarch64-none-eabi < /dev/null | FileCheck -match-full-lines -check-prefix ARM-NONE-EABI %s
|
||||
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=aarch64-none-eabihf < /dev/null | FileCheck -match-full-lines -check-prefix ARM-NONE-EABI %s
|
||||
// ARM-NONE-EABI: #define __ELF__ 1
|
||||
|
||||
// No MachO targets use the full EABI, even if AAPCS is used.
|
||||
|
|
Loading…
Reference in New Issue