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

Unified Diff: build/common.gypi

Issue 1263713005: Link libc++_shared with asan=1 on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added a comment Created 5 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 | « build/android/strip_native_libraries.gypi ('k') | build/java_apk.gypi » ('j') | 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 b8decd5d86bbdd30add612e2b307ecf789ea16af..fbb46722f37ec2c52a51cbebc6b2340aae68e79c 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -1712,6 +1712,21 @@
'android_sdk_version%': '22',
'android_sdk_build_tools_version%': '22.0.0',
'host_os%': "<!(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')",
+
+ 'conditions': [
+ # Figure this out early since it needs symbols from libgcc.a, so it
+ # has to be before that in the set of libraries.
+ # ASan needs to dynamically link to libc++ even in static builds so
+ # that it can interpose operator new.
+ ['component=="shared_library" or asan==1', {
+ 'android_libcpp_library': 'c++_shared',
+ 'android_must_copy_system_libraries': 1,
+ }, {
+ 'android_libcpp_library': 'c++_static',
+ 'android_must_copy_system_libraries': 0,
+ }],
+ ],
+
},
# Copy conditionally-set variables out one scope.
'android_ndk_root%': '<(android_ndk_root)',
@@ -1719,6 +1734,8 @@
'android_sdk_root%': '<(android_sdk_root)',
'android_sdk_version%': '<(android_sdk_version)',
'android_libcpp_root': '<(android_ndk_root)/sources/cxx-stl/llvm-libc++',
+ 'android_libcpp_library': '<(android_libcpp_library)',
+ 'android_must_copy_system_libraries': '<(android_must_copy_system_libraries)',
'host_os%': '<(host_os)',
'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_version)',
@@ -1796,8 +1813,10 @@
'android_sdk_jar%': '<(android_sdk)/android.jar',
'android_libcpp_root': '<(android_libcpp_root)',
+ 'android_libcpp_library': '<(android_libcpp_library)',
'android_libcpp_include': '<(android_libcpp_root)/libcxx/include',
'android_libcpp_libs_dir%': '<(android_libcpp_root)/libs/<(android_app_abi)',
+ 'android_must_copy_system_libraries': '<(android_must_copy_system_libraries)',
'host_os%': '<(host_os)',
# Location of the "objcopy" binary, used by both gyp and scripts.
@@ -4744,15 +4763,6 @@
# identifying various build artifacts corresponding to a particular
# build of chrome (e.g. where to find archived symbols).
'chrome_build_id%': '',
- 'conditions': [
- # Figure this out early since it needs symbols from libgcc.a, so it
- # has to be before that in the set of libraries.
- ['component=="shared_library"', {
- 'android_libcpp_library': 'c++_shared',
- }, {
- 'android_libcpp_library': 'c++_static',
- }],
- ],
# Placing this variable here prevents from forking libvpx, used
# by remoting. Remoting is off, so it needn't built,
« no previous file with comments | « build/android/strip_native_libraries.gypi ('k') | build/java_apk.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698