Skip to content

Commit

Permalink
Initialize the MSP430 AsmParser if available
Browse files Browse the repository at this point in the history
  • Loading branch information
nikic committed Jul 23, 2019
1 parent 3ebca72 commit 71717b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/librustc_llvm/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ fn main() {
println!("cargo:rustc-cfg=llvm_component=\"{}\"", component);
}

if major >= 9 {
println!("cargo:rustc-cfg=llvm_has_msp430_asm_parser");
}

// Link in our own LLVM shims, compiled with the same flags as LLVM
let mut cmd = Command::new(&llvm_config);
cmd.arg("--cxxflags");
Expand Down
2 changes: 2 additions & 0 deletions src/librustc_llvm/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ pub fn initialize_available_targets() {
LLVMInitializeMSP430Target,
LLVMInitializeMSP430TargetMC,
LLVMInitializeMSP430AsmPrinter);
init_target!(all(llvm_component = "msp430", llvm_has_msp430_asm_parser),
LLVMInitializeMSP430AsmParser);
init_target!(llvm_component = "riscv",
LLVMInitializeRISCVTargetInfo,
LLVMInitializeRISCVTarget,
Expand Down

0 comments on commit 71717b9

Please sign in to comment.