diff --git a/cli/build.rs b/cli/build.rs index c8fca543ea..b1377485b1 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -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."); }