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

Unified Diff: build/common.gypi

Issue 571953002: android_webview: Build against NDK prebuilts, not system libraries. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix library link order on arm64 Created 6 years, 2 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 | « android_webview/libwebviewchromium.gypi ('k') | build/config/android/config.gni » ('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 e9e8a3eec34978643ac83417035993ddad65e353..75912f4f2ea295e0fc8e0112285e14f156f2915d 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -1760,9 +1760,9 @@
# Uses system APIs for decoding audio and video.
'use_libffmpeg%': '0',
- # When building as part of the Android system, use system libraries
- # where possible to reduce ROM size.
- 'use_system_stlport%': '<(android_webview_build)',
+ # TODO(torne): Remove this unsupported option once all the places that
+ # test it have been updated.
+ 'use_system_stlport%': 0,
# Copy it out one scope.
'android_webview_build%': '<(android_webview_build)',
@@ -4339,19 +4339,12 @@
# build of chrome (e.g. where to find archived symbols).
'chrome_build_id%': '',
'conditions': [
- # Use shared stlport library when system one used.
# Figure this out early since it needs symbols from libgcc.a, so it
# has to be before that in the set of libraries.
- ['use_system_stlport==1', {
- 'android_stlport_library': 'stlport',
+ ['component=="shared_library"', {
+ 'android_stlport_library': 'stlport_shared',
}, {
- 'conditions': [
- ['component=="shared_library"', {
- 'android_stlport_library': 'stlport_shared',
- }, {
- 'android_stlport_library': 'stlport_static',
- }],
- ],
+ 'android_stlport_library': 'stlport_static',
}],
],
@@ -4443,17 +4436,8 @@
'-pthread', # Not supported by Android toolchain.
],
'ldflags': [
- '-nostdlib',
'-Wl,--no-undefined',
],
- 'libraries': [
- '-l<(android_stlport_library)',
- # Manually link the libgcc.a that the cross compiler uses.
- '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
- '-lc',
- '-ldl',
- '-lm',
- ],
'conditions': [
['component=="static_library"', {
'ldflags': [
@@ -4526,13 +4510,18 @@
],
'ldflags': [
'--sysroot=<(android_ndk_sysroot)',
+ '-nostdlib',
+ ],
+ 'libraries': [
+ '-l<(android_stlport_library)',
+ # Manually link the libgcc.a that the cross compiler uses.
+ '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
+ '-lc',
+ '-ldl',
+ '-lm',
],
}],
['android_webview_build==1', {
- 'include_dirs': [
- # OpenAL headers from the Android tree.
- '<(android_src)/frameworks/wilhelm/include',
- ],
'cflags': [
# Android predefines this as 1; undefine it here so Chromium
# can redefine it later to be 2 for chromium code and unset
@@ -4552,6 +4541,9 @@
'-Wno-non-virtual-dtor',
'-Wno-sign-promo',
],
+ 'libraries': [
+ '-ldl',
+ ],
}],
['android_webview_build==1', {
'target_conditions': [
@@ -4584,19 +4576,20 @@
# don't use '-isystem' because the arm-linux-androideabi-4.4.3
# toolchain (circa Gingerbread) will exhibit strange errors.
# The include ordering here is important; change with caution.
- ['use_system_stlport==1', {
- 'cflags': [
- # For libstdc++/include, which is used by stlport.
- '-I<(android_src)/bionic',
- '-I<(android_src)/external/stlport/stlport',
- ],
- }, { # else: use_system_stlport!=1
+ ['android_webview_build==0', {
'cflags': [
'-isystem<(android_stlport_include)',
],
'ldflags': [
'-L<(android_stlport_libs_dir)',
],
+ }, { # else: android_webview_build!=0
+ 'aosp_build_settings': {
+ # Specify that we want to statically link stlport from the
+ # NDK. This will provide all the include and library paths
+ # automatically at build time, and link the right library.
+ 'LOCAL_NDK_STL_VARIANT': 'stlport_static',
+ },
}],
['target_arch=="ia32"', {
# The x86 toolchain currently has problems with stack-protector.
« no previous file with comments | « android_webview/libwebviewchromium.gypi ('k') | build/config/android/config.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698