summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/asan.saves9
-rw-r--r--build/common.gypi10
-rw-r--r--chrome/app/app_asan.saves20
-rw-r--r--chrome/chrome.gyp6
-rw-r--r--chrome/chrome_exe.gypi6
5 files changed, 51 insertions, 0 deletions
diff --git a/build/asan.saves b/build/asan.saves
new file mode 100644
index 0000000..8822f7c
--- /dev/null
+++ b/build/asan.saves
@@ -0,0 +1,9 @@
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This file lists symbols that should not be stripped by Xcode from the binaries
+# built for Mac OS X using AddressSanitizer
+# (http://dev.chromium.org/developers/testing/addresssanitizer).
+
+___asan_init
diff --git a/build/common.gypi b/build/common.gypi
index a19b002..abba390 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -1736,6 +1736,16 @@
],
},
],
+ 'conditions': [
+ ['asan==1', {
+ 'variables': {
+ 'asan_saves_file': 'asan.saves',
+ },
+ 'xcode_settings': {
+ 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)'
+ },
+ }],
+ ],
}],
['_type=="executable" and release_valgrind_build==0', {
# Turn on position-independence (ASLR) for executables. When PIE
diff --git a/chrome/app/app_asan.saves b/chrome/app/app_asan.saves
new file mode 100644
index 0000000..1b5207b
--- /dev/null
+++ b/chrome/app/app_asan.saves
@@ -0,0 +1,20 @@
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This file lists symbols that should not be stripped from the Mac browser and
+# helper app executables built with AddressSanitizer
+# (http://dev.chromium.org/developers/testing/addresssanitizer).
+
+# The list of Chromium application-specific symbols should be the same as that
+# in chrome/app/app.saves
+# The list of symbols that should be preserved in all the binaries built with
+# AddressSanitizer should correspond to build/asan.saves
+
+# Chromium-specific symbols.
+_main
+_NXArgc
+_NXArgv
+
+# AddressSanitizer-specific symbols.
+___asan_init
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index 523db12..8f734c9 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -1041,6 +1041,12 @@
'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
},
}],
+ ['asan==1', {
+ 'xcode_settings': {
+ # Override the outer definition of CHROMIUM_STRIP_SAVE_FILE.
+ 'CHROMIUM_STRIP_SAVE_FILE': 'app/app_asan.saves',
+ },
+ }],
],
}, # target helper_app
{
diff --git a/chrome/chrome_exe.gypi b/chrome/chrome_exe.gypi
index 099e9d9..f028efd 100644
--- a/chrome/chrome_exe.gypi
+++ b/chrome/chrome_exe.gypi
@@ -76,6 +76,12 @@
'app/client_util.cc',
]
}],
+ ['OS=="mac" and asan==1', {
+ 'xcode_settings': {
+ # Override the outer definition of CHROMIUM_STRIP_SAVE_FILE.
+ 'CHROMIUM_STRIP_SAVE_FILE': 'app/app_asan.saves',
+ },
+ }],
],
}],
],