[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 <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
This commit is contained in:
Martin Kustermann
2020-02-04 18:45:26 +00:00
committed by commit-bot@chromium.org
parent 7c472c396c
commit a5bb8b666a
+4 -2
View File
@@ -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']