Skip to content

Commit 794408b

Browse files
authored
Add build prebuilts support for any version of swift-syntax. (#8994) (#9011)
Removes the hardcoding of the contents of the prebuilt libraries. Adds a --version argument to specify which versions of swift-syntax you want to build for. You can have multiple of these. We add a sample build.sh script to the folder to show an example, including finding the most recent prerelease of 602. Also removes the hardcoding of the list of products that go into the library. Instead we ask the package for its list of library products and add them all. Finally, removes the header files since SwiftPM now hooks up the include paths to the CModules from the source in the checkouts. This is needed in 6.2 to support prebuilts generated with that version of the toolchain. I have tested this on all three host platforms including all Linux distros with both architectures and swift-syntax 600, 601, and the latest prerelease of 602
1 parent 3cf1cb6 commit 794408b

File tree

3 files changed

+245
-341
lines changed

3 files changed

+245
-341
lines changed

Package.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -785,6 +785,9 @@ let package = Package(
785785
.product(name: "ArgumentParser", package: "swift-argument-parser"),
786786
"Basics",
787787
"Workspace",
788+
],
789+
exclude: [
790+
"build.sh"
788791
]
789792
),
790793

0 commit comments

Comments
 (0)