Skip to content

Commit

Permalink
build: add an environment variable to skip cross build check (#20281) (
Browse files Browse the repository at this point in the history
  • Loading branch information
secext2022 authored Sep 17, 2023
1 parent 4960b66 commit 23bf05c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cli/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
}

Expand Down

0 comments on commit 23bf05c

Please sign in to comment.