mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-07 00:23:43 +00:00
[Hexagon] Enable linux #defines
Enable standard linux defines when the triple is Linux and the environment is musl. Differential Revision: https://reviews.llvm.org/D76310
This commit is contained in:
parent
0cc2d23751
commit
430c9a80c1
@ -117,6 +117,9 @@ TargetInfo *AllocateTarget(const llvm::Triple &Triple,
|
||||
return new XCoreTargetInfo(Triple, Opts);
|
||||
|
||||
case llvm::Triple::hexagon:
|
||||
if (os == llvm::Triple::Linux &&
|
||||
Triple.getEnvironment() == llvm::Triple::Musl)
|
||||
return new LinuxTargetInfo<HexagonTargetInfo>(Triple, Opts);
|
||||
return new HexagonTargetInfo(Triple, Opts);
|
||||
|
||||
case llvm::Triple::lanai:
|
||||
|
@ -101,3 +101,15 @@
|
||||
// RUN: -target-feature +hvxv67 -target-feature +hvx-length128b %s | FileCheck \
|
||||
// RUN: %s -check-prefix CHECK-ELF
|
||||
// CHECK-ELF: #define __ELF__ 1
|
||||
|
||||
// RUN: %clang_cc1 -E -dM -triple hexagon-unknown-linux-musl \
|
||||
// RUN: -target-cpu hexagonv67 -target-feature +hvxv67 \
|
||||
// RUN: -target-feature +hvx-length128b %s | FileCheck \
|
||||
// RUN: %s -check-prefix CHECK-LINUX
|
||||
// CHECK-LINUX: #define __gnu_linux__ 1
|
||||
// CHECK-LINUX: #define __linux 1
|
||||
// CHECK-LINUX: #define __linux__ 1
|
||||
// CHECK-LINUX: #define __unix 1
|
||||
// CHECK-LINUX: #define __unix__ 1
|
||||
// CHECK-LINUX: #define linux 1
|
||||
// CHECK-LINUX: #define unix 1
|
||||
|
Loading…
Reference in New Issue
Block a user