All supported LLVM versions have MSP430AsmPrinter
This commit is contained in:
parent
7d872f538e
commit
b97a33b1cb
2 changed files with 1 additions and 18 deletions
|
@ -88,16 +88,6 @@ fn main() {
|
||||||
"riscv",
|
"riscv",
|
||||||
];
|
];
|
||||||
|
|
||||||
let mut version_cmd = Command::new(&llvm_config);
|
|
||||||
version_cmd.arg("--version");
|
|
||||||
let version_output = output(&mut version_cmd);
|
|
||||||
let mut parts = version_output.split('.').take(2).filter_map(|s| s.parse::<u32>().ok());
|
|
||||||
let (major, _minor) = if let (Some(major), Some(minor)) = (parts.next(), parts.next()) {
|
|
||||||
(major, minor)
|
|
||||||
} else {
|
|
||||||
(8, 0)
|
|
||||||
};
|
|
||||||
|
|
||||||
let required_components = &[
|
let required_components = &[
|
||||||
"ipo",
|
"ipo",
|
||||||
"bitreader",
|
"bitreader",
|
||||||
|
@ -123,10 +113,6 @@ fn main() {
|
||||||
println!("cargo:rustc-cfg=llvm_component=\"{}\"", component);
|
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
|
// Link in our own LLVM shims, compiled with the same flags as LLVM
|
||||||
let mut cmd = Command::new(&llvm_config);
|
let mut cmd = Command::new(&llvm_config);
|
||||||
cmd.arg("--cxxflags");
|
cmd.arg("--cxxflags");
|
||||||
|
|
|
@ -125,10 +125,7 @@ pub fn initialize_available_targets() {
|
||||||
LLVMInitializeMSP430TargetInfo,
|
LLVMInitializeMSP430TargetInfo,
|
||||||
LLVMInitializeMSP430Target,
|
LLVMInitializeMSP430Target,
|
||||||
LLVMInitializeMSP430TargetMC,
|
LLVMInitializeMSP430TargetMC,
|
||||||
LLVMInitializeMSP430AsmPrinter
|
LLVMInitializeMSP430AsmPrinter,
|
||||||
);
|
|
||||||
init_target!(
|
|
||||||
all(llvm_component = "msp430", llvm_has_msp430_asm_parser),
|
|
||||||
LLVMInitializeMSP430AsmParser
|
LLVMInitializeMSP430AsmParser
|
||||||
);
|
);
|
||||||
init_target!(
|
init_target!(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue