@@ -53,7 +53,6 @@ KNOWN_SETTINGS=(
53
53
ninja-bin " " " the path to Ninja tool"
54
54
cmark-build-type " Debug" " the CMake build variant for CommonMark (Debug, RelWithDebInfo, Release, MinSizeRel). Defaults to Debug."
55
55
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"
57
56
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."
58
57
lldb-test-with-curses " " " run test lldb test runner using curses terminal control"
59
58
lldb-test-swift-only " 0" " when running lldb tests, only include Swift-specific tests"
@@ -74,7 +73,6 @@ KNOWN_SETTINGS=(
74
73
swift-stdlib-enable-assertions " 1" " enable assertions in Swift"
75
74
swift-stdlib-use-nonatomic-rc " 0" " build the Swift stdlib and overlays with nonatomic reference count operations enabled"
76
75
lldb-build-type " Debug" " the CMake build variant for LLDB"
77
- lldb-build-with-xcode " 0" " Use xcodebuild to build LLDB, instead of CMake"
78
76
llbuild-build-type " Debug" " the CMake build variant for llbuild"
79
77
foundation-build-type " Debug" " the build variant for Foundation"
80
78
libdispatch-build-type " Debug" " the build variant for libdispatch"
@@ -1929,64 +1927,6 @@ function set_swiftevolve_build_command() {
1929
1927
swiftevolve_build_command=(" ${stresstester_build_script_helper_command[@]} " )
1930
1928
}
1931
1929
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
-
1990
1930
#
1991
1931
# Configure and build each product
1992
1932
#
@@ -2518,49 +2458,36 @@ for host in "${ALL_HOSTS[@]}"; do
2518
2458
# Get the build date
2519
2459
LLDB_BUILD_DATE=$( date +%Y-%m-%d)
2520
2460
2521
- using_xcodebuild=" FALSE"
2522
- if [[ " $( uname -s) " == " Darwin" && " $( true_false ${LLDB_BUILD_WITH_XCODE} ) " == " TRUE" ]] ; then
2523
- using_xcodebuild=" TRUE"
2524
- fi
2525
2461
2526
- if [[ " ${using_xcodebuild} " == " TRUE" ]] ; then
2527
- # Set up flags to pass to xcodebuild
2528
- set_lldb_xcodebuild_options
2529
- set_lldb_build_mode
2530
- with_pushd ${source_dir} \
2531
- call xcodebuild -target desktop -configuration ${LLDB_BUILD_MODE} ${lldb_xcodebuild_options[@]}
2532
- continue
2462
+ if [[ " $( uname -s) " == " Darwin" ]] ; then
2463
+ cmake_cache=" Apple-lldb-macOS.cmake"
2533
2464
else
2534
- if [[ " $( uname -s) " == " Darwin" ]] ; then
2535
- cmake_cache=" Apple-lldb-macOS.cmake"
2536
- else
2537
- cmake_cache=" Apple-lldb-Linux.cmake"
2538
- fi
2465
+ cmake_cache=" Apple-lldb-Linux.cmake"
2466
+ fi
2539
2467
2540
- cmake_options=(
2541
- " ${cmake_options[@]} "
2542
- -C${LLDB_SOURCE_DIR} /cmake/caches/${cmake_cache}
2543
- -DCMAKE_BUILD_TYPE:STRING=" ${LLDB_BUILD_TYPE} "
2544
- -DLLDB_SWIFTC:PATH=" $( build_directory ${LOCAL_HOST} swift) /bin/swiftc"
2545
- -DLLDB_SWIFT_LIBS:PATH=" $( build_directory ${LOCAL_HOST} swift) /lib/swift"
2546
- -DCMAKE_INSTALL_PREFIX:PATH=" $( get_host_install_prefix ${host} ) "
2547
- -DLLDB_FRAMEWORK_INSTALL_DIR= " $( get_host_install_prefix ${host} ) ../System/Library/PrivateFrameworks "
2548
- -DClang_DIR :PATH=${llvm_build_dir} /lib/cmake/clang
2549
- -DLLVM_DIR :PATH=${llvm_build_dir} /lib/cmake/llvm
2550
- -DSwift_DIR :PATH=${swift_build_dir} /lib/cmake/swift
2551
- -DLLDB_PATH_TO_SWIFT_SOURCE :PATH=" ${SWIFT_SOURCE_DIR } "
2552
- -DLLDB_IS_BUILDBOT_BUILD:BOOL=" ${LLDB_IS_BUILDBOT_BUILD} "
2553
- -DLLDB_BUILD_DATE:STRING=" \" ${LLDB_BUILD_DATE} \" "
2554
- -DLLDB_ALLOW_STATIC_BINDINGS:BOOL=1
2555
- -DLLDB_INCLUDE_TESTS:BOOL=$( false_true ${BUILD_TOOLCHAIN_ONLY} )
2556
- )
2468
+ cmake_options=(
2469
+ " ${cmake_options[@]} "
2470
+ -C${LLDB_SOURCE_DIR} /cmake/caches/${cmake_cache}
2471
+ -DCMAKE_BUILD_TYPE:STRING=" ${LLDB_BUILD_TYPE} "
2472
+ -DLLDB_SWIFTC:PATH=" $( build_directory ${LOCAL_HOST} swift) /bin/swiftc"
2473
+ -DLLDB_SWIFT_LIBS:PATH=" $( build_directory ${LOCAL_HOST} swift) /lib/swift"
2474
+ -DCMAKE_INSTALL_PREFIX:PATH=" $( get_host_install_prefix ${host} ) "
2475
+ -DClang_DIR:PATH= ${llvm_build_dir} /lib/cmake/clang
2476
+ -DLLVM_DIR :PATH=${llvm_build_dir} /lib/cmake/llvm
2477
+ -DLLDB_PATH_TO_CLANG_BUILD :PATH=" ${llvm_build_dir} "
2478
+ -DLLDB_PATH_TO_SWIFT_SOURCE :PATH=" ${SWIFT_SOURCE_DIR} "
2479
+ -DLLDB_PATH_TO_SWIFT_BUILD :PATH=" ${swift_build_dir } "
2480
+ -DLLDB_IS_BUILDBOT_BUILD:BOOL=" ${LLDB_IS_BUILDBOT_BUILD} "
2481
+ -DLLDB_BUILD_DATE:STRING=" \" ${LLDB_BUILD_DATE} \" "
2482
+ -DLLDB_ALLOW_STATIC_BINDINGS:BOOL=1
2483
+ -DLLDB_INCLUDE_TESTS:BOOL=$( false_true ${BUILD_TOOLCHAIN_ONLY} )
2484
+ )
2557
2485
2558
- if [[ " $( uname -s) " == " Darwin" ]] ; then
2559
- cmake_options+=(
2560
- -DLLDB_CODESIGN_IDENTITY=" "
2561
- -DLLDB_USE_SYSTEM_DEBUGSERVER:BOOL=" ${LLDB_USE_SYSTEM_DEBUGSERVER} "
2562
- )
2563
- fi
2486
+ if [[ " $( uname -s) " == " Darwin" ]] ; then
2487
+ cmake_options+=(
2488
+ -DLLDB_CODESIGN_IDENTITY=" "
2489
+ -DLLDB_USE_SYSTEM_DEBUGSERVER:BOOL=" ${LLDB_USE_SYSTEM_DEBUGSERVER} "
2490
+ )
2564
2491
fi
2565
2492
;;
2566
2493
llbuild)
@@ -3056,34 +2983,7 @@ for host in "${ALL_HOSTS[@]}"; do
3056
2983
swift_build_dir=$( build_directory ${host} swift)
3057
2984
module_cache=" ${build_dir} /module-cache"
3058
2985
3059
- using_xcodebuild=" FALSE"
3060
- if [[ " $( uname -s) " == " Darwin" && " $( true_false ${LLDB_BUILD_WITH_XCODE} ) " == " TRUE" ]] ; then
3061
- using_xcodebuild=" TRUE"
3062
- fi
3063
-
3064
-
3065
- # Run the unittests.
3066
- # FIXME: The xcode build project currently doesn't know how to run the lit style tests.
3067
- if [[ " $using_xcodebuild " == " TRUE" ]] ; then
3068
- set_lldb_xcodebuild_options
3069
- set_lldb_build_mode
3070
- # Run the LLDB unittests (gtests).
3071
- with_pushd ${LLDB_SOURCE_DIR} \
3072
- call xcodebuild -scheme lldb-gtest -configuration ${LLDB_BUILD_MODE} ${lldb_xcodebuild_options[@]}
3073
- rc=$?
3074
- if [[ " $rc " -ne 0 ]] ; then
3075
- >&2 echo " error: LLDB gtests failed"
3076
- exit 1
3077
- fi
3078
- fi
3079
-
3080
- # Setup lldb executable path
3081
- if [[ " $using_xcodebuild " == " TRUE" ]] ; then
3082
- lldb_executable=" ${lldb_build_dir} " /${LLDB_BUILD_MODE} /lldb
3083
- else
3084
- lldb_executable=" ${lldb_build_dir} " /bin/lldb
3085
- fi
3086
-
2986
+ lldb_executable=" ${lldb_build_dir} " /bin/lldb
3087
2987
results_dir=" ${lldb_build_dir} /test-results"
3088
2988
3089
2989
# Handle test results formatter
@@ -3156,10 +3056,6 @@ for host in "${ALL_HOSTS[@]}"; do
3156
3056
fi
3157
3057
call mkdir -p " ${results_dir} "
3158
3058
3159
- if [[ " $using_xcodebuild " == " TRUE" ]] ; then
3160
- LLDB_DOTEST_CC_OPTS=" ${LLDB_DOTEST_CC_OPTS} --filecheck $( build_directory $LOCAL_HOST llvm) /bin/FileCheck --dsymutil $( build_directory $LOCAL_HOST llvm) /bin/dsymutil"
3161
- fi
3162
-
3163
3059
# Prefer to use lldb-dotest, as building it guarantees that we build all
3164
3060
# test dependencies. Ultimately we want to delete as much lldb-specific logic
3165
3061
# from this file as possible and just have a single call to lldb-dotest.
@@ -3169,65 +3065,32 @@ for host in "${ALL_HOSTS[@]}"; do
3169
3065
LLVM_LIT_ARGS=" ${LLVM_LIT_ARGS} -j $( sysctl hw.physicalcpu | awk -v N=${BUILD_JOBS} ' { print (N < $2) ? N : $2 }' ) "
3170
3066
fi
3171
3067
3172
- if [[ " $( true_false ${LLDB_TEST_SWIFT_ONLY} ) " == " TRUE" ]]; then
3173
- LLVM_LIT_ARGS=" ${LLVM_LIT_ARGS} --filter=[sS]wift"
3174
- fi
3068
+ if [[ " $( true_false ${LLDB_TEST_SWIFT_ONLY} ) " == " TRUE" ]]; then
3069
+ LLVM_LIT_ARGS=" ${LLVM_LIT_ARGS} --filter=[sS]wift"
3070
+ fi
3175
3071
3176
3072
# Record the times test took and report the slowest.
3177
3073
LLVM_LIT_ARGS=" ${LLVM_LIT_ARGS} -v --time-tests"
3178
- if [[ " $using_xcodebuild " == " FALSE" ]] ; then
3179
- with_pushd ${lldb_build_dir} \
3180
- call ${NINJA_BIN} -j ${BUILD_JOBS} unittests/LLDBUnitTests
3181
- with_pushd ${lldb_build_dir} \
3182
- call ${NINJA_BIN} -j ${BUILD_JOBS} lldb-test-deps
3074
+ with_pushd ${lldb_build_dir} \
3075
+ call ${NINJA_BIN} -j ${BUILD_JOBS} unittests/LLDBUnitTests
3076
+ with_pushd ${lldb_build_dir} \
3077
+ call ${NINJA_BIN} -j ${BUILD_JOBS} lldb-test-deps
3078
+ with_pushd ${results_dir} \
3079
+ call " ${llvm_build_dir} /bin/llvm-lit" \
3080
+ " ${lldb_build_dir} /lit" \
3081
+ ${LLVM_LIT_ARGS} \
3082
+ --xunit-xml-output=${results_dir} /results.xml \
3083
+ --param dotest-args=" --build-dir ${lldb_build_dir} /lldb-test-build.noindex ${LLDB_TEST_SUBDIR_CLAUSE} ${LLDB_TEST_CATEGORIES} -t -E \" ${DOTEST_EXTRA} \" "
3084
+ if [[ -x " ${LLDB_TEST_SWIFT_COMPATIBILITY} " ]] ; then
3085
+ echo " Running LLDB swift compatibility tests against" \
3086
+ " ${LLDB_TEST_SWIFT_COMPATIBILITY} "
3183
3087
with_pushd ${results_dir} \
3184
- call " ${llvm_build_dir} /bin/llvm-lit" \
3185
- " ${lldb_build_dir} /lit" \
3186
- ${LLVM_LIT_ARGS} \
3187
- --xunit-xml-output=${results_dir} /results.xml \
3188
- --param dotest-args=" --build-dir ${lldb_build_dir} /lldb-test-build.noindex ${LLDB_TEST_SUBDIR_CLAUSE} ${LLDB_TEST_CATEGORIES} -t -E \" ${DOTEST_EXTRA} \" "
3189
- if [[ -x " ${LLDB_TEST_SWIFT_COMPATIBILITY} " ]] ; then
3190
- echo " Running LLDB swift compatibility tests against" \
3191
- " ${LLDB_TEST_SWIFT_COMPATIBILITY} "
3192
- with_pushd ${results_dir} \
3193
- call " ${llvm_build_dir} /bin/llvm-lit" \
3194
- " ${lldb_build_dir} /lit" \
3195
- ${LLVM_LIT_ARGS} \
3196
- --xunit-xml-output=${results_dir} /results.xml \
3197
- --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
3198
- fi
3199
- else
3200
- with_pushd " ${results_dir} " \
3201
- call env SWIFTC=" $( build_directory $LOCAL_HOST swift) /bin/swiftc" \
3202
- SWIFTLIBS=" ${swift_build_dir} /lib/swift" \
3203
- " ${LLDB_SOURCE_DIR} " /test/dotest.py \
3204
- --executable " ${lldb_executable} " \
3205
- ${LLDB_TEST_DEBUG_SERVER} \
3206
- ${LLDB_TEST_SUBDIR_CLAUSE} \
3207
- ${LLDB_TEST_CATEGORIES} \
3208
- ${LLDB_DOTEST_CC_OPTS} \
3209
- ${LLDB_FORMATTER_OPTS} \
3210
- --build-dir " ${lldb_build_dir} /lldb-test-build.noindex" \
3211
- -t -E " ${DOTEST_EXTRA} "
3212
- if [[ -x " ${LLDB_TEST_SWIFT_COMPATIBILITY} " ]] ; then
3213
- echo " Running LLDB swift compatibility tests against" \
3214
- " ${LLDB_TEST_SWIFT_COMPATIBILITY} "
3215
- call env SWIFTC=" $( build_directory $LOCAL_HOST swift) /bin/swiftc" \
3216
- SWIFTLIBS=" ${swift_build_dir} /lib/swift" \
3217
- " ${LLDB_SOURCE_DIR} " /test/dotest.py \
3218
- --executable " ${lldb_executable} " \
3219
- ${LLDB_TEST_DEBUG_SERVER} \
3220
- ${LLDB_TEST_SUBDIR_CLAUSE} \
3221
- ${LLDB_TEST_CATEGORIES} \
3222
- ${LLDB_DOTEST_CC_OPTS} \
3223
- ${LLDB_FORMATTER_OPTS} \
3224
- --build-dir " ${lldb_build_dir} /lldb-test-build.noindex" \
3225
- -G swift-history \
3226
- --swift-compiler " ${LLDB_TEST_SWIFT_COMPATIBILITY} " \
3227
- -t -E " ${DOTEST_EXTRA} "
3228
- fi
3088
+ call " ${llvm_build_dir} /bin/llvm-lit" \
3089
+ " ${lldb_build_dir} /lit" \
3090
+ ${LLVM_LIT_ARGS} \
3091
+ --xunit-xml-output=${results_dir} /results.xml \
3092
+ --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
3229
3093
fi
3230
-
3231
3094
continue
3232
3095
;;
3233
3096
llbuild)
@@ -3575,25 +3438,6 @@ for host in "${ALL_HOSTS[@]}"; do
3575
3438
echo " --install-destdir is required to install products."
3576
3439
exit 1
3577
3440
fi
3578
- if [[ " $using_xcodebuild " == " TRUE" ]] ; then
3579
- case ${host} in
3580
- linux-* )
3581
- ;;
3582
- freebsd-* )
3583
- ;;
3584
- cygwin-* )
3585
- ;;
3586
- haiku-* )
3587
- ;;
3588
- macosx-* )
3589
- set_lldb_xcodebuild_options
3590
- set_lldb_build_mode
3591
- with_pushd ${LLDB_SOURCE_DIR} \
3592
- call xcodebuild -target toolchain -configuration ${LLDB_BUILD_MODE} install ${lldb_xcodebuild_options[@]} DSTROOT=" ${host_install_destdir} " LLDB_TOOLCHAIN_PREFIX=" ${TOOLCHAIN_PREFIX} "
3593
- continue
3594
- ;;
3595
- esac
3596
- fi
3597
3441
;;
3598
3442
swiftpm)
3599
3443
if [[ -z " ${INSTALL_SWIFTPM} " ]] ; then
0 commit comments