@@ -960,11 +960,13 @@ class BuildScriptInvocation(object):
960
960
# infer dependencies, infer the dependencies now and then re-split the
961
961
# list.
962
962
if self .args .infer_dependencies :
963
- combined = impl_product_classes + product_classes
963
+ combined_classes = before_impl_product_classes + \
964
+ impl_product_classes + \
965
+ product_classes
964
966
if self .args .verbose_build :
965
967
print ("-- Build Graph Inference --" )
966
968
print ("Initial Product List:" )
967
- for p in combined :
969
+ for p in combined_classes :
968
970
print (" {}" .format (p .product_name ()))
969
971
970
972
# Now that we have produced the schedule, resplit. We require our
@@ -977,17 +979,18 @@ class BuildScriptInvocation(object):
977
979
impl_product_classes = []
978
980
product_classes = []
979
981
is_darwin = platform .system () == 'Darwin'
980
- final_schedule = build_graph .produce_scheduled_build (combined )[0 ]
982
+ final_schedule = \
983
+ build_graph .produce_scheduled_build (combined_classes )[0 ]
981
984
for p in final_schedule :
982
985
if is_darwin and p .is_nondarwin_only_build_product ():
983
986
continue
984
-
985
987
if p .is_build_script_impl_product ():
986
988
impl_product_classes .append (p )
987
989
elif p .is_before_build_script_impl_product ():
988
990
before_impl_product_classes .append (p )
989
991
else :
990
992
product_classes .append (p )
993
+
991
994
if self .args .verbose_build :
992
995
print ("Final Build Order:" )
993
996
for p in before_impl_product_classes :
@@ -1151,8 +1154,14 @@ class BuildScriptInvocation(object):
1151
1154
print ("--- Running tests for %s ---" % product_name )
1152
1155
product .test (host_target )
1153
1156
print ("--- Finished tests for %s ---" % product_name )
1157
+ # Install the product if it should be installed specifically, or
1158
+ # if it should be built and `install_all` is set to True.
1159
+ # The exception is select before_build_script_impl products
1160
+ # which set `is_ignore_install_all_product` to True, ensuring
1161
+ # they are never installed. (e.g. earlySwiftDriver).
1154
1162
if product .should_install (host_target ) or \
1155
- (self .install_all and product .should_build (host_target )):
1163
+ (self .install_all and product .should_build (host_target ) and
1164
+ not product .is_ignore_install_all_product ()):
1156
1165
print ("--- Installing %s ---" % product_name )
1157
1166
product .install (host_target )
1158
1167
0 commit comments