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

Unified Diff: tools/gn.py

Issue 2392403002: Enable GN ASAN builds for Linux (Closed)
Patch Set: Fix mac compile Created 4 years, 2 months 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 | « runtime/BUILD.gn ('k') | 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 5fb46423549e07b4df56290b948a1b0c1e80cb97..44b4b4116e750845a95ae165f27f924bfe3eed5a 100755
--- a/tools/gn.py
+++ b/tools/gn.py
@@ -87,7 +87,9 @@ def to_gn_args(args, mode, arch, target_os):
gn_args['dart_zlib_path'] = "//runtime/bin/zlib"
- gn_args['dart_use_tcmalloc'] = gn_args['target_os'] == 'linux'
+ # Use tcmalloc only when targeting Linux and when not using ASAN.
+ gn_args['dart_use_tcmalloc'] = (gn_args['target_os'] == 'linux'
+ and not args.asan)
gn_args['is_debug'] = mode == 'debug'
gn_args['is_release'] = mode == 'release'
@@ -106,6 +108,8 @@ def to_gn_args(args, mode, arch, target_os):
and not gn_args['target_cpu'].startswith('mips'))
gn_args['is_clang'] = args.clang and has_clang
+ gn_args['is_asan'] = args.asan and gn_args['is_clang']
+
if args.target_sysroot:
gn_args['target_sysroot'] = args.target_sysroot
@@ -198,6 +202,10 @@ def parse_args(args):
metavar='[all,ia32,x64,simarm,arm,simarmv6,armv6,simarmv5te,armv5te,'
'simmips,mips,simarm64,arm64,simdbc,armsimdbc]',
default='x64')
+ parser.add_argument('--asan',
+ help='Build with ASAN',
+ default=False,
+ action='store_true')
parser.add_argument('--goma',
help='Use goma',
default=True,
« no previous file with comments | « runtime/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698