Skip to content

Commit cb40916

Browse files
authored
Merge pull request #3642 from dgrove-oss/dispatch-build-variant
2 parents 814c3d7 + 3663842 commit cb40916

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

utils/build-script

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,7 @@ class BuildScriptInvocation(object):
575575
"--swift-stdlib-build-type", args.swift_stdlib_build_variant,
576576
"--lldb-build-type", args.lldb_build_variant,
577577
"--foundation-build-type", args.foundation_build_variant,
578+
"--libdispatch-build-type", args.libdispatch_build_variant,
578579
"--xctest-build-type", args.build_variant,
579580
"--llvm-enable-assertions", str(args.llvm_assertions).lower(),
580581
"--swift-enable-assertions", str(args.swift_assertions).lower(),

utils/build-script-impl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ KNOWN_SETTINGS=(
7272
lldb-build-type "Debug" "the CMake build variant for LLDB"
7373
llbuild-build-type "Debug" "the CMake build variant for llbuild"
7474
foundation-build-type "Debug" "the build variant for Foundation"
75+
libdispatch-build-type "Debug" "the build variant for libdispatch"
7576
playgroundlogger-build-type "Debug" "the build variant for PlaygroundLogger"
7677
playgroundsupport-build-type "Debug" "the build variant for PlaygroundSupport"
7778
xctest-build-type "Debug" "the build variant for xctest"
@@ -1466,7 +1467,7 @@ function build_directory_bin() {
14661467
echo "${root}/${FOUNDATION_BUILD_TYPE}/bin"
14671468
;;
14681469
libdispatch)
1469-
echo "${root}/bin"
1470+
echo "${root}/${LIBDISPATCH_BUILD_TYPE}/bin"
14701471
;;
14711472
playgroundlogger)
14721473
# FIXME: var name for build type
@@ -2255,12 +2256,20 @@ for host in "${ALL_HOSTS[@]}"; do
22552256

22562257
if [[ ! -f "${LIBDISPATCH_BUILD_DIR}"/config.status ]]; then
22572258
# First time building; need to run autotools and configure
2259+
if [[ "$LIBDISPATCH_BUILD_TYPE" == "Release" ]] ; then
2260+
dispatch_build_variant_arg="release"
2261+
elif [[ "$LIBDISPATCH_BUILD_TYPE" == "RelWithDebInfo" ]]; then
2262+
dispatch_build_variant_arg="releasedebuginfo"
2263+
else
2264+
dispatch_build_variant_arg="debug"
2265+
fi
22582266
call mkdir -p "${LIBDISPATCH_BUILD_DIR}"
22592267
with_pushd "${LIBDISPATCH_SOURCE_DIR}" \
22602268
call autoreconf -fvi
22612269
with_pushd "${LIBDISPATCH_BUILD_DIR}" \
22622270
call env CC="${LLVM_BIN}/clang" CXX="${LLVM_BIN}/clang++" SWIFTC="${SWIFTC_BIN}" \
22632271
"${LIBDISPATCH_SOURCE_DIR}"/configure --with-swift-toolchain="${SWIFT_BUILD_PATH}" \
2272+
--with-build-variant=$dispatch_build_variant_arg \
22642273
--prefix="$(get_host_install_destdir ${host})$(get_host_install_prefix ${host})"
22652274

22662275
fi

0 commit comments

Comments
 (0)