File tree Expand file tree Collapse file tree 4 files changed +23
-8
lines changed Expand file tree Collapse file tree 4 files changed +23
-8
lines changed Original file line number Diff line number Diff line change @@ -498,6 +498,8 @@ class BuildScriptInvocation(object):
498
498
impl_args += ["--skip-build-watchos-simulator" ]
499
499
if not args .build_android :
500
500
impl_args += ["--skip-build-android" ]
501
+ if not args .build_clang_tools_extra :
502
+ impl_args += ["--skip-build-clang-tools-extra" ]
501
503
502
504
if not args .test and not args .long_test and not args .stress_test :
503
505
impl_args += ["--skip-test-swift" ]
Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ KNOWN_SETTINGS=(
125
125
skip-build-benchmarks " " " set to skip building Swift Benchmark Suite"
126
126
skip-build-external-benchmarks " 1" " set to skip building the external Swift Benchmark Suite. (skipped by default)"
127
127
skip-build-playgroundsupport " " " set to skip building PlaygroundSupport"
128
+ skip-build-clang-tools-extra " " " set to skip building clang-tools-extra as part of llvm"
128
129
skip-local-build " " " set to skip building for the current host (useful when crosscompiling)"
129
130
skip-test-cmark " " " set to skip testing CommonMark"
130
131
skip-test-lldb " " " set to skip testing lldb"
@@ -1680,16 +1681,20 @@ for host in "${ALL_HOSTS[@]}"; do
1680
1681
" ${llvm_cmake_options[@]} "
1681
1682
)
1682
1683
1683
- if [[ " ${SKIP_BUILD_COMPILER_RT} " ]]; then
1684
- cmake_options+=(
1685
- -DLLVM_ENABLE_PROJECTS=" clang;clang-tools-extra;"
1686
- )
1687
- else
1688
- cmake_options+=(
1689
- -DLLVM_ENABLE_PROJECTS=" clang;clang-tools-extra;compiler-rt;"
1690
- )
1684
+ llvm_enable_projects=(" clang" )
1685
+
1686
+ if [[ ! " ${SKIP_BUILD_COMPILER_RT} " ]]; then
1687
+ llvm_enable_projects+=(" compiler-rt" )
1691
1688
fi
1692
1689
1690
+ if [[ ! " ${SKIP_BUILD_CLANG_TOOLS_EXTRA} " ]]; then
1691
+ llvm_enable_projects+=(" clang-tools-extra" )
1692
+ fi
1693
+
1694
+ cmake_options+=(
1695
+ -DLLVM_ENABLE_PROJECTS=" $( join " ;" ${llvm_enable_projects[@]} ) "
1696
+ )
1697
+
1693
1698
cmake_options+=(
1694
1699
-DLLVM_TOOL_LLD_BUILD:BOOL=TRUE
1695
1700
)
Original file line number Diff line number Diff line change @@ -615,6 +615,11 @@ def create_argument_parser():
615
615
option (['--build-libparser-only' ], store_true ('build_libparser_only' ),
616
616
help = 'build only libParser for SwiftSyntax' )
617
617
618
+ option ('--skip-build-clang-tools-extra' ,
619
+ toggle_false ('build_clang_tools_extra' ),
620
+ default = True ,
621
+ help = 'skip building clang-tools-extra as part of llvm' )
622
+
618
623
# -------------------------------------------------------------------------
619
624
in_group ('Extra actions to perform before or in addition to building' )
620
625
Original file line number Diff line number Diff line change 56
56
'build_android' : False ,
57
57
'build_args' : [],
58
58
'build_benchmarks' : True ,
59
+ 'build_clang_tools_extra' : True ,
59
60
'build_cygwin' : True ,
60
61
'build_external_benchmarks' : False ,
61
62
'build_foundation' : False ,
@@ -553,6 +554,8 @@ class BuildScriptImplOption(_BaseOption):
553
554
DisableOption ('--skip-test-swiftevolve' , dest = 'test_swiftevolve' ),
554
555
DisableOption ('--skip-test-toolchain-benchmarks' ,
555
556
dest = 'test_toolchainbenchmarks' ),
557
+ DisableOption ('--skip-build-clang-tools-extra' ,
558
+ dest = 'build_clang_tools_extra' ),
556
559
557
560
ChoicesOption ('--android-ndk-gcc-version' ,
558
561
choices = ['4.8' , '4.9' ]),
You can’t perform that action at this time.
0 commit comments