Skip to content

Commit b37a448

Browse files
committed
Teach rustc about the Xtensa arch.
1 parent c72fcfb commit b37a448

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

compiler/rustc_llvm/build.rs

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const OPTIONAL_COMPONENTS: &[&str] = &[
2323
"nvptx",
2424
"hexagon",
2525
"riscv",
26+
"xtensa",
2627
"bpf",
2728
];
2829

compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,12 @@ extern "C" void LLVMRustTimeTraceProfilerFinish(const char* FileName) {
155155
#define SUBTARGET_SPARC
156156
#endif
157157

158+
#ifdef LLVM_COMPONENT_XTENSA
159+
#define SUBTARGET_XTENSA SUBTARGET(XTENSA)
160+
#else
161+
#define SUBTARGET_XTENSA
162+
#endif
163+
158164
#ifdef LLVM_COMPONENT_HEXAGON
159165
#define SUBTARGET_HEXAGON SUBTARGET(Hexagon)
160166
#else
@@ -180,6 +186,7 @@ extern "C" void LLVMRustTimeTraceProfilerFinish(const char* FileName) {
180186
SUBTARGET_MSP430 \
181187
SUBTARGET_SPARC \
182188
SUBTARGET_HEXAGON \
189+
SUBTARGET_XTENSA \
183190
SUBTARGET_RISCV \
184191
SUBTARGET_LOONGARCH \
185192

0 commit comments

Comments
 (0)