diff --git a/utils/swift_build_support/swift_build_support/products/swiftsyntax.py b/utils/swift_build_support/swift_build_support/products/swiftsyntax.py index 0142abfb17071..9a7da137217d7 100644 --- a/utils/swift_build_support/swift_build_support/products/swiftsyntax.py +++ b/utils/swift_build_support/swift_build_support/products/swiftsyntax.py @@ -80,6 +80,16 @@ def should_build(self, host_target): return True def build(self, host_target): + if self.args.swiftsyntax_verify_generated_files: + build_cmd = [ + os.path.join(self.source_dir, 'build-script.py'), + 'verify-source-code', + '--toolchain', self.install_toolchain_path(host_target) + ] + if self.args.verbose_build: + build_cmd.append('--verbose') + shell.call(build_cmd) + self.run_swiftsyntax_build_script(target=host_target, command='build')