File tree Expand file tree Collapse file tree 4 files changed +17
-8
lines changed
swift_build_support/swift_build_support/products Expand file tree Collapse file tree 4 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -175,7 +175,6 @@ KNOWN_SETTINGS=(
175
175
skip-clean-xctest " 0" " skip cleaning the xctest build"
176
176
177
177
# # Test Options
178
- llvm-include-tests " 1" " Set to true to generate testing targets for LLVM. Set to true by default."
179
178
long-test " 0" " set to run the long test suite"
180
179
only-executable-test " " " only run the executable variant of the swift lit tests"
181
180
stress-test " 0" " set to run the stress test suite"
Original file line number Diff line number Diff line change @@ -1421,8 +1421,14 @@ def create_argument_parser():
1421
1421
'Can be called multiple times '
1422
1422
'to add multiple such options.' )
1423
1423
1424
- option ('--no-llvm-include-tests' , toggle_false ('llvm_include_tests' ),
1425
- help = 'do not generate testing targets for LLVM' )
1424
+ with mutually_exclusive_group ():
1425
+ set_defaults (llvm_include_tests = True )
1426
+
1427
+ option ('--no-llvm-include-tests' , toggle_false ('llvm_include_tests' ),
1428
+ help = 'do not generate testing targets for LLVM' )
1429
+
1430
+ option ('--llvm-include-tests' , toggle_true ('llvm_include_tests' ),
1431
+ help = 'generate testing targets for LLVM' )
1426
1432
1427
1433
option ('--llvm-cmake-options' , append ,
1428
1434
type = argparse .ShellSplitType (),
Original file line number Diff line number Diff line change @@ -557,7 +557,8 @@ class BuildScriptImplOption(_BaseOption):
557
557
SetOption ('--no-swift-stdlib-strict-availability' ,
558
558
dest = 'swift_stdlib_strict_availability' , value = False ),
559
559
560
- SetFalseOption ('--no-llvm-include-tests' , dest = 'llvm_include_tests' ),
560
+ DisableOption ('--no-llvm-include-tests' , dest = 'llvm_include_tests' ),
561
+ EnableOption ('--llvm-include-tests' , dest = 'llvm_include_tests' ),
561
562
562
563
SetTrueOption ('--install-back-deploy-concurrency' ,
563
564
dest = 'install_backdeployconcurrency' ),
Original file line number Diff line number Diff line change @@ -271,10 +271,7 @@ def build(self, host_target):
271
271
'llvm-size'
272
272
])
273
273
else :
274
- # We build LLVMTestingSupport unconditionally
275
- # to support scenarios where tests are run
276
- # outside of `build-script` (e.g. with `run-test`)
277
- build_targets = ['all' , 'LLVMTestingSupport' ]
274
+ build_targets = ['all' ]
278
275
279
276
if self .args .llvm_ninja_targets_for_cross_compile_hosts and \
280
277
self .is_cross_compile_target (host_target ):
@@ -422,6 +419,12 @@ def build(self, host_target):
422
419
llvm_cmake_options .define ('LLVM_INCLUDE_TESTS' , 'NO' )
423
420
llvm_cmake_options .define ('CLANG_INCLUDE_TESTS' , 'NO' )
424
421
422
+ if ("-DLLVM_INCLUDE_TESTS=NO" not in llvm_cmake_options
423
+ and "-DLLVM_INCLUDE_TESTS:BOOL=FALSE" not in llvm_cmake_options ):
424
+ # This supports scenarios where tests are run
425
+ # outside of `build-script` (e.g. with `run-test`)
426
+ build_targets .append ('LLVMTestingSupport' )
427
+
425
428
build_root = os .path .dirname (self .build_dir )
426
429
host_machine_target = targets .StdlibDeploymentTarget .host_target ().name
427
430
host_build_dir = os .path .join (build_root , 'llvm-{}' .format (
You can’t perform that action at this time.
0 commit comments