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

Unified Diff: build/common.gypi

Issue 7541045: Adding GYP_DEFINES=ASAN to enable ASAN build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments fixed Created 9 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/common.gypi
diff --git a/build/common.gypi b/build/common.gypi
index 9eb94f3b62828aa0d7dc85ee997c64c58eb56e2f..d6bed70263920b41de50d434d16ee3f0c7068330 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -180,6 +180,10 @@
# Has no effect if 'clang' is not set as well.
'clang_use_chrome_plugins%': 0,
+ # Enable building with ASAN.
+ # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
+ 'asan%': 0,
+
# Set to 1 compile with -fPIC cflag on linux. This is a must for shared
# libraries on linux x86-64 and arm, plus ASLR.
'linux_fpic%': 1,
@@ -297,6 +301,7 @@
'configuration_policy%': '<(configuration_policy)',
'safe_browsing%': '<(safe_browsing)',
'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
+ 'asan%': '<(asan)',
'enable_register_protocol_handler%': '<(enable_register_protocol_handler)',
'enable_smooth_scrolling%': '<(enable_smooth_scrolling)',
'use_wayland%': '<(use_wayland)',
@@ -668,6 +673,10 @@
['enable_register_protocol_handler==1', {
'grit_defines': ['-D', 'enable_register_protocol_handler'],
}],
+
+ ['asan==1', {
+ 'clang%': 1,
+ }],
],
},
'target_defaults': {
@@ -1511,6 +1520,11 @@
],
}]],
}],
+ ['asan==1', {
+ 'cflags': [
Nico 2011/08/10 18:48:17 Is this required for ldflags as well? aarya was se
glotov 2011/08/12 20:13:05 Yes, ldflags were added. ldl flag is passed by ASA
+ '-fasan',
Nico 2011/08/10 18:15:20 Add a comment above this line "-fasan only works w
glotov 2011/08/12 20:13:05 Done.
+ ],
+ }],
['no_strict_aliasing==1', {
'cflags': [
'-fno-strict-aliasing',
« 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