Skip to content

[build-script] Remove dead code. NFC. #4550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 0 additions & 77 deletions utils/build-script-impl
Original file line number Diff line number Diff line change
Expand Up @@ -326,83 +326,6 @@ function is_swift_lto_enabled() {
fi
}

# Compute the cmake flags related to disabling llvm tools as a result of our
# needs for testing LLVM/Swift.
function compute_cmake_llvm_tool_disable_flags() {
if [[ $(false_true "${LLVM_INCLUDE_TESTS}") == "FALSE" ]]; then
return
fi

local OUTPUT=()
local EXTRA_LLVM_CMAKE_OPTIONS=(
# Do not include LLVM tests.
-DLLVM_INCLUDE_TESTS:BOOL=NO
-DCLANG_INCLUDE_TESTS:BOOL=NO
)

# Disable LLVM Tools that Swift does not use for testing.
local LLVM_TOOLS_TO_DISABLE=(
BUGPOINT BUGPOINT_PASSES GOLD LLI LLVM_AS_FUZZER LLVM_C_TEST
LLVM_CXXDUMP LLVM_DIFF LLVM_DIS LLVM_DWP LLVM_EXTRACT LLVM_GO
LLVM_JITLISTENER LLVM_LTO LLVM_MC LLVM_MC_FUZZER LLVM_MCMARKUP
LLVM_PDBDUMP LLVM_READOBJ LLVM_RTDYLD LLVM_SHLIB LLVM_SIZE LLVM_SPLIT
LLVM_STRESS LLVM_SYMBOLIZER MSBUILD OBJ2YAML OPT SANCOV SANSTATS
VERIFY_USELISTORDER XCODE_TOOLCHAIN YAML2OBJ
)

# Disable Clang Tools that Swift does not use for testing.
local CLANG_TOOLS_TO_DISABLE=(
CLANG_CHECK DIAGTOOL SCAN_BUILD SCAN_VIEW CLANG_FORMAT
)

# If in addition we are asked to not generate targets for swift tests,
# then we can disable the building of even more of LLVM.
if [[ $(false_true "${SWIFT_INCLUDE_TESTS}") == "TRUE" ]]; then
EXTRA_LLVM_CMAKE_OPTIONS+=(
# We do not need gtest/FileCheck and friends since we are not
# running any tests.
-DLLVM_INCLUDE_UTILS:BOOL=NO
)

# Disable the rest of the LLVM tools. We do not need any of them.
LLVM_TOOLS_TO_DISABLE+=(
DSYMUTIL LLC LLVM_AR LLVM_AS LLVM_BCANALYZER LLVM_COV
LLVM_DWARFDUMP LLVM_LINK LLVM_NM LLVM_OBJDUMP LLVM_PROFDATA
)

# Disable the rest of the Clang tools. We do not need them.
CLANG_TOOLS_TO_DISABLE+=(
ARCMT_TEST C_ARCMT_TEST C_INDEX_TEST
)

# If in addition, we are not building compiler-rt, then we do not
# even need to build clang.
#
# *NOTE* This may change once we start building the standard library
# *with the just built clang.
if [[ $(true_false "${SKIP_BUILD_COMPILER_RT}") == "TRUE" ]]; then
CLANG_TOOLS_TO_DISABLE+=(
DRIVER
)
fi
fi

for arg in "${EXTRA_LLVM_CMAKE_ARGS[@]}"; do
OUTPUT+=( ${arg} )
done
for tool in "${LLVM_TOOLS_TO_DISABLE[@]}"; do
OUTPUT+=(
-DLLVM_TOOL_${tool}_BUILD:BOOL=NO
)
done
for tool in "${CLANG_TOOLS_TO_DISABLE[@]}"; do
OUTPUT+=(
-DCLANG_TOOL_${tool}_BUILD:BOOL=NO
)
done
echo "${OUTPUT[@]}"
}

# Support for performing isolated actions.
#
# This is part of refactoring more work to be done or controllable via
Expand Down