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

build: add an environment variable to skip cross build check (#20281) (#20533)

This commit is contained in:
第二扩展 2023-09-18 00:06:51 +08:00 committed by GitHub
parent 4960b6659c
commit 23bf05cff2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -437,7 +437,9 @@ fn main() {
// Host snapshots won't work when cross compiling.
let target = env::var("TARGET").unwrap();
let host = env::var("HOST").unwrap();
if target != host {
let skip_cross_check =
env::var("DENO_SKIP_CROSS_BUILD_CHECK").map_or(false, |v| v == "1");
if !skip_cross_check && target != host {
panic!("Cross compiling with snapshot is not supported.");
}