summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorglider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-28 13:19:44 +0000
committerglider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-28 13:19:44 +0000
commit47bde440e3318bbf3fa1767202ed602930141f68 (patch)
tree36bab7b4f68a61fe474c612fe06b57698cfeaabe
parenta647bc5db18087f15dd5f728289d2456d119857a (diff)
downloadchromium_src-47bde440e3318bbf3fa1767202ed602930141f68.zip
chromium_src-47bde440e3318bbf3fa1767202ed602930141f68.tar.gz
chromium_src-47bde440e3318bbf3fa1767202ed602930141f68.tar.bz2
Enable mac_strip_release under ASan on OSX. Remove the .saves files.
Unce upon a time the ASan runtime library used to be statically linked into the executables on OSX. Because that library provided a number of API functions needed by the shared libraries, we had custom ASan-specific .saves files that told the `strip` utility to preserve those functions when stripping the executables. Then ASan switched to using dynamic runtime library, which instantly broke the stripping step, because the executables weren't necessarily referencing all the ASan API functions (issue 242503). As a result, stripping has been disabled, and we haven't had .dSYM debug info for ASan builds for more than a year now (issue 148383). Because the ASan API functions are now undefined in the executables, it's actually senseless to use the .saves files to preserve those functions. This CL deletes the .saves files and turns mac_strip_release on for ASan builds. BUG=148383,242503,170739,166857 R=mark@chromium.org Review URL: https://codereview.chromium.org/292153006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273199 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--build/asan.saves23
-rw-r--r--build/common.gypi22
-rw-r--r--chrome/app/app_asan.saves32
-rw-r--r--chrome/chrome.gyp6
-rw-r--r--chrome/chrome_exe.gypi6
5 files changed, 2 insertions, 87 deletions
diff --git a/build/asan.saves b/build/asan.saves
deleted file mode 100644
index 0c4e4ed..0000000
--- a/build/asan.saves
+++ /dev/null
@@ -1,23 +0,0 @@
-# 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
-___asan_handle_no_return
-___asan_register_global
-___asan_register_globals
-___asan_unregister_globals
-___asan_report_load1
-___asan_report_load2
-___asan_report_load4
-___asan_report_load8
-___asan_report_load16
-___asan_report_store1
-___asan_report_store2
-___asan_report_store4
-___asan_report_store8
-___asan_report_store16
diff --git a/build/common.gypi b/build/common.gypi
index af4c0911..35e0f1b 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -2024,9 +2024,8 @@
'use_allocator%': 'none',
}],
['asan==1 and OS=="mac"', {
- # TODO(glider): we do not strip ASan binaries until the dynamic ASan
- # runtime is fully adopted. See http://crbug.com/242503.
- 'mac_strip_release': 0,
+ # Strip and produce the .dSYM files.
+ 'mac_strip_release': 1,
}],
['lsan==1', {
'clang%': 1,
@@ -4681,16 +4680,6 @@
],
},
],
- 'conditions': [
- ['asan==1', {
- 'variables': {
- 'asan_saves_file': 'asan.saves',
- },
- 'xcode_settings': {
- 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
- },
- }],
- ],
'target_conditions': [
['mac_pie==1 and release_valgrind_build==0', {
# Turn on position-independence (ASLR) for executables. When
@@ -4730,13 +4719,6 @@
# additional flags are added with STRIPFLAGS.
'STRIPFLAGS': '-x',
}], # _type=="shared_library" or _type=="loadable_module"
- ['_type=="executable"', {
- 'conditions': [
- ['asan==1', {
- 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
- }]
- ],
- }], # _type=="executable" and asan==1
], # target_conditions
}, # xcode_settings
}, # configuration "Release"
diff --git a/chrome/app/app_asan.saves b/chrome/app/app_asan.saves
deleted file mode 100644
index fd8b352..0000000
--- a/chrome/app/app_asan.saves
+++ /dev/null
@@ -1,32 +0,0 @@
-# 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
-
-# AddressSanitizer-specific symbols.
-___asan_init
-___asan_handle_no_return
-___asan_register_global
-___asan_register_globals
-___asan_unregister_globals
-___asan_report_load1
-___asan_report_load2
-___asan_report_load4
-___asan_report_load8
-___asan_report_load16
-___asan_report_store1
-___asan_report_store2
-___asan_report_store4
-___asan_report_store8
-___asan_report_store16
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index 19609cc..2810f96 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -241,12 +241,6 @@
'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',
- },
- }],
['component=="shared_library"', {
'xcode_settings': {
'LD_RUNPATH_SEARCH_PATHS': [
diff --git a/chrome/chrome_exe.gypi b/chrome/chrome_exe.gypi
index 2ec9dca..758fc4c 100644
--- a/chrome/chrome_exe.gypi
+++ b/chrome/chrome_exe.gypi
@@ -456,12 +456,6 @@
['chrome_multiple_dll', {
'defines': ['CHROME_MULTIPLE_DLL'],
}],
- ['OS=="mac" and asan==1', {
- 'xcode_settings': {
- # Override the outer definition of CHROMIUM_STRIP_SAVE_FILE.
- 'CHROMIUM_STRIP_SAVE_FILE': 'app/app_asan.saves',
- },
- }],
['OS=="linux"', {
'conditions': [
['branding=="Chrome"', {