Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Unified Diff: tools/gn.py

Issue 2480333002: GN: Take asan default from an environment variable (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn.py
diff --git a/tools/gn.py b/tools/gn.py
index 1ee3d33cd1e13a0664c1ae50ef2b4727803bdb72..d1d6656090463de1b1f8bd447982819fd68f2839 100755
--- a/tools/gn.py
+++ b/tools/gn.py
@@ -195,6 +195,14 @@ def ide_switch(host_os):
return '--ide=json'
+# Environment variables for default settings.
+DART_USE_ASAN = "DART_USE_ASAN"
+
+
+def use_asan():
+ return DART_USE_ASAN in os.environ
+
+
def parse_args(args):
args = args[1:]
parser = argparse.ArgumentParser(description='A script to run `gn gen`.')
@@ -220,8 +228,12 @@ def parse_args(args):
default='x64')
parser.add_argument('--asan',
help='Build with ASAN',
- default=False,
+ default=use_asan(),
action='store_true')
+ parser.add_argument('--no-asan',
+ help='Disable ASAN',
+ dest='asan',
+ action='store_false')
parser.add_argument('--goma',
help='Use goma',
default=True,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698