@@ -326,83 +326,6 @@ function is_swift_lto_enabled() {
326
326
fi
327
327
}
328
328
329
- # Compute the cmake flags related to disabling llvm tools as a result of our
330
- # needs for testing LLVM/Swift.
331
- function compute_cmake_llvm_tool_disable_flags() {
332
- if [[ $( false_true " ${LLVM_INCLUDE_TESTS} " ) == " FALSE" ]]; then
333
- return
334
- fi
335
-
336
- local OUTPUT=()
337
- local EXTRA_LLVM_CMAKE_OPTIONS=(
338
- # Do not include LLVM tests.
339
- -DLLVM_INCLUDE_TESTS:BOOL=NO
340
- -DCLANG_INCLUDE_TESTS:BOOL=NO
341
- )
342
-
343
- # Disable LLVM Tools that Swift does not use for testing.
344
- local LLVM_TOOLS_TO_DISABLE=(
345
- BUGPOINT BUGPOINT_PASSES GOLD LLI LLVM_AS_FUZZER LLVM_C_TEST
346
- LLVM_CXXDUMP LLVM_DIFF LLVM_DIS LLVM_DWP LLVM_EXTRACT LLVM_GO
347
- LLVM_JITLISTENER LLVM_LTO LLVM_MC LLVM_MC_FUZZER LLVM_MCMARKUP
348
- LLVM_PDBDUMP LLVM_READOBJ LLVM_RTDYLD LLVM_SHLIB LLVM_SIZE LLVM_SPLIT
349
- LLVM_STRESS LLVM_SYMBOLIZER MSBUILD OBJ2YAML OPT SANCOV SANSTATS
350
- VERIFY_USELISTORDER XCODE_TOOLCHAIN YAML2OBJ
351
- )
352
-
353
- # Disable Clang Tools that Swift does not use for testing.
354
- local CLANG_TOOLS_TO_DISABLE=(
355
- CLANG_CHECK DIAGTOOL SCAN_BUILD SCAN_VIEW CLANG_FORMAT
356
- )
357
-
358
- # If in addition we are asked to not generate targets for swift tests,
359
- # then we can disable the building of even more of LLVM.
360
- if [[ $( false_true " ${SWIFT_INCLUDE_TESTS} " ) == " TRUE" ]]; then
361
- EXTRA_LLVM_CMAKE_OPTIONS+=(
362
- # We do not need gtest/FileCheck and friends since we are not
363
- # running any tests.
364
- -DLLVM_INCLUDE_UTILS:BOOL=NO
365
- )
366
-
367
- # Disable the rest of the LLVM tools. We do not need any of them.
368
- LLVM_TOOLS_TO_DISABLE+=(
369
- DSYMUTIL LLC LLVM_AR LLVM_AS LLVM_BCANALYZER LLVM_COV
370
- LLVM_DWARFDUMP LLVM_LINK LLVM_NM LLVM_OBJDUMP LLVM_PROFDATA
371
- )
372
-
373
- # Disable the rest of the Clang tools. We do not need them.
374
- CLANG_TOOLS_TO_DISABLE+=(
375
- ARCMT_TEST C_ARCMT_TEST C_INDEX_TEST
376
- )
377
-
378
- # If in addition, we are not building compiler-rt, then we do not
379
- # even need to build clang.
380
- #
381
- # *NOTE* This may change once we start building the standard library
382
- # *with the just built clang.
383
- if [[ $( true_false " ${SKIP_BUILD_COMPILER_RT} " ) == " TRUE" ]]; then
384
- CLANG_TOOLS_TO_DISABLE+=(
385
- DRIVER
386
- )
387
- fi
388
- fi
389
-
390
- for arg in " ${EXTRA_LLVM_CMAKE_ARGS[@]} " ; do
391
- OUTPUT+=( ${arg} )
392
- done
393
- for tool in " ${LLVM_TOOLS_TO_DISABLE[@]} " ; do
394
- OUTPUT+=(
395
- -DLLVM_TOOL_${tool} _BUILD:BOOL=NO
396
- )
397
- done
398
- for tool in " ${CLANG_TOOLS_TO_DISABLE[@]} " ; do
399
- OUTPUT+=(
400
- -DCLANG_TOOL_${tool} _BUILD:BOOL=NO
401
- )
402
- done
403
- echo " ${OUTPUT[@]} "
404
- }
405
-
406
329
# Support for performing isolated actions.
407
330
#
408
331
# This is part of refactoring more work to be done or controllable via
0 commit comments