0

Android WebView: tidy up library dependencies.

The comment in android_webview.gyp about static library dependencies not
being handled correctly is incorrect, and the workaround not necessary:
the problem was just that I wasn't using link_settings correctly. Remove
the workaround and instead add proper dependencies in the places that
actually use cpufeatures and cutils (ashmem). This doesn't change the
generated makefiles but makes more logical sense.

BUG=
R=digit@chromium.org

Review URL: https://codereview.chromium.org/14753011

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200806 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
torne@chromium.org
2013-05-17 13:46:10 +00:00
parent df8e98a7e5
commit 5878b725ef
3 changed files with 17 additions and 11 deletions
android_webview
build/android
third_party/ashmem

@ -23,16 +23,6 @@
'sources': [
'lib/main/webview_entry_point.cc',
],
'conditions': [
['android_webview_build == 1', {
'libraries': [
# The "android" gyp backend doesn't quite handle static libraries'
# dependencies correctly; force this to be linked as a workaround.
'cpufeatures.a',
'-lcutils',
],
}],
],
},
{
'target_name': 'android_webview_pak',

@ -8,9 +8,20 @@
{
'conditions': [
['android_webview_build == 1', {
# This is specified twice intentionally: Android provides include paths
# to targets automatically if they depend on libraries, so we add this
# library to every target that includes this .gypi to make the headers
# available, then also add it to targets that link those targets via
# link_settings to ensure it ends up being linked even if the main target
# doesn't include this .gypi.
'libraries': [
'cpufeatures.a'
'cpufeatures.a',
],
'link_settings': {
'libraries': [
'cpufeatures.a',
],
},
}, {
'dependencies': [
'<(android_ndk_root)/android_tools_ndk.gyp:cpu_features',

@ -21,6 +21,11 @@
'includes': [
'../../build/shim_headers.gypi',
],
'link_settings': {
'libraries': [
'-lcutils',
],
},
}, {
'type': 'static_library',
'sources': [