@@ -570,9 +570,11 @@ fn static_lib_url() -> String {
570570 let profile = prebuilt_profile ( ) ;
571571 let features = prebuilt_features_suffix ( ) ;
572572
573- if base == default_base && !is_target_prebuilt ( & target) {
573+ if env:: var ( "RUSTY_V8_MIRROR" ) . is_err ( )
574+ && !is_target_prebuilt ( & target, profile)
575+ {
574576 panic ! (
575- "The target {target} is not a first class target and no pre-built archive is provided. Compile v8 from source with V8_FROM_SOURCE=1"
577+ "The target ' {target}' is not a first class target and no pre-built archive is provided. Compile v8 from source with V8_FROM_SOURCE=1"
576578 )
577579 }
578580
@@ -619,15 +621,21 @@ fn build_dir() -> PathBuf {
619621
620622/// Checks if the target is available as a pre-built archive from the rusty_v8 GitHub.
621623/// Should only be called when `RUSTY_V8_MIRROR` is unset.
622- fn is_target_prebuilt ( target : & str ) -> bool {
624+ fn is_target_prebuilt ( target : & str , profile : & str ) -> bool {
623625 const PREBUILT_TARGETS : [ & str ; 6 ] = [
624626 "aarch64-apple-darwin" ,
625627 "aarch64-pc-windows-msvc" ,
626- "aarch64-unknown-linux" ,
628+ "aarch64-unknown-linux-gnu " ,
627629 "x86_64-apple-darwin" ,
628630 "x86_64-pc-windows-msvc" ,
629631 "x86_64-unknown-linux-gnu" ,
630632 ] ;
633+
634+ // No pre-built archives for Windows on debug builds.
635+ if target. contains ( "windows" ) && profile != "release" {
636+ return false ;
637+ }
638+
631639 PREBUILT_TARGETS . contains ( & target)
632640}
633641
0 commit comments