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:
@ -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',
|
||||
|
5
third_party/ashmem/ashmem.gyp
vendored
5
third_party/ashmem/ashmem.gyp
vendored
@ -21,6 +21,11 @@
|
||||
'includes': [
|
||||
'../../build/shim_headers.gypi',
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'-lcutils',
|
||||
],
|
||||
},
|
||||
}, {
|
||||
'type': 'static_library',
|
||||
'sources': [
|
||||
|
Reference in New Issue
Block a user