summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--android_webview/android_webview.gyp10
-rw-r--r--build/android/cpufeatures.gypi13
-rw-r--r--third_party/ashmem/ashmem.gyp5
3 files changed, 17 insertions, 11 deletions
diff --git a/android_webview/android_webview.gyp b/android_webview/android_webview.gyp
index 46d7f78..8572ee8 100644
--- a/android_webview/android_webview.gyp
+++ b/android_webview/android_webview.gyp
@@ -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',
diff --git a/build/android/cpufeatures.gypi b/build/android/cpufeatures.gypi
index 96de282..c08e956 100644
--- a/build/android/cpufeatures.gypi
+++ b/build/android/cpufeatures.gypi
@@ -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',
diff --git a/third_party/ashmem/ashmem.gyp b/third_party/ashmem/ashmem.gyp
index 82e893a..4b248c5 100644
--- a/third_party/ashmem/ashmem.gyp
+++ b/third_party/ashmem/ashmem.gyp
@@ -21,6 +21,11 @@
'includes': [
'../../build/shim_headers.gypi',
],
+ 'link_settings': {
+ 'libraries': [
+ '-lcutils',
+ ],
+ },
}, {
'type': 'static_library',
'sources': [