Skip to content

Commit ed3555a

Browse files
authored
Merge pull request swiftlang#65666 from ahoppen/ahoppen/verify-swiftsyntax-gen
[SwiftSyntax] Verify swift-syntax code-generated sources
2 parents f15dade + fc68e77 commit ed3555a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

utils/swift_build_support/swift_build_support/products/swiftsyntax.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,16 @@ def should_build(self, host_target):
8080
return True
8181

8282
def build(self, host_target):
83+
if self.args.swiftsyntax_verify_generated_files:
84+
build_cmd = [
85+
os.path.join(self.source_dir, 'build-script.py'),
86+
'verify-source-code',
87+
'--toolchain', self.install_toolchain_path(host_target)
88+
]
89+
if self.args.verbose_build:
90+
build_cmd.append('--verbose')
91+
shell.call(build_cmd)
92+
8393
self.run_swiftsyntax_build_script(target=host_target,
8494
command='build')
8595

0 commit comments

Comments
 (0)