]> git.lizzy.rs Git - rust.git/blobdiff - build_system/abi_checker.rs
Let abi-checker take the full path to the cg_clif dylib
[rust.git] / build_system / abi_checker.rs
index 67dbd0a38a4fb4d44d0579e907bbc1a4c6bc9de0..faff081745f8e00d712c59f148d86fda2706f5b8 100644 (file)
@@ -10,7 +10,7 @@ pub(crate) fn run(
     channel: &str,
     sysroot_kind: SysrootKind,
     target_dir: &Path,
-    cg_clif_build_dir: &Path,
+    cg_clif_dylib: &Path,
     host_triple: &str,
     target_triple: &str,
 ) {
@@ -29,7 +29,7 @@ pub(crate) fn run(
         channel,
         sysroot_kind,
         target_dir,
-        cg_clif_build_dir,
+        cg_clif_dylib,
         host_triple,
         target_triple,
     );
@@ -39,11 +39,6 @@ pub(crate) fn run(
     abi_checker_path.push("abi-checker");
     env::set_current_dir(abi_checker_path.clone()).unwrap();
 
-    let build_dir = abi_checker_path.parent().unwrap().join("build");
-    let cg_clif_dylib_path = build_dir.join(if cfg!(windows) { "bin" } else { "lib" }).join(
-        env::consts::DLL_PREFIX.to_string() + "rustc_codegen_cranelift" + env::consts::DLL_SUFFIX,
-    );
-
     let pairs = ["rustc_calls_cgclif", "cgclif_calls_rustc", "cgclif_calls_cc", "cc_calls_cgclif"];
 
     let mut cmd = Command::new("cargo");
@@ -54,7 +49,7 @@ pub(crate) fn run(
     cmd.arg("--pairs");
     cmd.args(pairs);
     cmd.arg("--add-rustc-codegen-backend");
-    cmd.arg(format!("cgclif:{}", cg_clif_dylib_path.display()));
+    cmd.arg(format!("cgclif:{}", cg_clif_dylib.display()));
 
     spawn_and_wait(cmd);
 }