Skip to content

Commit fa69a69

Browse files
committed
Force swiftpm to build tests ignore cross compilation flag
1 parent 8aaa0cb commit fa69a69

File tree

1 file changed

+3
-3
lines changed
  • utils/swift_build_support/swift_build_support/products

1 file changed

+3
-3
lines changed

utils/swift_build_support/swift_build_support/products/swiftpm.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ 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(self, action, host_target, additional_params=[], *, ignore_cross_compile_argument = False):
4646
script_path = os.path.join(
4747
self.source_dir, 'Utilities', 'bootstrap')
4848

@@ -85,7 +85,7 @@ def run_bootstrap_script(self, action, host_target, additional_params=[]):
8585
]
8686

8787
# Pass Cross compile host info
88-
if self.has_cross_compile_hosts():
88+
if not ignore_cross_compile_argument and self.has_cross_compile_hosts():
8989
if self.is_darwin_host(host_target):
9090
helper_cmd += ['--cross-compile-hosts']
9191
for cross_compile_host in self.args.cross_compile_hosts:
@@ -114,7 +114,7 @@ def should_test(self, host_target):
114114
return self.args.test_swiftpm
115115

116116
def test(self, host_target):
117-
self.run_bootstrap_script('test', host_target)
117+
self.run_bootstrap_script('test', host_target, ignore_cross_compile_argument=True)
118118

119119
def should_clean(self, host_target):
120120
return self.args.clean_swiftpm

0 commit comments

Comments
 (0)