File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed
validation-test/BuildSystem Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -848,8 +848,11 @@ class BuildScriptInvocation(object):
848848 impl_product_classes = []
849849 if self .args .build_cmark :
850850 impl_product_classes .append (products .CMark )
851- if self .args .build_llvm :
852- impl_product_classes .append (products .LLVM )
851+
852+ # If --skip-build-llvm is passed in, LLVM cannot be completely disabled, as
853+ # Swift still needs a few LLVM targets like tblgen to be built for it to be
854+ # configured. Instead, handle this in build-script-impl for now.
855+ impl_product_classes .append (products .LLVM )
853856 if self .args .build_libcxx :
854857 impl_product_classes .append (products .LibCXX )
855858 if self .args .build_libicu :
Original file line number Diff line number Diff line change @@ -1157,10 +1157,14 @@ LIBDISPATCH_STATIC_SOURCE_DIR="${WORKSPACE}/swift-corelibs-libdispatch"
11571157LIBICU_SOURCE_DIR=" ${WORKSPACE} /icu"
11581158LIBCXX_SOURCE_DIR=" ${WORKSPACE} /llvm-project/libcxx"
11591159
1160+ # We cannot currently apply the normal rules of skipping here for LLVM. Even if
1161+ # we are skipping building LLVM, we still need to at least build a few tools
1162+ # like tblgen that Swift relies on for building and testing. See the LLVM
1163+ # configure rules.
1164+ PRODUCTS=(llvm)
11601165[[ " ${SKIP_BUILD_CMARK} " ]] || PRODUCTS+=(cmark)
11611166[[ " ${SKIP_BUILD_LIBCXX} " ]] || PRODUCTS+=(libcxx)
11621167[[ " ${SKIP_BUILD_LIBICU} " ]] || PRODUCTS+=(libicu)
1163- [[ " ${SKIP_BUILD_LLVM} " ]] || PRODUCTS+=(llvm)
11641168[[ " ${SKIP_BUILD_SWIFT} " ]] || PRODUCTS+=(swift)
11651169[[ " ${SKIP_BUILD_LLDB} " ]] || PRODUCTS+=(lldb)
11661170[[ " ${SKIP_BUILD_LIBDISPATCH} " ]] || PRODUCTS+=(libdispatch)
@@ -1550,7 +1554,7 @@ for host in "${ALL_HOSTS[@]}"; do
15501554 if [ " ${BUILD_LLVM} " == " 0" ] ; then
15511555 build_targets=(clean)
15521556 fi
1553- if [ " ${SKIP_BUILD} " ] ; then
1557+ if [[ " ${SKIP_BUILD} " || " ${SKIP_BUILD_LLVM} " ] ] ; then
15541558 # We can't skip the build completely because the standalone
15551559 # build of Swift depend on these for building and testing.
15561560 build_targets=(llvm-tblgen clang-resource-headers intrinsics_gen clang-tablegen-targets)
Original file line number Diff line number Diff line change 2020# SKIP-CMARK-CHECK: --- Installing swift ---
2121
2222# SKIP-LLVM-CHECK: cmake --build {{.*}}cmark-
23- # SKIP-LLVM-CHECK-NOT : cmake --build {{.*}}llvm-
23+ # SKIP-LLVM-CHECK: cmake --build {{.*}}llvm-tblgen
2424# SKIP-LLVM-CHECK: cmake --build {{.*}}swift-
2525# SKIP-LLVM-CHECK: --- Installing cmark ---
2626# SKIP-LLVM-CHECK-NOT: --- Installing llvm ---
You can’t perform that action at this time.
0 commit comments