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>2021-03-05 19:12:59 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2021-03-05 19:12:59 +0100
commit7a6ea77473949c9a74712c09e7a2654e0ba8258b (patch)
treeadbb6c4264e9bd3e28f196a5e66664a22c6c1ea7 /compiler/rustc_codegen_cranelift/src/bin
parent8fd946c63a6c3aae9788bd459d278cb2efa77099 (diff)
parent9a0c32934ebe376128230aa8da3275697b2053e7 (diff)
Merge commit '9a0c32934ebe376128230aa8da3275697b2053e7' into sync_cg_clif-2021-03-05
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/bin')
-rw-r--r--compiler/rustc_codegen_cranelift/src/bin/cg_clif.rs8
-rw-r--r--compiler/rustc_codegen_cranelift/src/bin/cg_clif_build_sysroot.rs11
2 files changed, 3 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 be369b07fdd..983839d48d2 100644
--- a/compiler/rustc_codegen_cranelift/src/bin/cg_clif.rs
+++ b/compiler/rustc_codegen_cranelift/src/bin/cg_clif.rs
@@ -27,13 +27,7 @@ impl rustc_driver::Callbacks for CraneliftPassesCallbacks {
         config.opts.cg.panic = Some(PanicStrategy::Abort);
         config.opts.debugging_opts.panic_abort_tests = true;
         config.opts.maybe_sysroot = Some(config.opts.maybe_sysroot.clone().unwrap_or_else(|| {
-            std::env::current_exe()
-                .unwrap()
-                .parent()
-                .unwrap()
-                .parent()
-                .unwrap()
-                .to_owned()
+            std::env::current_exe().unwrap().parent().unwrap().parent().unwrap().to_owned()
         }));
     }
 }
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 83e5dc6e672..e7cd5edbbf6 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
@@ -46,15 +46,8 @@ impl rustc_driver::Callbacks for CraneliftPassesCallbacks {
 
         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()
-                .to_owned(),
-        );
+        config.opts.maybe_sysroot =
+            Some(std::env::current_exe().unwrap().parent().unwrap().parent().unwrap().to_owned());
     }
 }