Add wrappers to dist/bin/ too in addition to dist/
Rust's build system since recently expects rustc to be in a bin/ directory if it is specified using the rustc option in config.toml.
This commit is contained in:
parent
746008e791
commit
98ddd69aae
5 changed files with 19 additions and 6 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue