Skip to content

Commit 71717b9

Browse files
committed
Initialize the MSP430 AsmParser if available
1 parent 3ebca72 commit 71717b9

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/librustc_llvm/build.rs

+4
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ fn main() {
119119
println!("cargo:rustc-cfg=llvm_component=\"{}\"", component);
120120
}
121121

122+
if major >= 9 {
123+
println!("cargo:rustc-cfg=llvm_has_msp430_asm_parser");
124+
}
125+
122126
// Link in our own LLVM shims, compiled with the same flags as LLVM
123127
let mut cmd = Command::new(&llvm_config);
124128
cmd.arg("--cxxflags");

src/librustc_llvm/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ pub fn initialize_available_targets() {
7676
LLVMInitializeMSP430Target,
7777
LLVMInitializeMSP430TargetMC,
7878
LLVMInitializeMSP430AsmPrinter);
79+
init_target!(all(llvm_component = "msp430", llvm_has_msp430_asm_parser),
80+
LLVMInitializeMSP430AsmParser);
7981
init_target!(llvm_component = "riscv",
8082
LLVMInitializeRISCVTargetInfo,
8183
LLVMInitializeRISCVTarget,

0 commit comments

Comments
 (0)