@@ -42,7 +42,14 @@ def is_before_build_script_impl_product(cls):
4242 def should_build (self , host_target ):
4343 return True
4444
45- def run_bootstrap_script (self , action , host_target , additional_params = []):
45+ def run_bootstrap_script (
46+ self ,
47+ action ,
48+ host_target ,
49+ additional_params = [],
50+ * ,
51+ compile_only_for_running_host_architecture = False ,
52+ ):
4653 script_path = os .path .join (
4754 self .source_dir , 'Utilities' , 'bootstrap' )
4855
@@ -85,7 +92,10 @@ def run_bootstrap_script(self, action, host_target, additional_params=[]):
8592 ]
8693
8794 # Pass Cross compile host info
88- if self .has_cross_compile_hosts ():
95+ if (
96+ not compile_only_for_running_host_architecture
97+ and self .has_cross_compile_hosts ()
98+ ):
8999 if self .is_darwin_host (host_target ):
90100 helper_cmd += ['--cross-compile-hosts' ]
91101 for cross_compile_host in self .args .cross_compile_hosts :
@@ -114,7 +124,11 @@ def should_test(self, host_target):
114124 return self .args .test_swiftpm
115125
116126 def test (self , host_target ):
117- self .run_bootstrap_script ('test' , host_target )
127+ self .run_bootstrap_script (
128+ 'test' ,
129+ host_target ,
130+ compile_only_for_running_host_architecture = True ,
131+ )
118132
119133 def should_clean (self , host_target ):
120134 return self .args .clean_swiftpm
0 commit comments