File tree 5 files changed +18
-2
lines changed
5 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ const OPTIONAL_COMPONENTS: &[&str] = &[
10
10
"aarch64" ,
11
11
"amdgpu" ,
12
12
"avr" ,
13
+ "loongarch" ,
13
14
"m68k" ,
14
15
"mips" ,
15
16
"powerpc" ,
Original file line number Diff line number Diff line change @@ -146,6 +146,12 @@ extern "C" void LLVMTimeTraceProfilerFinish(const char* FileName) {
146
146
#define SUBTARGET_HEXAGON
147
147
#endif
148
148
149
+ #ifdef LLVM_COMPONENT_LOONGARCH
150
+ #define SUBTARGET_LOONGARCH SUBTARGET (LoongArch)
151
+ #else
152
+ #define SUBTARGET_LOONGARCH
153
+ #endif
154
+
149
155
#define GEN_SUBTARGETS \
150
156
SUBTARGET_X86 \
151
157
SUBTARGET_ARM \
@@ -159,6 +165,7 @@ extern "C" void LLVMTimeTraceProfilerFinish(const char* FileName) {
159
165
SUBTARGET_SPARC \
160
166
SUBTARGET_HEXAGON \
161
167
SUBTARGET_RISCV \
168
+ SUBTARGET_LOONGARCH \
162
169
163
170
#define SUBTARGET (x ) \
164
171
namespace llvm { \
Original file line number Diff line number Diff line change @@ -102,6 +102,14 @@ pub fn initialize_available_targets() {
102
102
LLVMInitializeM68kAsmPrinter ,
103
103
LLVMInitializeM68kAsmParser
104
104
) ;
105
+ init_target ! (
106
+ llvm_component = "loongarch" ,
107
+ LLVMInitializeLoongArchTargetInfo ,
108
+ LLVMInitializeLoongArchTarget ,
109
+ LLVMInitializeLoongArchTargetMC ,
110
+ LLVMInitializeLoongArchAsmPrinter ,
111
+ LLVMInitializeLoongArchAsmParser
112
+ ) ;
105
113
init_target ! (
106
114
llvm_component = "mips" ,
107
115
LLVMInitializeMipsTargetInfo ,
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ changelog-seen = 2
88
88
# the resulting rustc being unable to compile for the disabled architectures.
89
89
#
90
90
# To add support for new targets, see https://rustc-dev-guide.rust-lang.org/building/new-target.html.
91
- # targets = "AArch64;ARM;BPF;Hexagon;MSP430;Mips;NVPTX;PowerPC;RISCV;Sparc;SystemZ;WebAssembly;X86"
91
+ # targets = "AArch64;ARM;BPF;Hexagon;LoongArch; MSP430;Mips;NVPTX;PowerPC;RISCV;Sparc;SystemZ;WebAssembly;X86"
92
92
93
93
# LLVM experimental targets to build support for. These targets are specified in
94
94
# the same format as above, but since these targets are experimental, they are
Original file line number Diff line number Diff line change @@ -291,7 +291,7 @@ impl Step for Llvm {
291
291
let llvm_targets = match & builder. config . llvm_targets {
292
292
Some ( s) => s,
293
293
None => {
294
- "AArch64;ARM;BPF;Hexagon;MSP430;Mips;NVPTX;PowerPC;RISCV;\
294
+ "AArch64;ARM;BPF;Hexagon;LoongArch; MSP430;Mips;NVPTX;PowerPC;RISCV;\
295
295
Sparc;SystemZ;WebAssembly;X86"
296
296
}
297
297
} ;
You can’t perform that action at this time.
0 commit comments