about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src/bin
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2020-11-03 11:00:04 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2020-11-03 11:00:04 +0100
commit216c4ae46352330bc7962f132fe226a7e73ab8fa (patch)
treec1d7af49fa1f27f325f090cff3f2d8861972fec9 /compiler/rustc_codegen_cranelift/src/bin
parenta6403b0f04b58a35cb9f3e544b2847ee09bcf3a4 (diff)
parent03f01bbe901d60b71cf2c5ec766aef5e532ab79d (diff)
downloadrust-216c4ae46352330bc7962f132fe226a7e73ab8fa.tar.gz
rust-216c4ae46352330bc7962f132fe226a7e73ab8fa.zip
Merge commit '03f01bbe901d60b71cf2c5ec766aef5e532ab79d' into update_cg_clif-2020-11-01
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/bin')
-rw-r--r--compiler/rustc_codegen_cranelift/src/bin/cg_clif.rs20
-rw-r--r--compiler/rustc_codegen_cranelift/src/bin/cg_clif_build_sysroot.rs3
2 files changed, 7 insertions, 16 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/bin/cg_clif.rs b/compiler/rustc_codegen_cranelift/src/bin/cg_clif.rs
index 590c9ef0ce1..71ef4d22673 100644
--- a/compiler/rustc_codegen_cranelift/src/bin/cg_clif.rs
+++ b/compiler/rustc_codegen_cranelift/src/bin/cg_clif.rs
@@ -24,22 +24,16 @@ impl rustc_driver::Callbacks for CraneliftPassesCallbacks {
         self.time_passes = config.opts.prints.is_empty()
             && (config.opts.debugging_opts.time_passes || config.opts.debugging_opts.time);
 
-        // FIXME workaround for an ICE
-        config.opts.debugging_opts.trim_diagnostic_paths = false;
-
         config.opts.cg.panic = Some(PanicStrategy::Abort);
         config.opts.debugging_opts.panic_abort_tests = true;
         config.opts.maybe_sysroot = Some(
-            std::env::current_exe()
-                .unwrap()
-                .parent()
-                .unwrap()
-                .parent()
-                .unwrap()
-                .parent()
-                .unwrap()
-                .join("build_sysroot")
-                .join("sysroot"),
+            config.opts.maybe_sysroot.clone().unwrap_or(
+                std::env::current_exe()
+                    .unwrap()
+                    .parent()
+                    .unwrap()
+                    .join("sysroot"),
+            ),
         );
     }
 }
diff --git a/compiler/rustc_codegen_cranelift/src/bin/cg_clif_build_sysroot.rs b/compiler/rustc_codegen_cranelift/src/bin/cg_clif_build_sysroot.rs
index c207d98d6c1..165d33dcfb5 100644
--- a/compiler/rustc_codegen_cranelift/src/bin/cg_clif_build_sysroot.rs
+++ b/compiler/rustc_codegen_cranelift/src/bin/cg_clif_build_sysroot.rs
@@ -44,9 +44,6 @@ impl rustc_driver::Callbacks for CraneliftPassesCallbacks {
             return;
         }
 
-        // FIXME workaround for an ICE
-        config.opts.debugging_opts.trim_diagnostic_paths = false;
-
         config.opts.cg.panic = Some(PanicStrategy::Abort);
         config.opts.debugging_opts.panic_abort_tests = true;
         config.opts.maybe_sysroot = Some(