Skip to content

Commit

Permalink
Rollup merge of rust-lang#62907 - nikic:msp430-asmparser, r=alexcrichton
Browse files Browse the repository at this point in the history
Initialize the MSP430 AsmParser

Hopefully fixes rust-lang#59077.

r? @alexcrichton
  • Loading branch information
Centril committed Jul 25, 2019
2 parents 5765a2b + 71717b9 commit 7273fa2
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 @@ -112,6 +112,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 7273fa2

Please sign in to comment.