Skip to content

Commit 4f6125c

Browse files
committed
Remove group info for SwiftSyntax
AFAICT the group info was only used for swift modules built by `build-script.py`. But since we don’t ship the swift modules as part of the toolchain anymore and the intended way to build SwiftSyntax for clients is through the SwiftPM package, I think the maintainance cost is higher than the value it provides (which I think has always been marginal).
1 parent ba62519 commit 4f6125c

File tree

3 files changed

+4
-68
lines changed

3 files changed

+4
-68
lines changed

Package.swift

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,9 @@ let swiftSyntaxTarget: PackageDescription.Target
2323
/// If we are in a controlled CI environment, we can use internal compiler flags
2424
/// to speed up the build or improve it.
2525
if ProcessInfo.processInfo.environment["SWIFT_BUILD_SCRIPT_ENVIRONMENT"] != nil {
26-
let groupFile = URL(fileURLWithPath: #file)
27-
.deletingLastPathComponent()
28-
.appendingPathComponent("utils")
29-
.appendingPathComponent("group.json")
30-
31-
var swiftSyntaxUnsafeFlags = ["-Xfrontend", "-group-info-path",
32-
"-Xfrontend", groupFile.path]
3326
// Enforcing exclusivity increases compile time of release builds by 2 minutes.
3427
// Disable it when we're in a controlled CI environment.
35-
swiftSyntaxUnsafeFlags += ["-enforce-exclusivity=unchecked"]
28+
let swiftSyntaxUnsafeFlags = ["-enforce-exclusivity=unchecked"]
3629

3730
swiftSyntaxTarget = .target(name: "SwiftSyntax", dependencies: ["_CSwiftSyntax"],
3831
swiftSettings: [.unsafeFlags(swiftSyntaxUnsafeFlags)]

build-script.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232

3333
LIT_EXEC = os.path.join(LLVM_DIR, "utils", "lit", "lit.py")
3434

35-
GROUP_INFO_PATH = os.path.join(PACKAGE_DIR, "utils", "group.json")
36-
3735
BASE_KIND_FILES = {
3836
"Decl": "SyntaxDeclNodes.swift",
3937
"Expr": "SyntaxExprNodes.swift",
@@ -369,7 +367,7 @@ def __init__(
369367
self.swiftpm_call.extend(["--verbose"])
370368
self.verbose = verbose
371369

372-
def build(self, product_name, module_group_path=""):
370+
def build(self, product_name):
373371
print("** Building " + product_name + " **")
374372
command = list(self.swiftpm_call)
375373
command.extend(["--product", product_name])
@@ -859,8 +857,8 @@ def main():
859857
)
860858
# Until rdar://53881101 is implemented, we cannot request a build of multiple
861859
# targets simultaneously. For now, just build one product after the other.
862-
builder.build("SwiftSyntax", module_group_path=GROUP_INFO_PATH)
863-
builder.build("SwiftSyntaxParser", module_group_path=GROUP_INFO_PATH)
860+
builder.build("SwiftSyntax")
861+
builder.build("SwiftSyntaxParser")
864862

865863
# Only build lit-test-helper if we are planning to run tests
866864
if args.test:

utils/group.json

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)