From 301af9347c32ac621ab06b08eb089f8ee643795f Mon Sep 17 00:00:00 2001 From: eugenis Date: Mon, 3 Aug 2015 21:57:52 -0700 Subject: Link libc++_shared with asan=1 on Android. ASan needs to interpose operator new/delete symbols to provide good allocation/deallocation stacks. This requires shared linking of the C++ standard library. BUG=515261 Review URL: https://codereview.chromium.org/1263713005 Cr-Commit-Position: refs/heads/master@{#341675} --- build/android/native_app_dependencies.gypi | 2 +- build/android/pack_relocations.gypi | 2 +- build/android/setup.gyp | 2 +- build/android/strip_native_libraries.gypi | 2 +- build/common.gypi | 28 +++++++++++++++++++--------- build/java_apk.gypi | 2 +- chrome/android/chrome_apk.gypi | 2 +- chrome/chrome_android.gypi | 2 +- 8 files changed, 26 insertions(+), 16 deletions(-) diff --git a/build/android/native_app_dependencies.gypi b/build/android/native_app_dependencies.gypi index 6032274..f74e7ae 100644 --- a/build/android/native_app_dependencies.gypi +++ b/build/android/native_app_dependencies.gypi @@ -29,7 +29,7 @@ 'include_main_binary%': 1, }, 'conditions': [ - ['component == "shared_library"', { + ['android_must_copy_system_libraries == 1', { 'dependencies': [ '<(DEPTH)/build/android/setup.gyp:copy_system_libraries', ], diff --git a/build/android/pack_relocations.gypi b/build/android/pack_relocations.gypi index 8567fa6..61b4e2c 100644 --- a/build/android/pack_relocations.gypi +++ b/build/android/pack_relocations.gypi @@ -67,7 +67,7 @@ '--stamp=<(stamp)', ], }], - ['component == "shared_library"', { + ['android_must_copy_system_libraries == 1', { # Add a fake output to force the build to always re-run this step. This # is required because the real inputs are not known at gyp-time and # changing base.so may not trigger changes to dependent libraries. diff --git a/build/android/setup.gyp b/build/android/setup.gyp index 0e1c2c4..419ed98 100644 --- a/build/android/setup.gyp +++ b/build/android/setup.gyp @@ -3,7 +3,7 @@ # found in the LICENSE file. { 'conditions': [ - ['component == "shared_library"', { + ['android_must_copy_system_libraries == 1', { 'targets': [ { # These libraries from the Android ndk are required to be packaged with diff --git a/build/android/strip_native_libraries.gypi b/build/android/strip_native_libraries.gypi index bdffcfd..be8a5cb 100644 --- a/build/android/strip_native_libraries.gypi +++ b/build/android/strip_native_libraries.gypi @@ -35,7 +35,7 @@ '<(stamp)', ], 'conditions': [ - ['component == "shared_library"', { + ['android_must_copy_system_libraries == 1', { # Add a fake output to force the build to always re-run this step. This # is required because the real inputs are not known at gyp-time and # changing base.so may not trigger changes to dependent libraries. diff --git a/build/common.gypi b/build/common.gypi index 052d297..7127a59 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -1711,6 +1711,21 @@ 'android_sdk_version%': '22', 'android_sdk_build_tools_version%': '22.0.0', 'host_os%': "