From 6115d00d82dc34f9589d8b5fbed9ce4c659c2c49 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Thu, 14 Sep 2023 10:52:16 -0700 Subject: [PATCH 01/10] build: enable macros during the build Use WiX to extract a future toolchain to allow building the macros support when building the toolchain. We build swift-syntax and now wire that into the build itself. --- utils/build-windows-toolchain.bat | 61 +++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/utils/build-windows-toolchain.bat b/utils/build-windows-toolchain.bat index 77eb0d8e9454e..17595c0ca639a 100644 --- a/utils/build-windows-toolchain.bat +++ b/utils/build-windows-toolchain.bat @@ -54,6 +54,8 @@ del /f /q "%UniversalCRTSdkDir%\Include\%UCRTVersion%\um\module.modulemap" del /f /q "%VCToolsInstallDir%\include\module.modulemap" del /f /q "%VCToolsInstallDir%\include\vcruntime.apinotes" +call :FetchWiX || (exit /b) +call :FetchX64Toolchain || (exit /b) call :CloneDependencies || (exit /b) call :CloneRepositories || (exit /b) @@ -190,6 +192,33 @@ cmake ^ cmake --build "%BuildRoot%\curl" || (exit /b) cmake --build "%BuildRoot%\curl" --target install || (exit /b) +path %BuildRoot%\toolchains\swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a\PFiles64\Swift\Runtimes\0.0.0\usr\bin;%BuildRoot%\toolchains\swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a\PFiles64\Swift\Toolchains\0.0.0+Asserts\usr\bin;%Path% + +:: Build Swift Syntax +cmake ^ + -B "%BuildRoot%\99" ^ + + -D BUILD_SHARED_LIBS=YES ^ + -D CMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^ + -D CMAKE_C_COMPILER=cl.exe ^ + -D CMAKE_C_FLAGS="/GS- /Oy /Gw /Gy" ^ + -D CMAKE_CXX_COMPILER=cl ^ + -D CMAKE_CXX_FLAGS="/GS- /Oy /Gw /Gy" ^ + -D CMAKE_MT=mt ^ + -D CMAKE_Swift_COMPILER=%BuildRoot%/toolchains/swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a/PFiles64/Swift/Toolchains/0.0.0+Asserts/usr/bin/swiftc.exe ^ + -D CMAKE_Swift_FLAGS="-sdk %BuildRoot%/toolchains/swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a/PFiles64/Swift/Platforms/Windows.platform/Developer/SDKs/Windows.sdk" ^ + -D CMAKE_EXE_LINKER_FLAGS="/INCREMENTAL:NO" ^ + -D CMAKE_SHARED_LINKER_FLAGS="/INCREMENTAL:NO" ^ + + -D CMAKE_INSTALL_PREFIX="%InstallRoot%" ^ + + -D SWIFT_SYNTAX_ENABLE_WMO_PRE_3_26=YES ^ + + -G Ninja ^ + -S %SourceRoot%\swift-syntax || (exit /b) +cmake --build %BuildRoot%\99 || (exit /b) +cmake --build %BuildRoot%\99 --target install || (exit /b) + :: Build Toolchain cmake ^ -B "%BuildRoot%\1" ^ @@ -207,11 +236,17 @@ cmake ^ -D CMAKE_INSTALL_PREFIX="%InstallRoot%" ^ + -D CMAKE_Swift_COMPILER="%BuildRoot%/toolchains/swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a/PFiles64/Swift/Toolchains/0.0.0+Asserts/usr/bin/swiftc.exe" ^ + -D CMAKE_Swift_FLAGS="-sdk %BuildRoot%/toolchains/swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a/PFiles64/Swift/Platforms/Windows.platform/Developer/SDKs/Windows.sdk" ^ + -D LLVM_DEFAULT_TARGET_TRIPLE=x86_64-unknown-windows-msvc ^ -D PACKAGE_VENDOR="swift.org" ^ -D CLANG_VENDOR="swift.org" ^ -D CLANG_VENDOR_UTI="org.swift" ^ + -D LLDB_PYTHON_EXE_RELATIVE_PATH=python.exe ^ + -D LLDB_PYTHON_EXT_SUFFIX=.pyd ^ + -D LLDB_PYTHON_RELATIVE_PATH=lib/site-packages ^ -D LLVM_APPEND_VC_REV=NO ^ -D LLVM_VERSION_SUFFIX="" ^ @@ -226,9 +261,11 @@ cmake ^ -D LLVM_EXTERNAL_CMARK_SOURCE_DIR="%SourceRoot%\cmark" ^ -D PYTHON_HOME=%PYTHON_HOME% ^ -D PYTHON_EXECUTABLE=%PYTHON_HOME%\python.exe ^ + -D SWIFT_PATH_TO_EARLYSWIFTSYNTAX_BUILD_DIR="%BuildRoot%\99" ^ -D SWIFT_PATH_TO_LIBDISPATCH_SOURCE="%SourceRoot%\swift-corelibs-libdispatch" ^ -D SWIFT_PATH_TO_SWIFT_SYNTAX_SOURCE="%SourceRoot%\swift-syntax" ^ -D SWIFT_PATH_TO_STRING_PROCESSING_SOURCE=%SourceRoot%\swift-experimental-string-processing ^ + -D SWIFT_PATH_TO_SWIFT_SDK="%BuildRoot%/toolchains/swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a/PFiles64/Swift/Platforms/Windows.platform/Developer/SDKs/Windows.sdk" -G Ninja ^ -S llvm-project\llvm || (exit /b) @@ -815,6 +852,30 @@ git clone --quiet --no-tags --depth 1 --branch curl-7_77_0 https://github.com/cu goto :eof endlocal +:FetchWiX +setlocal enableextensions enabledelayedexpansion + +curl.exe -sL https://www.nuget.org/api/v2/package/wix/4.0.1 -o wix-4.0.1.zip +md WiX-4.0.1 || exit (/b) +cd WiX-4.0.1 || exit (/b) +tar -xf ../wix-4.0.1.zip || exit (/b) + +goto :eof +endlocal + +:FetchX64Toolchain +setlocal enableextensions enabledelayedexpansion + +curl.exe -k -sOL "https://download.swift.org/development/windows10/swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a/swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a-windows10.exe" || (exit /b) +"WiX-4.0.1\tools\net6.0\any\wix.exe" burn extract swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a-windows10.exe -o %BuildRoot%\toolchains || (exit /b) +msiexec.exe /qn /a "%BuildRoot%\toolchains\a0" TARGETDIR="%BuildRoot%\toolchains\swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a\PFiles64\Swift\Runtimes\0.0.0\usr\bin\" || (exit /b) +msiexec.exe /qn /a "%BuildRoot%\toolchains\a1" TARGETDIR="%BuildRoot%\toolchains\swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a\" || (exit /b) +msiexec.exe /qn /a "%BuildRoot%\toolchains\a2" TARGETDIR="%BuildRoot%\toolchains\swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a\" || (exit /b) +msiexec.exe /qn /a "%BuildRoot%\toolchains\a5" TARGETDIR="%BuildRoot%\toolchains\swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a\" || (exit /b) + +goto :eof +endlocal + :TestSwift setlocal enableextensions enabledelayedexpansion From edb3817589f4db1f93d6872df6b05985d88eeb6b Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Fri, 15 Sep 2023 07:13:09 -0700 Subject: [PATCH 02/10] Update build-windows-toolchain.bat --- utils/build-windows-toolchain.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/build-windows-toolchain.bat b/utils/build-windows-toolchain.bat index 17595c0ca639a..1141d149d4256 100644 --- a/utils/build-windows-toolchain.bat +++ b/utils/build-windows-toolchain.bat @@ -265,7 +265,7 @@ cmake ^ -D SWIFT_PATH_TO_LIBDISPATCH_SOURCE="%SourceRoot%\swift-corelibs-libdispatch" ^ -D SWIFT_PATH_TO_SWIFT_SYNTAX_SOURCE="%SourceRoot%\swift-syntax" ^ -D SWIFT_PATH_TO_STRING_PROCESSING_SOURCE=%SourceRoot%\swift-experimental-string-processing ^ - -D SWIFT_PATH_TO_SWIFT_SDK="%BuildRoot%/toolchains/swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a/PFiles64/Swift/Platforms/Windows.platform/Developer/SDKs/Windows.sdk" + -D SWIFT_PATH_TO_SWIFT_SDK="%BuildRoot%/toolchains/swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a/PFiles64/Swift/Platforms/Windows.platform/Developer/SDKs/Windows.sdk" ^ -G Ninja ^ -S llvm-project\llvm || (exit /b) From cf578c505296322f499c28ca607aa17564b7028a Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Tue, 19 Sep 2023 09:49:17 -0700 Subject: [PATCH 03/10] Update build-windows-toolchain.bat --- utils/build-windows-toolchain.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/build-windows-toolchain.bat b/utils/build-windows-toolchain.bat index 1141d149d4256..9472371642649 100644 --- a/utils/build-windows-toolchain.bat +++ b/utils/build-windows-toolchain.bat @@ -209,11 +209,11 @@ cmake ^ -D CMAKE_Swift_FLAGS="-sdk %BuildRoot%/toolchains/swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a/PFiles64/Swift/Platforms/Windows.platform/Developer/SDKs/Windows.sdk" ^ -D CMAKE_EXE_LINKER_FLAGS="/INCREMENTAL:NO" ^ -D CMAKE_SHARED_LINKER_FLAGS="/INCREMENTAL:NO" ^ + -D CMAKE_Swift_FLAGS_RELEASE="-O" ^ + -D CMAKE_Swift_FLAGS_RELWITHDEBINFO="-O" ^ -D CMAKE_INSTALL_PREFIX="%InstallRoot%" ^ - -D SWIFT_SYNTAX_ENABLE_WMO_PRE_3_26=YES ^ - -G Ninja ^ -S %SourceRoot%\swift-syntax || (exit /b) cmake --build %BuildRoot%\99 || (exit /b) From 5e50d1d07f7ecd5a735434e764ed4118f9dc39a2 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Tue, 19 Sep 2023 15:00:02 -0700 Subject: [PATCH 04/10] Update build-windows-toolchain.bat try a more recent toolchain --- utils/build-windows-toolchain.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/build-windows-toolchain.bat b/utils/build-windows-toolchain.bat index 9472371642649..d72e3b3079d3c 100644 --- a/utils/build-windows-toolchain.bat +++ b/utils/build-windows-toolchain.bat @@ -866,7 +866,7 @@ endlocal :FetchX64Toolchain setlocal enableextensions enabledelayedexpansion -curl.exe -k -sOL "https://download.swift.org/development/windows10/swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a/swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a-windows10.exe" || (exit /b) +curl.exe -k -sOL "https://github.com/thebrowsercompany/swift-build/releases/download/20230919.2/installer-amd64.exe" || (exit /b) "WiX-4.0.1\tools\net6.0\any\wix.exe" burn extract swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a-windows10.exe -o %BuildRoot%\toolchains || (exit /b) msiexec.exe /qn /a "%BuildRoot%\toolchains\a0" TARGETDIR="%BuildRoot%\toolchains\swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a\PFiles64\Swift\Runtimes\0.0.0\usr\bin\" || (exit /b) msiexec.exe /qn /a "%BuildRoot%\toolchains\a1" TARGETDIR="%BuildRoot%\toolchains\swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a\" || (exit /b) From 3254b63103bf732bb41a403fc00ddd2947655214 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Tue, 19 Sep 2023 15:48:01 -0700 Subject: [PATCH 05/10] Update build-windows-toolchain.bat --- utils/build-windows-toolchain.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/build-windows-toolchain.bat b/utils/build-windows-toolchain.bat index d72e3b3079d3c..190bc6b15e694 100644 --- a/utils/build-windows-toolchain.bat +++ b/utils/build-windows-toolchain.bat @@ -867,7 +867,7 @@ endlocal setlocal enableextensions enabledelayedexpansion curl.exe -k -sOL "https://github.com/thebrowsercompany/swift-build/releases/download/20230919.2/installer-amd64.exe" || (exit /b) -"WiX-4.0.1\tools\net6.0\any\wix.exe" burn extract swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a-windows10.exe -o %BuildRoot%\toolchains || (exit /b) +"WiX-4.0.1\tools\net6.0\any\wix.exe" burn extract installer-amd64.exe -o %BuildRoot%\toolchains || (exit /b) msiexec.exe /qn /a "%BuildRoot%\toolchains\a0" TARGETDIR="%BuildRoot%\toolchains\swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a\PFiles64\Swift\Runtimes\0.0.0\usr\bin\" || (exit /b) msiexec.exe /qn /a "%BuildRoot%\toolchains\a1" TARGETDIR="%BuildRoot%\toolchains\swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a\" || (exit /b) msiexec.exe /qn /a "%BuildRoot%\toolchains\a2" TARGETDIR="%BuildRoot%\toolchains\swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a\" || (exit /b) From 70f88292539ccd687417c1cbe924a5e907a628fc Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Wed, 20 Sep 2023 10:15:55 -0700 Subject: [PATCH 06/10] Update build-windows-toolchain.bat --- utils/build-windows-toolchain.bat | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/utils/build-windows-toolchain.bat b/utils/build-windows-toolchain.bat index 190bc6b15e694..1fdf4273eba1b 100644 --- a/utils/build-windows-toolchain.bat +++ b/utils/build-windows-toolchain.bat @@ -192,7 +192,7 @@ cmake ^ cmake --build "%BuildRoot%\curl" || (exit /b) cmake --build "%BuildRoot%\curl" --target install || (exit /b) -path %BuildRoot%\toolchains\swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a\PFiles64\Swift\Runtimes\0.0.0\usr\bin;%BuildRoot%\toolchains\swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a\PFiles64\Swift\Toolchains\0.0.0+Asserts\usr\bin;%Path% +path %BuildRoot%\toolchains\5.9.0\PFiles64\Swift\runtime-development\usr\bin;%BuildRoot%\toolchains\5.9.0\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin;%Path% :: Build Swift Syntax cmake ^ @@ -205,8 +205,8 @@ cmake ^ -D CMAKE_CXX_COMPILER=cl ^ -D CMAKE_CXX_FLAGS="/GS- /Oy /Gw /Gy" ^ -D CMAKE_MT=mt ^ - -D CMAKE_Swift_COMPILER=%BuildRoot%/toolchains/swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a/PFiles64/Swift/Toolchains/0.0.0+Asserts/usr/bin/swiftc.exe ^ - -D CMAKE_Swift_FLAGS="-sdk %BuildRoot%/toolchains/swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a/PFiles64/Swift/Platforms/Windows.platform/Developer/SDKs/Windows.sdk" ^ + -D CMAKE_Swift_COMPILER=%BuildRoot%/toolchains/5.9.0/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/swiftc.exe ^ + -D CMAKE_Swift_FLAGS="-sdk %BuildRoot%/toolchains/5.9.0/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk" ^ -D CMAKE_EXE_LINKER_FLAGS="/INCREMENTAL:NO" ^ -D CMAKE_SHARED_LINKER_FLAGS="/INCREMENTAL:NO" ^ -D CMAKE_Swift_FLAGS_RELEASE="-O" ^ @@ -236,8 +236,8 @@ cmake ^ -D CMAKE_INSTALL_PREFIX="%InstallRoot%" ^ - -D CMAKE_Swift_COMPILER="%BuildRoot%/toolchains/swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a/PFiles64/Swift/Toolchains/0.0.0+Asserts/usr/bin/swiftc.exe" ^ - -D CMAKE_Swift_FLAGS="-sdk %BuildRoot%/toolchains/swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a/PFiles64/Swift/Platforms/Windows.platform/Developer/SDKs/Windows.sdk" ^ + -D CMAKE_Swift_COMPILER="%BuildRoot%/toolchains/5.9.0/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/swiftc.exe" ^ + -D CMAKE_Swift_FLAGS="-sdk %BuildRoot%/toolchains/5.9.0/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk" ^ -D LLVM_DEFAULT_TARGET_TRIPLE=x86_64-unknown-windows-msvc ^ @@ -265,7 +265,7 @@ cmake ^ -D SWIFT_PATH_TO_LIBDISPATCH_SOURCE="%SourceRoot%\swift-corelibs-libdispatch" ^ -D SWIFT_PATH_TO_SWIFT_SYNTAX_SOURCE="%SourceRoot%\swift-syntax" ^ -D SWIFT_PATH_TO_STRING_PROCESSING_SOURCE=%SourceRoot%\swift-experimental-string-processing ^ - -D SWIFT_PATH_TO_SWIFT_SDK="%BuildRoot%/toolchains/swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a/PFiles64/Swift/Platforms/Windows.platform/Developer/SDKs/Windows.sdk" ^ + -D SWIFT_PATH_TO_SWIFT_SDK="%BuildRoot%/toolchains/5.9.0/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk" ^ -G Ninja ^ -S llvm-project\llvm || (exit /b) @@ -866,12 +866,14 @@ endlocal :FetchX64Toolchain setlocal enableextensions enabledelayedexpansion -curl.exe -k -sOL "https://github.com/thebrowsercompany/swift-build/releases/download/20230919.2/installer-amd64.exe" || (exit /b) -"WiX-4.0.1\tools\net6.0\any\wix.exe" burn extract installer-amd64.exe -o %BuildRoot%\toolchains || (exit /b) -msiexec.exe /qn /a "%BuildRoot%\toolchains\a0" TARGETDIR="%BuildRoot%\toolchains\swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a\PFiles64\Swift\Runtimes\0.0.0\usr\bin\" || (exit /b) -msiexec.exe /qn /a "%BuildRoot%\toolchains\a1" TARGETDIR="%BuildRoot%\toolchains\swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a\" || (exit /b) -msiexec.exe /qn /a "%BuildRoot%\toolchains\a2" TARGETDIR="%BuildRoot%\toolchains\swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a\" || (exit /b) -msiexec.exe /qn /a "%BuildRoot%\toolchains\a5" TARGETDIR="%BuildRoot%\toolchains\swift-DEVELOPMENT-SNAPSHOT-2023-08-12-a\" || (exit /b) +curl.exe -k -sOL "https://download.swift.org/swift-5.9-release/windows10/swift-5.9-RELEASE/swift-5.9-RELEASE-windows10.exe" || (exit /b) +"WiX-4.0.1\tools\net6.0\any\wix.exe" burn extract swift-5.9-RELEASE-windows10.exe -o %BuildRoot%\toolchains || (exit /b) +msiexec.exe /qn /a "%BuildRoot%\toolchains\a0" TARGETDIR="%BuildRoot%\toolchains\5.9.0\" || (exit /b) +msiexec.exe /qn /a "%BuildRoot%\toolchains\a1" TARGETDIR="%BuildRoot%\toolchains\5.9.0\" || (exit /b) +msiexec.exe /qn /a "%BuildRoot%\toolchains\a2" TARGETDIR="%BuildRoot%\toolchains\5.9.0\" || (exit /b) +msiexec.exe /qn /a "%BuildRoot%\toolchains\a3" TARGETDIR="%BuildRoot%\toolchains\5.9.0\" || (exit /b) +msiexec.exe /qn /a "%BuildRoot%\toolchains\a4" TARGETDIR="%BuildRoot%\toolchains\5.9.0\" || (exit /b) +msiexec.exe /qn /a "%BuildRoot%\toolchains\a5" TARGETDIR="%BuildRoot%\toolchains\5.9.0\" || (exit /b) goto :eof endlocal From 890e0bc7e0fdc5ca49da1b5ec3ad32f4b984bdb4 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Wed, 20 Sep 2023 11:20:15 -0700 Subject: [PATCH 07/10] Update build-windows-toolchain.bat --- utils/build-windows-toolchain.bat | 2 -- 1 file changed, 2 deletions(-) diff --git a/utils/build-windows-toolchain.bat b/utils/build-windows-toolchain.bat index 1fdf4273eba1b..662ad04829497 100644 --- a/utils/build-windows-toolchain.bat +++ b/utils/build-windows-toolchain.bat @@ -872,8 +872,6 @@ msiexec.exe /qn /a "%BuildRoot%\toolchains\a0" TARGETDIR="%BuildRoot%\toolchains msiexec.exe /qn /a "%BuildRoot%\toolchains\a1" TARGETDIR="%BuildRoot%\toolchains\5.9.0\" || (exit /b) msiexec.exe /qn /a "%BuildRoot%\toolchains\a2" TARGETDIR="%BuildRoot%\toolchains\5.9.0\" || (exit /b) msiexec.exe /qn /a "%BuildRoot%\toolchains\a3" TARGETDIR="%BuildRoot%\toolchains\5.9.0\" || (exit /b) -msiexec.exe /qn /a "%BuildRoot%\toolchains\a4" TARGETDIR="%BuildRoot%\toolchains\5.9.0\" || (exit /b) -msiexec.exe /qn /a "%BuildRoot%\toolchains\a5" TARGETDIR="%BuildRoot%\toolchains\5.9.0\" || (exit /b) goto :eof endlocal From 35ae6d8276396a9847ddbb62bb1bb30331d65421 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Wed, 20 Sep 2023 13:22:29 -0700 Subject: [PATCH 08/10] Update lit.cfg --- test/lit.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/test/lit.cfg b/test/lit.cfg index 35d6ac55029a7..1ef32985a4b9d 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -351,6 +351,7 @@ config.gyb = make_path(config.swift_utils, 'gyb.py') config.rth = make_path(config.swift_utils, 'rth') # Resilience test helper config.scale_test = make_path(config.swift_utils, 'scale-test') config.PathSanitizingFileCheck = make_path(config.swift_utils, 'PathSanitizingFileCheck') +config.swift_bin_dir = make_path(config.swift, '..', '..', 'bin') config.swift_lib_dir = make_path(config.swift, '..', '..', 'lib') config.round_trip_syntax_test = make_path(config.swift_utils, 'round-trip-syntax-test') config.refactor_check_compiles = make_path(config.swift_utils, 'refactor-check-compiles.py') From 5582a9314f30acfe3d5667b5decb42c540e93974 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Thu, 21 Sep 2023 09:09:53 -0700 Subject: [PATCH 09/10] Update build-windows-toolchain.bat debug --- utils/build-windows-toolchain.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/build-windows-toolchain.bat b/utils/build-windows-toolchain.bat index 662ad04829497..027d2790125a9 100644 --- a/utils/build-windows-toolchain.bat +++ b/utils/build-windows-toolchain.bat @@ -882,6 +882,7 @@ setlocal enableextensions enabledelayedexpansion :: Test Swift :: TODO(compnerd) make lit adjust the path properly path %BuildRoot%\3;%BuildRoot%\1\bin;%PATH%;%SystemDrive%\Program Files\Git\usr\bin +tree %BuildRoot%\1\tools\swift\unittests\SourceKit\SwiftLang\CMakeFiles\SourceKitSwiftLangTests.dir cmake --build %BuildRoot%\1 --target check-swift || (exit /b) goto :eof From 502b0a6401a3821e5ffed9a512ecb5f09b9197da Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Thu, 21 Sep 2023 11:10:57 -0700 Subject: [PATCH 10/10] Update build-windows-toolchain.bat --- utils/build-windows-toolchain.bat | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/build-windows-toolchain.bat b/utils/build-windows-toolchain.bat index 027d2790125a9..5a2258750bfc1 100644 --- a/utils/build-windows-toolchain.bat +++ b/utils/build-windows-toolchain.bat @@ -18,7 +18,10 @@ set ProductTag= :: Identify the SourceRoot :: Normalize the SourceRoot to make it easier to read the output. cd %~dp0\..\.. -set SourceRoot=%CD% +subst S: /d +subst S: . || (exit /b) +set SourceRoot=S: +cd /d %SourceRoot% :: Identify the BuildRoot set BuildRoot=%SourceRoot%\build @@ -882,7 +885,6 @@ setlocal enableextensions enabledelayedexpansion :: Test Swift :: TODO(compnerd) make lit adjust the path properly path %BuildRoot%\3;%BuildRoot%\1\bin;%PATH%;%SystemDrive%\Program Files\Git\usr\bin -tree %BuildRoot%\1\tools\swift\unittests\SourceKit\SwiftLang\CMakeFiles\SourceKitSwiftLangTests.dir cmake --build %BuildRoot%\1 --target check-swift || (exit /b) goto :eof