about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper
diff options
context:
space:
mode:
authorScott Mabin <scott@mabez.dev>2020-09-12 23:20:14 +0100
committerScott Mabin <scott@mabez.dev>2024-05-29 13:47:57 +0100
commitb37a448616a370ba02eeaa7d7c8289fa85d35fc9 (patch)
tree9b2acc446ad25e241b6796718ead39b5ab3e7f87 /compiler/rustc_llvm/llvm-wrapper
parentc72fcfbc40a57f88de1a64a2bc69f85e2844b77e (diff)
downloadrust-b37a448616a370ba02eeaa7d7c8289fa85d35fc9.tar.gz
rust-b37a448616a370ba02eeaa7d7c8289fa85d35fc9.zip
Teach rustc about the Xtensa arch.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
index 3fcf3aca8af..a027ddcc150 100644
--- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
@@ -155,6 +155,12 @@ extern "C" void LLVMRustTimeTraceProfilerFinish(const char* FileName) {
 #define SUBTARGET_SPARC
 #endif
 
+#ifdef LLVM_COMPONENT_XTENSA
+#define SUBTARGET_XTENSA SUBTARGET(XTENSA)
+#else
+#define SUBTARGET_XTENSA
+#endif
+
 #ifdef LLVM_COMPONENT_HEXAGON
 #define SUBTARGET_HEXAGON SUBTARGET(Hexagon)
 #else
@@ -180,6 +186,7 @@ extern "C" void LLVMRustTimeTraceProfilerFinish(const char* FileName) {
   SUBTARGET_MSP430                                                             \
   SUBTARGET_SPARC                                                              \
   SUBTARGET_HEXAGON                                                            \
+  SUBTARGET_XTENSA                                                             \
   SUBTARGET_RISCV                                                              \
   SUBTARGET_LOONGARCH                                                          \