From 769f1273b3895959e6d537efb3dababaa401284d Mon Sep 17 00:00:00 2001 From: Meador Inge Date: Thu, 3 Dec 2015 22:30:30 -0600 Subject: [PATCH] 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). --- utils/build-script-impl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/build-script-impl b/utils/build-script-impl index b2d2954d2bb3f..403d3fcb1d777 100755 --- a/utils/build-script-impl +++ b/utils/build-script-impl @@ -1454,7 +1454,7 @@ for deployment_target in "${NATIVE_TOOLS_DEPLOYMENT_TARGETS[@]}" "${CROSS_TOOLS_ -D${PRODUCT}_PATH_TO_CMARK_BUILD:PATH="$(build_directory $deployment_target cmark)" ) - if [[ "${CMAKE_GENERATOR}" != "Ninja" ]] ; then + if [[ "${CMAKE_GENERATOR}" == "Xcode" ]] ; then swift_cmake_options=( "${swift_cmake_options[@]-}" -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_ ;; swift) - cmake_options=(${COMMON_CMAKE_OPTIONS[@]}) + cmake_options=("${COMMON_CMAKE_OPTIONS[@]}") if [[ "$USE_GOLD_LINKER" ]]; then # Swift will selectively use the gold linker on all # parts except building the standard library. We