From a5bb8b666ab9d9f75be46e4ef51554117fea6a52 Mon Sep 17 00:00:00 2001 From: Martin Kustermann Date: Tue, 4 Feb 2020 18:45:26 +0000 Subject: [PATCH] [infa] Respect --sanitizer flag in tools/test.py when running GN Change-Id: I0c9fdc26983381111021bf1265ef58f31deb8ae2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134296 Reviewed-by: Ryan Macnak Commit-Queue: Martin Kustermann --- tools/build.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/build.py b/tools/build.py index 6b99e44d3c1..274374c1cc8 100755 --- a/tools/build.py +++ b/tools/build.py @@ -214,13 +214,15 @@ def GenerateBuildfilesIfNeeded(): return True -def RunGNIfNeeded(out_dir, target_os, mode, arch, use_nnbd): +def RunGNIfNeeded(out_dir, target_os, mode, arch, use_nnbd, sanitizer): if os.path.isfile(os.path.join(out_dir, 'args.gn')): return gn_os = 'host' if target_os == HOST_OS else target_os gn_command = [ 'python', os.path.join(DART_ROOT, 'tools', 'gn.py'), + '--sanitizer', + sanitizer, '-m', mode, '-a', @@ -291,7 +293,7 @@ def BuildOneConfig(options, targets, target_os, mode, arch, sanitizer): using_goma = False # TODO(zra): Remove auto-run of gn, replace with prompt for user to run # gn.py manually. - RunGNIfNeeded(out_dir, target_os, mode, arch, options.nnbd) + RunGNIfNeeded(out_dir, target_os, mode, arch, options.nnbd, sanitizer) command = ['ninja', '-C', out_dir] if options.verbose: command += ['-v']