All supported LLVM versions have MSP430AsmPrinter
This commit is contained in:
parent
7d872f538e
commit
b97a33b1cb
@ -88,16 +88,6 @@ fn main() {
|
||||
"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 = &[
|
||||
"ipo",
|
||||
"bitreader",
|
||||
@ -123,10 +113,6 @@ 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");
|
||||
|
@ -125,10 +125,7 @@ fn init() { }
|
||||
LLVMInitializeMSP430TargetInfo,
|
||||
LLVMInitializeMSP430Target,
|
||||
LLVMInitializeMSP430TargetMC,
|
||||
LLVMInitializeMSP430AsmPrinter
|
||||
);
|
||||
init_target!(
|
||||
all(llvm_component = "msp430", llvm_has_msp430_asm_parser),
|
||||
LLVMInitializeMSP430AsmPrinter,
|
||||
LLVMInitializeMSP430AsmParser
|
||||
);
|
||||
init_target!(
|
||||
|
Loading…
Reference in New Issue
Block a user