@@ -1564,32 +1564,8 @@ for deployment_target in "${HOST_TARGET}" "${CROSS_TOOLS_DEPLOYMENT_TARGETS[@]}"
1564
1564
echo " ${product} : using standard linker"
1565
1565
fi
1566
1566
1567
- PRODUCT=$( toupper ${product} )
1568
1567
llvm_build_dir=$( build_directory ${deployment_target} llvm)
1569
1568
module_cache=" ${build_dir} /module-cache"
1570
- swift_cmake_options=(
1571
- " ${swift_cmake_options[@]} "
1572
- -DCMAKE_INSTALL_PREFIX:PATH=" ${INSTALL_PREFIX} "
1573
- -DLLVM_CONFIG:PATH=" $( build_directory_bin ${deployment_target} llvm) /llvm-config"
1574
- -D${PRODUCT} _PATH_TO_CLANG_SOURCE:PATH=" ${CLANG_SOURCE_DIR} "
1575
- -D${PRODUCT} _PATH_TO_CLANG_BUILD:PATH=" ${llvm_build_dir} "
1576
- -D${PRODUCT} _PATH_TO_LLVM_SOURCE:PATH=" ${LLVM_SOURCE_DIR} "
1577
- -D${PRODUCT} _PATH_TO_LLVM_BUILD:PATH=" ${llvm_build_dir} "
1578
- -D${PRODUCT} _PATH_TO_CMARK_SOURCE:PATH=" ${CMARK_SOURCE_DIR} "
1579
- -D${PRODUCT} _PATH_TO_CMARK_BUILD:PATH=" $( build_directory ${deployment_target} cmark) "
1580
- )
1581
-
1582
- if [[ " ${CMAKE_GENERATOR} " == " Xcode" ]] ; then
1583
- swift_cmake_options=(
1584
- " ${swift_cmake_options[@]-} "
1585
- -D${PRODUCT} _CMARK_LIBRARY_DIR:PATH=$( build_directory ${deployment_target} cmark) /src/${CMARK_BUILD_TYPE}
1586
- )
1587
- else
1588
- swift_cmake_options=(
1589
- " ${swift_cmake_options[@]-} "
1590
- -D${PRODUCT} _CMARK_LIBRARY_DIR:PATH=$( build_directory ${deployment_target} cmark) /src
1591
- )
1592
- fi
1593
1569
1594
1570
case ${product} in
1595
1571
cmark)
@@ -1747,8 +1723,32 @@ for deployment_target in "${HOST_TARGET}" "${CROSS_TOOLS_DEPLOYMENT_TARGETS[@]}"
1747
1723
-DSWIFT_ENABLE_LTO:BOOL=$( true_false " ${SWIFT_ENABLE_LTO} " )
1748
1724
-DSWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER:BOOL=$( true_false " ${BUILD_RUNTIME_WITH_HOST_COMPILER} " )
1749
1725
" ${swift_cmake_options[@]} "
1750
- " ${SWIFT_SOURCE_DIR} "
1751
1726
)
1727
+
1728
+ cmake_options=(
1729
+ " ${cmake_options[@]} "
1730
+ -DCMAKE_INSTALL_PREFIX:PATH=" ${INSTALL_PREFIX} "
1731
+ -DLLVM_CONFIG:PATH=" $( build_directory_bin ${deployment_target} llvm) /llvm-config"
1732
+ -DSWIFT_PATH_TO_CLANG_SOURCE:PATH=" ${CLANG_SOURCE_DIR} "
1733
+ -DSWIFT_PATH_TO_CLANG_BUILD:PATH=" ${llvm_build_dir} "
1734
+ -DSWIFT_PATH_TO_LLVM_SOURCE:PATH=" ${LLVM_SOURCE_DIR} "
1735
+ -DSWIFT_PATH_TO_LLVM_BUILD:PATH=" ${llvm_build_dir} "
1736
+ -DSWIFT_PATH_TO_CMARK_SOURCE:PATH=" ${CMARK_SOURCE_DIR} "
1737
+ -DSWIFT_PATH_TO_CMARK_BUILD:PATH=" $( build_directory ${deployment_target} cmark) "
1738
+ )
1739
+
1740
+ if [[ " ${CMAKE_GENERATOR} " == " Xcode" ]] ; then
1741
+ cmake_options=(
1742
+ " ${cmake_options[@]} "
1743
+ -DSWIFT_CMARK_LIBRARY_DIR:PATH=$( build_directory ${deployment_target} cmark) /src/${CMARK_BUILD_TYPE}
1744
+ )
1745
+ else
1746
+ cmake_options=(
1747
+ " ${cmake_options[@]} "
1748
+ -DSWIFT_CMARK_LIBRARY_DIR:PATH=$( build_directory ${deployment_target} cmark) /src
1749
+ )
1750
+ fi
1751
+
1752
1752
if [[ " ${SWIFT_SDKS} " ]] ; then
1753
1753
cmake_options=(
1754
1754
" ${cmake_options[@]} "
@@ -1773,6 +1773,12 @@ for deployment_target in "${HOST_TARGET}" "${CROSS_TOOLS_DEPLOYMENT_TARGETS[@]}"
1773
1773
build_targets=(" ${build_targets[@]} "
1774
1774
" ${SWIFT_BENCHMARK_TARGETS[@]} " )
1775
1775
fi
1776
+
1777
+ cmake_options=(
1778
+ " ${cmake_options[@]} "
1779
+ " ${SWIFT_SOURCE_DIR} "
1780
+ )
1781
+
1776
1782
skip_build=${SKIP_BUILD_SWIFT}
1777
1783
;;
1778
1784
lldb)
0 commit comments