1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00

chore(cli): Disallow cross compiling for snapshots (#13976)

This commit is contained in:
Divy Srivastava 2022-03-16 19:17:15 +05:30 committed by GitHub
parent 7044bf523b
commit 89a41d0a67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -326,6 +326,12 @@ fn main() {
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:
// op_fetch_asset::trace_serializer();
@ -339,7 +345,7 @@ fn main() {
println!("cargo:rustc-env=TS_VERSION={}", 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());
let c = PathBuf::from(env::var_os("CARGO_MANIFEST_DIR").unwrap());