Skip to content

Commit 6ec9c21

Browse files
CodaFicompnerd
authored andcommitted
Clone swift-syntax Alongside Swift
swift-syntax is going to own all of the infrastructure that generates the syntax nodes, and the legacy libSyntax build still depends on that infrastructure. To make this hang together, we need to clone swift-syntax and point the compiler build into it. This is being a little overly-aggressive by cloning swift-syntax into strictly more places than is necessary. The idea being that Swift itself will begin to require the Swift parser in more parts of the build (cf Doug's changes to enable the "early swift syntax" stage of the build).
1 parent d8a134c commit 6ec9c21

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.ci/vs2022.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,11 @@ resources:
129129
name: unicode-org/icu
130130
ref: refs/heads/maint/maint-69
131131
type: github
132-
132+
- repository: apple/swift-syntax
133+
endpoint: GitHub
134+
name: apple/swift-syntax
135+
ref: refs/heads/main
136+
type: github
133137

134138
stages:
135139
- stage: tools
@@ -148,6 +152,8 @@ stages:
148152
fetchDepth: 1
149153
- checkout: apple/swift-corelibs-libdispatch
150154
fetchDepth: 1
155+
- checkout: apple/swift-syntax
156+
fetchDepth: 1
151157
- script: |
152158
SET vswhere="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
153159
FOR /f "usebackq delims=" %%i IN (`%vswhere% -latest -property installationPath`) DO (
@@ -189,6 +195,7 @@ stages:
189195
-D SWIFT_BUILD_STATIC_STDLIB=NO
190196
-D SWIFT_BUILD_DYNAMIC_SDK_OVERLAY=NO
191197
-D SWIFT_BUILD_STATIC_SDK_OVERLAY=NO
198+
-D SWIFT_PATH_TO_SWIFT_SYNTAX_SOURCE=$(Build.SourcesDirectory)/swift-syntax
192199
- task: CMake@1
193200
inputs:
194201
cmakeArgs:
@@ -258,6 +265,8 @@ stages:
258265
fetchDepth: 1
259266
- checkout: apple/swift-experimental-string-processing
260267
fetchDepth: 1
268+
- checkout: apple/swift-syntax
269+
fetchDepth: 1
261270
- powershell: |
262271
if ("$(arch)" -eq "amd64") {
263272
$ArchComponent = ".x86.x64"
@@ -364,6 +373,7 @@ stages:
364373
-D SWIFT_PARALLEL_LINK_JOBS=2
365374
-D SWIFT_BUILD_DYNAMIC_STDLIB=NO
366375
-D SWIFT_BUILD_DYNAMIC_SDK_OVERLAY=NO
376+
-D SWIFT_PATH_TO_SWIFT_SYNTAX_SOURCE=$(Build.SourcesDirectory)/swift-syntax
367377
$(EXTRA_CMAKE_ARGS)
368378
- task: CMake@1
369379
inputs:
@@ -808,6 +818,8 @@ stages:
808818
fetchDepth: 1
809819
- checkout: apple/swift-experimental-string-processing
810820
fetchDepth: 1
821+
- checkout: apple/swift-syntax
822+
fetchDepth: 1
811823
- powershell: |
812824
if ("$(arch)" -eq "amd64" -Or "$(arch)" -eq "x86") {
813825
$ArchComponent = ".x86.x64"
@@ -887,6 +899,7 @@ stages:
887899
-D SWIFT_ENABLE_EXPERIMENTAL_DIFFERENTIABLE_PROGRAMMING=YES
888900
-D SWIFT_ENABLE_EXPERIMENTAL_STRING_PROCESSING=YES
889901
-D EXPERIMENTAL_STRING_PROCESSING_SOURCE_DIR=$(Build.SourcesDirectory)/swift-experimental-string-processing
902+
-D SWIFT_PATH_TO_SWIFT_SYNTAX_SOURCE=$(Build.SourcesDirectory)/swift-syntax
890903
- task: CMake@1
891904
inputs:
892905
cmakeArgs:
@@ -1068,6 +1081,8 @@ stages:
10681081
fetchDepth: 1
10691082
- checkout: jpsim/Yams
10701083
fetchDepth: 1
1084+
- checkout: apple/swift-syntax
1085+
fetchDepth: 1
10711086
- script: |
10721087
SET vswhere="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
10731088
FOR /f "usebackq delims=" %%i IN (`%vswhere% -latest -property installationPath`) DO (
@@ -1470,6 +1485,8 @@ stages:
14701485
fetchDepth: 1
14711486
- checkout: apple/swift
14721487
fetchDepth: 1
1488+
- checkout: apple/swift-syntax
1489+
fetchDepth: 1
14731490
- task: MSBuild@1
14741491
inputs:
14751492
solution: $(Build.SourcesDirectory)/swift-installer-scripts/platforms/Windows/toolchain.wixproj
@@ -1539,6 +1556,8 @@ stages:
15391556
fetchDepth: 1
15401557
- checkout: apple/swift
15411558
fetchDepth: 1
1559+
- checkout: apple/swift-syntax
1560+
fetchDepth: 1
15421561
- task: MSBuild@1
15431562
inputs:
15441563
solution: $(Build.SourcesDirectory)/swift-installer-scripts/platforms/Windows/CustomActions/SwiftInstaller/SwiftInstaller.vcxproj

0 commit comments

Comments
 (0)