@@ -74,6 +74,7 @@ def install(self, host_target):
7474
7575
7676def run_build_script_helper (action , host_target , product , args ):
77+ build_root = os .path .dirname (product .build_dir )
7778 script_path = os .path .join (
7879 product .source_dir , 'Utilities' , 'build-script-helper.py' )
7980
@@ -84,6 +85,15 @@ def run_build_script_helper(action, host_target, product, args):
8485 product .build_dir )
8586 toolchain_path = targets .toolchain_path (install_destdir ,
8687 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+
8797 is_release = product .is_release ()
8898 configuration = 'release' if is_release else 'debug'
8999 helper_cmd = [
@@ -96,6 +106,14 @@ def run_build_script_helper(action, host_target, product, args):
96106 '--ninja-bin' , product .toolchain .ninja ,
97107 '--cmake-bin' , product .toolchain .cmake ,
98108 ]
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+ ]
99117 if args .verbose_build :
100118 helper_cmd .append ('--verbose' )
101119
0 commit comments