From dbeca5090148289480039b8700a4ceb61243151b Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Sun, 22 Sep 2019 16:05:22 +0200 Subject: [PATCH] Misc cleanup --- src/lib.rs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 34e60dbd8c59..94fc7156af01 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -225,7 +225,7 @@ impl CodegenBackend for CraneliftCodegenBackend { .downcast::() .expect("Expected CraneliftCodegenBackend's CodegenResult, found Box"); - let target_cpu = ::target_lexicon::HOST.to_string(); + let target_cpu = target_triple(sess).to_string(); link_binary::>( sess, &codegen_results, @@ -239,14 +239,7 @@ impl CodegenBackend for CraneliftCodegenBackend { } fn target_triple(sess: &Session) -> target_lexicon::Triple { - let mut target = &*sess.target.target.llvm_target; - - // FIXME add support for x86_64-apple-macosx10.7.0 to target-lexicon - if target.starts_with("x86_64-apple-macosx") { - target = "x86_64-apple-darwin"; - } - - target.parse().unwrap() + sess.target.target.llvm_target.parse().unwrap() } fn build_isa(sess: &Session, enable_pic: bool) -> Box { @@ -269,9 +262,6 @@ fn build_isa(sess: &Session, enable_pic: bool) -> Box