Support cross-compiling (untested)

This commit is contained in:
bjorn3 2018-08-18 16:36:47 +02:00
parent 69834cafd3
commit 72f48776a1

View File

@ -215,7 +215,7 @@ impl CodegenBackend for CraneliftCodegenBackend {
let mut flags_builder = settings::builder(); let mut flags_builder = settings::builder();
flags_builder.enable("is_pic").unwrap(); flags_builder.enable("is_pic").unwrap();
let flags = settings::Flags::new(flags_builder); let flags = settings::Flags::new(flags_builder);
let isa = cranelift::codegen::isa::lookup(target_lexicon::Triple::host()) let isa = cranelift::codegen::isa::lookup(tcx.sess.target.target.llvm_target.parse().unwrap())
.unwrap() .unwrap()
.finish(flags); .finish(flags);