mirror of
https://github.com/denoland/deno.git
synced 2025-01-03 12:58:54 -05:00
chore(cli): Disallow cross compiling for snapshots (#13976)
This commit is contained in:
parent
7044bf523b
commit
89a41d0a67
1 changed files with 7 additions and 1 deletions
|
@ -326,6 +326,12 @@ fn main() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Host snapshots won't work when cross compiling.
|
||||||
|
let target = env::var("TARGET").unwrap();
|
||||||
|
let host = env::var("HOST").unwrap();
|
||||||
|
if target != host {
|
||||||
|
panic!("Cross compiling with snapshot is not supported.");
|
||||||
|
}
|
||||||
// To debug snapshot issues uncomment:
|
// To debug snapshot issues uncomment:
|
||||||
// op_fetch_asset::trace_serializer();
|
// op_fetch_asset::trace_serializer();
|
||||||
|
|
||||||
|
@ -339,7 +345,7 @@ fn main() {
|
||||||
println!("cargo:rustc-env=TS_VERSION={}", ts_version());
|
println!("cargo:rustc-env=TS_VERSION={}", ts_version());
|
||||||
println!("cargo:rerun-if-env-changed=TS_VERSION");
|
println!("cargo:rerun-if-env-changed=TS_VERSION");
|
||||||
|
|
||||||
println!("cargo:rustc-env=TARGET={}", env::var("TARGET").unwrap());
|
println!("cargo:rustc-env=TARGET={}", target);
|
||||||
println!("cargo:rustc-env=PROFILE={}", env::var("PROFILE").unwrap());
|
println!("cargo:rustc-env=PROFILE={}", env::var("PROFILE").unwrap());
|
||||||
|
|
||||||
let c = PathBuf::from(env::var_os("CARGO_MANIFEST_DIR").unwrap());
|
let c = PathBuf::from(env::var_os("CARGO_MANIFEST_DIR").unwrap());
|
||||||
|
|
Loading…
Reference in a new issue