Skip to content

Commit 769f127

Browse files
committed
Fix Makefile builds
This commit fixes two problems exposed by Makefile builds (-m): (1) the cmark library directory is wrong and (2) the COMMON_CMAKE_OPTIONS are not quoted when building swift (thus "Unix Makefiles" ends up as two command line arguments). Tested by building for Ninja (default), Make (-m), and XCode (-x).
1 parent 872dc69 commit 769f127

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utils/build-script-impl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,7 +1454,7 @@ for deployment_target in "${NATIVE_TOOLS_DEPLOYMENT_TARGETS[@]}" "${CROSS_TOOLS_
14541454
-D${PRODUCT}_PATH_TO_CMARK_BUILD:PATH="$(build_directory $deployment_target cmark)"
14551455
)
14561456

1457-
if [[ "${CMAKE_GENERATOR}" != "Ninja" ]] ; then
1457+
if [[ "${CMAKE_GENERATOR}" == "Xcode" ]] ; then
14581458
swift_cmake_options=(
14591459
"${swift_cmake_options[@]-}"
14601460
-D${PRODUCT}_CMARK_LIBRARY_DIR:PATH=$(build_directory $deployment_target cmark)/src/$CMARK_BUILD_TYPE
@@ -1521,7 +1521,7 @@ for deployment_target in "${NATIVE_TOOLS_DEPLOYMENT_TARGETS[@]}" "${CROSS_TOOLS_
15211521
;;
15221522

15231523
swift)
1524-
cmake_options=(${COMMON_CMAKE_OPTIONS[@]})
1524+
cmake_options=("${COMMON_CMAKE_OPTIONS[@]}")
15251525
if [[ "$USE_GOLD_LINKER" ]]; then
15261526
# Swift will selectively use the gold linker on all
15271527
# parts except building the standard library. We

0 commit comments

Comments
 (0)