@@ -42,7 +42,14 @@ def is_before_build_script_impl_product(cls):
42
42
def should_build (self , host_target ):
43
43
return True
44
44
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
+ ):
46
53
script_path = os .path .join (
47
54
self .source_dir , 'Utilities' , 'bootstrap' )
48
55
@@ -85,7 +92,10 @@ def run_bootstrap_script(self, action, host_target, additional_params=[]):
85
92
]
86
93
87
94
# 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
+ ):
89
99
if self .is_darwin_host (host_target ):
90
100
helper_cmd += ['--cross-compile-hosts' ]
91
101
for cross_compile_host in self .args .cross_compile_hosts :
@@ -114,7 +124,11 @@ def should_test(self, host_target):
114
124
return self .args .test_swiftpm
115
125
116
126
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
+ )
118
132
119
133
def should_clean (self , host_target ):
120
134
return self .args .clean_swiftpm
0 commit comments