From 05244476bb5ed9f3937899578962f69542beddd9 Mon Sep 17 00:00:00 2001 From: Kim de Vos Date: Wed, 26 Apr 2023 20:28:29 +0200 Subject: [PATCH] Verify swift-syntax code gen --- .../swift_build_support/products/swiftsyntax.py | 10 ++++++++++ 1 file changed, 10 insertions(+) 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')