diff options
Diffstat (limited to 'cli/build.rs')
-rw-r--r-- | cli/build.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cli/build.rs b/cli/build.rs index c8fca543e..b1377485b 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."); } |