@@ -74,6 +74,7 @@ def install(self, host_target):
74
74
75
75
76
76
def run_build_script_helper (action , host_target , product , args ):
77
+ build_root = os .path .dirname (product .build_dir )
77
78
script_path = os .path .join (
78
79
product .source_dir , 'Utilities' , 'build-script-helper.py' )
79
80
@@ -84,6 +85,15 @@ def run_build_script_helper(action, host_target, product, args):
84
85
product .build_dir )
85
86
toolchain_path = targets .toolchain_path (install_destdir ,
86
87
args .install_prefix )
88
+
89
+ # Pass Dispatch directory down if we built it
90
+ dispatch_build_dir = os .path .join (
91
+ build_root , '%s-%s' % ('libdispatch' , host_target ))
92
+
93
+ # Pass Foundation directory down if we built it
94
+ foundation_build_dir = os .path .join (
95
+ build_root , '%s-%s' % ('foundation' , host_target ))
96
+
87
97
is_release = product .is_release ()
88
98
configuration = 'release' if is_release else 'debug'
89
99
helper_cmd = [
@@ -96,6 +106,14 @@ def run_build_script_helper(action, host_target, product, args):
96
106
'--ninja-bin' , product .toolchain .ninja ,
97
107
'--cmake-bin' , product .toolchain .cmake ,
98
108
]
109
+ if os .path .exists (dispatch_build_dir ):
110
+ helper_cmd += [
111
+ '--dispatch-build-dir' , dispatch_build_dir
112
+ ]
113
+ if os .path .exists (foundation_build_dir ):
114
+ helper_cmd += [
115
+ '--foundation-build-dir' , foundation_build_dir
116
+ ]
99
117
if args .verbose_build :
100
118
helper_cmd .append ('--verbose' )
101
119
0 commit comments