1
Fork 0

Merge commit 'dec0daa8f6' into sync_cg_clif-2023-03-15

This commit is contained in:
bjorn3 2023-03-15 14:41:48 +00:00
commit fce629d2e9
52 changed files with 873 additions and 792 deletions

View file

@ -2,11 +2,14 @@ use std::env;
use std::ffi::OsString;
#[cfg(unix)]
use std::os::unix::process::CommandExt;
use std::path::PathBuf;
use std::process::Command;
fn main() {
let sysroot = PathBuf::from(env::current_exe().unwrap().parent().unwrap());
let current_exe = env::current_exe().unwrap();
let mut sysroot = current_exe.parent().unwrap();
if sysroot.file_name().unwrap().to_str().unwrap() == "bin" {
sysroot = sysroot.parent().unwrap();
}
let cg_clif_dylib_path = sysroot.join(if cfg!(windows) { "bin" } else { "lib" }).join(
env::consts::DLL_PREFIX.to_string() + "rustc_codegen_cranelift" + env::consts::DLL_SUFFIX,