Skip to content

Commit 0c0c0ee

Browse files
committed
[build-script] Remove support for building LLDB with Xcode
1 parent 255c7f5 commit 0c0c0ee

File tree

2 files changed

+48
-205
lines changed

2 files changed

+48
-205
lines changed

utils/build-script

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,6 @@ class BuildScriptInvocation(object):
298298
"--swift-build-type", args.swift_build_variant,
299299
"--swift-stdlib-build-type", args.swift_stdlib_build_variant,
300300
"--lldb-build-type", args.lldb_build_variant,
301-
"--lldb-build-with-xcode", args.lldb_build_with_xcode,
302301
"--foundation-build-type", args.foundation_build_variant,
303302
"--libdispatch-build-type", args.libdispatch_build_variant,
304303
"--libicu-build-type", args.libicu_build_variant,

utils/build-script-impl

Lines changed: 48 additions & 204 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ KNOWN_SETTINGS=(
5353
ninja-bin "" "the path to Ninja tool"
5454
cmark-build-type "Debug" "the CMake build variant for CommonMark (Debug, RelWithDebInfo, Release, MinSizeRel). Defaults to Debug."
5555
lldb-extra-cmake-args "" "extra command line args to pass to lldb cmake"
56-
lldb-extra-xcodebuild-args "" "extra command line args to pass to lldb xcodebuild"
5756
lldb-test-cc "" "CC to use for building LLDB testsuite test inferiors. Defaults to just-built, in-tree clang. If set to 'host-toolchain', sets it to same as host-cc."
5857
lldb-test-with-curses "" "run test lldb test runner using curses terminal control"
5958
lldb-test-swift-only "0" "when running lldb tests, only include Swift-specific tests"
@@ -74,7 +73,6 @@ KNOWN_SETTINGS=(
7473
swift-stdlib-enable-assertions "1" "enable assertions in Swift"
7574
swift-stdlib-use-nonatomic-rc "0" "build the Swift stdlib and overlays with nonatomic reference count operations enabled"
7675
lldb-build-type "Debug" "the CMake build variant for LLDB"
77-
lldb-build-with-xcode "0" "Use xcodebuild to build LLDB, instead of CMake"
7876
llbuild-build-type "Debug" "the CMake build variant for llbuild"
7977
foundation-build-type "Debug" "the build variant for Foundation"
8078
libdispatch-build-type "Debug" "the build variant for libdispatch"
@@ -1929,64 +1927,6 @@ function set_swiftevolve_build_command() {
19291927
swiftevolve_build_command=("${stresstester_build_script_helper_command[@]}")
19301928
}
19311929

1932-
# Construct the appropriate options to pass to an Xcode
1933-
# build of any LLDB target.
1934-
function set_lldb_xcodebuild_options() {
1935-
llvm_build_dir=$(build_directory ${host} llvm)
1936-
cmark_build_dir=$(build_directory ${host} cmark)
1937-
lldb_build_dir=$(build_directory ${host} lldb)
1938-
swift_build_dir=$(build_directory ${host} swift)
1939-
1940-
lldb_xcodebuild_options=(
1941-
LLDB_PATH_TO_LLVM_SOURCE="${LLVM_SOURCE_DIR}"
1942-
LLDB_PATH_TO_CLANG_SOURCE="${CLANG_SOURCE_DIR}"
1943-
LLDB_PATH_TO_SWIFT_SOURCE="${SWIFT_SOURCE_DIR}"
1944-
LLDB_PATH_TO_LLVM_BUILD="${llvm_build_dir}"
1945-
LLDB_PATH_TO_CLANG_BUILD="${llvm_build_dir}"
1946-
LLDB_PATH_TO_SWIFT_BUILD="${swift_build_dir}"
1947-
LLDB_IS_BUILDBOT_BUILD="${LLDB_IS_BUILDBOT_BUILD}"
1948-
LLDB_BUILD_DATE="\"${LLDB_BUILD_DATE}\""
1949-
SYMROOT="${lldb_build_dir}"
1950-
OBJROOT="${lldb_build_dir}"
1951-
-UseNewBuildSystem=NO
1952-
${LLDB_EXTRA_XCODEBUILD_ARGS}
1953-
MACOSX_DEPLOYMENT_TARGET=10.13
1954-
)
1955-
if [[ "${LLDB_NO_DEBUGSERVER}" ]] ; then
1956-
lldb_xcodebuild_options=(
1957-
"${lldb_xcodebuild_options[@]}"
1958-
DEBUGSERVER_DISABLE_CODESIGN="1"
1959-
DEBUGSERVER_DELETE_AFTER_BUILD="1"
1960-
)
1961-
fi
1962-
if [[ "${LLDB_USE_SYSTEM_DEBUGSERVER}" ]] ; then
1963-
lldb_xcodebuild_options=(
1964-
"${lldb_xcodebuild_options[@]}"
1965-
DEBUGSERVER_USE_FROM_SYSTEM="1"
1966-
)
1967-
fi
1968-
if [[ "${ENABLE_ASAN}" ]] ; then
1969-
lldb_xcodebuild_options=(
1970-
"${lldb_xcodebuild_options[@]}"
1971-
ENABLE_ADDRESS_SANITIZER="YES"
1972-
-enableAddressSanitizer=YES
1973-
)
1974-
fi
1975-
if [[ "${ENABLE_UBSAN}" ]] ; then
1976-
lldb_xcodebuild_options=(
1977-
"${lldb_xcodebuild_options[@]}"
1978-
ENABLE_UNDEFINED_BEHAVIOR_SANITIZER="YES"
1979-
-enableUndefinedBehaviorSanitizer=YES
1980-
)
1981-
fi
1982-
if [[ "$(true_false ${LLDB_ASSERTIONS})" == "FALSE" ]]; then
1983-
lldb_xcodebuild_options=(
1984-
"${lldb_xcodebuild_options[@]}"
1985-
OTHER_CFLAGS="-DNDEBUG"
1986-
)
1987-
fi
1988-
}
1989-
19901930
#
19911931
# Configure and build each product
19921932
#
@@ -2517,49 +2457,36 @@ for host in "${ALL_HOSTS[@]}"; do
25172457
# Get the build date
25182458
LLDB_BUILD_DATE=$(date +%Y-%m-%d)
25192459

2520-
using_xcodebuild="FALSE"
2521-
if [[ "$(uname -s)" == "Darwin" && "$(true_false ${LLDB_BUILD_WITH_XCODE})" == "TRUE" ]] ; then
2522-
using_xcodebuild="TRUE"
2523-
fi
25242460

2525-
if [[ "${using_xcodebuild}" == "TRUE" ]] ; then
2526-
# Set up flags to pass to xcodebuild
2527-
set_lldb_xcodebuild_options
2528-
set_lldb_build_mode
2529-
with_pushd ${source_dir} \
2530-
call xcodebuild -target desktop -configuration ${LLDB_BUILD_MODE} ${lldb_xcodebuild_options[@]}
2531-
continue
2461+
if [[ "$(uname -s)" == "Darwin" ]] ; then
2462+
cmake_cache="Apple-lldb-macOS.cmake"
25322463
else
2533-
if [[ "$(uname -s)" == "Darwin" ]] ; then
2534-
cmake_cache="Apple-lldb-macOS.cmake"
2535-
else
2536-
cmake_cache="Apple-lldb-Linux.cmake"
2537-
fi
2464+
cmake_cache="Apple-lldb-Linux.cmake"
2465+
fi
25382466

2539-
cmake_options=(
2540-
"${cmake_options[@]}"
2541-
-C${LLDB_SOURCE_DIR}/cmake/caches/${cmake_cache}
2542-
-DCMAKE_BUILD_TYPE:STRING="${LLDB_BUILD_TYPE}"
2543-
-DLLDB_SWIFTC:PATH="$(build_directory ${LOCAL_HOST} swift)/bin/swiftc"
2544-
-DLLDB_SWIFT_LIBS:PATH="$(build_directory ${LOCAL_HOST} swift)/lib/swift"
2545-
-DCMAKE_INSTALL_PREFIX:PATH="$(get_host_install_prefix ${host})"
2546-
-DClang_DIR:PATH=${llvm_build_dir}/lib/cmake/clang
2547-
-DLLVM_DIR:PATH=${llvm_build_dir}/lib/cmake/llvm
2548-
-DLLDB_PATH_TO_CLANG_BUILD:PATH="${llvm_build_dir}"
2549-
-DLLDB_PATH_TO_SWIFT_SOURCE:PATH="${SWIFT_SOURCE_DIR}"
2550-
-DLLDB_PATH_TO_SWIFT_BUILD:PATH="${swift_build_dir}"
2551-
-DLLDB_IS_BUILDBOT_BUILD:BOOL="${LLDB_IS_BUILDBOT_BUILD}"
2552-
-DLLDB_BUILD_DATE:STRING="\"${LLDB_BUILD_DATE}\""
2553-
-DLLDB_ALLOW_STATIC_BINDINGS:BOOL=1
2554-
-DLLDB_INCLUDE_TESTS:BOOL=$(false_true ${BUILD_TOOLCHAIN_ONLY})
2555-
)
2467+
cmake_options=(
2468+
"${cmake_options[@]}"
2469+
-C${LLDB_SOURCE_DIR}/cmake/caches/${cmake_cache}
2470+
-DCMAKE_BUILD_TYPE:STRING="${LLDB_BUILD_TYPE}"
2471+
-DLLDB_SWIFTC:PATH="$(build_directory ${LOCAL_HOST} swift)/bin/swiftc"
2472+
-DLLDB_SWIFT_LIBS:PATH="$(build_directory ${LOCAL_HOST} swift)/lib/swift"
2473+
-DCMAKE_INSTALL_PREFIX:PATH="$(get_host_install_prefix ${host})"
2474+
-DClang_DIR:PATH=${llvm_build_dir}/lib/cmake/clang
2475+
-DLLVM_DIR:PATH=${llvm_build_dir}/lib/cmake/llvm
2476+
-DLLDB_PATH_TO_CLANG_BUILD:PATH="${llvm_build_dir}"
2477+
-DLLDB_PATH_TO_SWIFT_SOURCE:PATH="${SWIFT_SOURCE_DIR}"
2478+
-DLLDB_PATH_TO_SWIFT_BUILD:PATH="${swift_build_dir}"
2479+
-DLLDB_IS_BUILDBOT_BUILD:BOOL="${LLDB_IS_BUILDBOT_BUILD}"
2480+
-DLLDB_BUILD_DATE:STRING="\"${LLDB_BUILD_DATE}\""
2481+
-DLLDB_ALLOW_STATIC_BINDINGS:BOOL=1
2482+
-DLLDB_INCLUDE_TESTS:BOOL=$(false_true ${BUILD_TOOLCHAIN_ONLY})
2483+
)
25562484

2557-
if [[ "$(uname -s)" == "Darwin" ]] ; then
2558-
cmake_options+=(
2559-
-DLLDB_CODESIGN_IDENTITY=""
2560-
-DLLDB_USE_SYSTEM_DEBUGSERVER:BOOL="${LLDB_USE_SYSTEM_DEBUGSERVER}"
2561-
)
2562-
fi
2485+
if [[ "$(uname -s)" == "Darwin" ]] ; then
2486+
cmake_options+=(
2487+
-DLLDB_CODESIGN_IDENTITY=""
2488+
-DLLDB_USE_SYSTEM_DEBUGSERVER:BOOL="${LLDB_USE_SYSTEM_DEBUGSERVER}"
2489+
)
25632490
fi
25642491
;;
25652492
llbuild)
@@ -3055,34 +2982,7 @@ for host in "${ALL_HOSTS[@]}"; do
30552982
swift_build_dir=$(build_directory ${host} swift)
30562983
module_cache="${build_dir}/module-cache"
30572984

3058-
using_xcodebuild="FALSE"
3059-
if [[ "$(uname -s)" == "Darwin" && "$(true_false ${LLDB_BUILD_WITH_XCODE})" == "TRUE" ]] ; then
3060-
using_xcodebuild="TRUE"
3061-
fi
3062-
3063-
3064-
# Run the unittests.
3065-
# FIXME: The xcode build project currently doesn't know how to run the lit style tests.
3066-
if [[ "$using_xcodebuild" == "TRUE" ]] ; then
3067-
set_lldb_xcodebuild_options
3068-
set_lldb_build_mode
3069-
# Run the LLDB unittests (gtests).
3070-
with_pushd ${LLDB_SOURCE_DIR} \
3071-
call xcodebuild -scheme lldb-gtest -configuration ${LLDB_BUILD_MODE} ${lldb_xcodebuild_options[@]}
3072-
rc=$?
3073-
if [[ "$rc" -ne 0 ]] ; then
3074-
>&2 echo "error: LLDB gtests failed"
3075-
exit 1
3076-
fi
3077-
fi
3078-
3079-
# Setup lldb executable path
3080-
if [[ "$using_xcodebuild" == "TRUE" ]] ; then
3081-
lldb_executable="${lldb_build_dir}"/${LLDB_BUILD_MODE}/lldb
3082-
else
3083-
lldb_executable="${lldb_build_dir}"/bin/lldb
3084-
fi
3085-
2985+
lldb_executable="${lldb_build_dir}"/bin/lldb
30862986
results_dir="${lldb_build_dir}/test-results"
30872987

30882988
# Handle test results formatter
@@ -3155,10 +3055,6 @@ for host in "${ALL_HOSTS[@]}"; do
31553055
fi
31563056
call mkdir -p "${results_dir}"
31573057

3158-
if [[ "$using_xcodebuild" == "TRUE" ]] ; then
3159-
LLDB_DOTEST_CC_OPTS="${LLDB_DOTEST_CC_OPTS} --filecheck $(build_directory $LOCAL_HOST llvm)/bin/FileCheck --dsymutil $(build_directory $LOCAL_HOST llvm)/bin/dsymutil"
3160-
fi
3161-
31623058
# Prefer to use lldb-dotest, as building it guarantees that we build all
31633059
# test dependencies. Ultimately we want to delete as much lldb-specific logic
31643060
# from this file as possible and just have a single call to lldb-dotest.
@@ -3168,65 +3064,32 @@ for host in "${ALL_HOSTS[@]}"; do
31683064
LLVM_LIT_ARGS="${LLVM_LIT_ARGS} -j $(sysctl hw.physicalcpu | awk -v N=${BUILD_JOBS} '{ print (N < $2) ? N : $2 }')"
31693065
fi
31703066

3171-
if [[ "$(true_false ${LLDB_TEST_SWIFT_ONLY})" == "TRUE" ]]; then
3172-
LLVM_LIT_ARGS="${LLVM_LIT_ARGS} --filter=[sS]wift"
3173-
fi
3067+
if [[ "$(true_false ${LLDB_TEST_SWIFT_ONLY})" == "TRUE" ]]; then
3068+
LLVM_LIT_ARGS="${LLVM_LIT_ARGS} --filter=[sS]wift"
3069+
fi
31743070

31753071
# Record the times test took and report the slowest.
31763072
LLVM_LIT_ARGS="${LLVM_LIT_ARGS} -v --time-tests"
3177-
if [[ "$using_xcodebuild" == "FALSE" ]] ; then
3178-
with_pushd ${lldb_build_dir} \
3179-
call ${NINJA_BIN} -j ${BUILD_JOBS} unittests/LLDBUnitTests
3180-
with_pushd ${lldb_build_dir} \
3181-
call ${NINJA_BIN} -j ${BUILD_JOBS} lldb-test-deps
3073+
with_pushd ${lldb_build_dir} \
3074+
call ${NINJA_BIN} -j ${BUILD_JOBS} unittests/LLDBUnitTests
3075+
with_pushd ${lldb_build_dir} \
3076+
call ${NINJA_BIN} -j ${BUILD_JOBS} lldb-test-deps
3077+
with_pushd ${results_dir} \
3078+
call "${llvm_build_dir}/bin/llvm-lit" \
3079+
"${lldb_build_dir}/lit" \
3080+
${LLVM_LIT_ARGS} \
3081+
--xunit-xml-output=${results_dir}/results.xml \
3082+
--param dotest-args="--build-dir ${lldb_build_dir}/lldb-test-build.noindex ${LLDB_TEST_SUBDIR_CLAUSE} ${LLDB_TEST_CATEGORIES} -t -E \"${DOTEST_EXTRA}\""
3083+
if [[ -x "${LLDB_TEST_SWIFT_COMPATIBILITY}" ]] ; then
3084+
echo "Running LLDB swift compatibility tests against" \
3085+
"${LLDB_TEST_SWIFT_COMPATIBILITY}"
31823086
with_pushd ${results_dir} \
3183-
call "${llvm_build_dir}/bin/llvm-lit" \
3184-
"${lldb_build_dir}/lit" \
3185-
${LLVM_LIT_ARGS} \
3186-
--xunit-xml-output=${results_dir}/results.xml \
3187-
--param dotest-args="--build-dir ${lldb_build_dir}/lldb-test-build.noindex ${LLDB_TEST_SUBDIR_CLAUSE} ${LLDB_TEST_CATEGORIES} -t -E \"${DOTEST_EXTRA}\""
3188-
if [[ -x "${LLDB_TEST_SWIFT_COMPATIBILITY}" ]] ; then
3189-
echo "Running LLDB swift compatibility tests against" \
3190-
"${LLDB_TEST_SWIFT_COMPATIBILITY}"
3191-
with_pushd ${results_dir} \
3192-
call "${llvm_build_dir}/bin/llvm-lit" \
3193-
"${lldb_build_dir}/lit" \
3194-
${LLVM_LIT_ARGS} \
3195-
--xunit-xml-output=${results_dir}/results.xml \
3196-
--param dotest-args="--build-dir ${lldb_build_dir}/lldb-test-build.noindex ${LLDB_TEST_SUBDIR_CLAUSE} ${LLDB_TEST_CATEGORIES} -G swift-history --swift-compiler \"${LLDB_TEST_SWIFT_COMPATIBILITY}\" -t -E \"${DOTEST_EXTRA}\"" --filter=compat
3197-
fi
3198-
else
3199-
with_pushd "${results_dir}" \
3200-
call env SWIFTC="$(build_directory $LOCAL_HOST swift)/bin/swiftc" \
3201-
SWIFTLIBS="${swift_build_dir}/lib/swift" \
3202-
"${LLDB_SOURCE_DIR}"/test/dotest.py \
3203-
--executable "${lldb_executable}" \
3204-
${LLDB_TEST_DEBUG_SERVER} \
3205-
${LLDB_TEST_SUBDIR_CLAUSE} \
3206-
${LLDB_TEST_CATEGORIES} \
3207-
${LLDB_DOTEST_CC_OPTS} \
3208-
${LLDB_FORMATTER_OPTS} \
3209-
--build-dir "${lldb_build_dir}/lldb-test-build.noindex" \
3210-
-t -E "${DOTEST_EXTRA}"
3211-
if [[ -x "${LLDB_TEST_SWIFT_COMPATIBILITY}" ]] ; then
3212-
echo "Running LLDB swift compatibility tests against" \
3213-
"${LLDB_TEST_SWIFT_COMPATIBILITY}"
3214-
call env SWIFTC="$(build_directory $LOCAL_HOST swift)/bin/swiftc" \
3215-
SWIFTLIBS="${swift_build_dir}/lib/swift" \
3216-
"${LLDB_SOURCE_DIR}"/test/dotest.py \
3217-
--executable "${lldb_executable}" \
3218-
${LLDB_TEST_DEBUG_SERVER} \
3219-
${LLDB_TEST_SUBDIR_CLAUSE} \
3220-
${LLDB_TEST_CATEGORIES} \
3221-
${LLDB_DOTEST_CC_OPTS} \
3222-
${LLDB_FORMATTER_OPTS} \
3223-
--build-dir "${lldb_build_dir}/lldb-test-build.noindex" \
3224-
-G swift-history \
3225-
--swift-compiler "${LLDB_TEST_SWIFT_COMPATIBILITY}" \
3226-
-t -E "${DOTEST_EXTRA}"
3227-
fi
3087+
call "${llvm_build_dir}/bin/llvm-lit" \
3088+
"${lldb_build_dir}/lit" \
3089+
${LLVM_LIT_ARGS} \
3090+
--xunit-xml-output=${results_dir}/results.xml \
3091+
--param dotest-args="--build-dir ${lldb_build_dir}/lldb-test-build.noindex ${LLDB_TEST_SUBDIR_CLAUSE} ${LLDB_TEST_CATEGORIES} -G swift-history --swift-compiler \"${LLDB_TEST_SWIFT_COMPATIBILITY}\" -t -E \"${DOTEST_EXTRA}\"" --filter=compat
32283092
fi
3229-
32303093
continue
32313094
;;
32323095
llbuild)
@@ -3573,25 +3436,6 @@ for host in "${ALL_HOSTS[@]}"; do
35733436
echo "--install-destdir is required to install products."
35743437
exit 1
35753438
fi
3576-
if [[ "$using_xcodebuild" == "TRUE" ]] ; then
3577-
case ${host} in
3578-
linux-*)
3579-
;;
3580-
freebsd-*)
3581-
;;
3582-
cygwin-*)
3583-
;;
3584-
haiku-*)
3585-
;;
3586-
macosx-*)
3587-
set_lldb_xcodebuild_options
3588-
set_lldb_build_mode
3589-
with_pushd ${LLDB_SOURCE_DIR} \
3590-
call xcodebuild -target toolchain -configuration ${LLDB_BUILD_MODE} install ${lldb_xcodebuild_options[@]} DSTROOT="${host_install_destdir}" LLDB_TOOLCHAIN_PREFIX="${TOOLCHAIN_PREFIX}"
3591-
continue
3592-
;;
3593-
esac
3594-
fi
35953439
;;
35963440
swiftpm)
35973441
if [[ -z "${INSTALL_SWIFTPM}" ]] ; then

0 commit comments

Comments
 (0)