Skip to content

Commit a87b8d5

Browse files
committed
[build-script] When we build Dispatch and Foundation, pass them down to SwiftPM's build
1 parent 3b73065 commit a87b8d5

File tree

1 file changed

+19
-0
lines changed
  • utils/swift_build_support/swift_build_support/products

1 file changed

+19
-0
lines changed

utils/swift_build_support/swift_build_support/products/swiftpm.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,25 @@ def run_bootstrap_script(self, action, host_target, additional_params=[]):
5353
"--build-dir", self.build_dir,
5454
"--llbuild-build-dir", llbuild_build_dir
5555
]
56+
57+
# Pass Dispatch directory down if we built it
58+
dispatch_build_dir = os.path.join(
59+
build_root, '%s-%s' % ("libdispatch", host_target))
60+
61+
if os.path.exists(dispatch_build_dir):
62+
helper_cmd += [
63+
"--dispatch-build-dir", dispatch_build_dir
64+
]
65+
66+
# Pass Foundation directory down if we built it
67+
foundation_build_dir = os.path.join(
68+
build_root, '%s-%s' % ("foundation", host_target))
69+
70+
if os.path.exists(foundation_build_dir):
71+
helper_cmd += [
72+
"--foundation-build-dir", foundation_build_dir
73+
]
74+
5675
helper_cmd.extend(additional_params)
5776

5877
shell.call(helper_cmd)

0 commit comments

Comments
 (0)