diff options
-rw-r--r-- | android_webview/android_webview_tests.gypi | 2 | ||||
-rw-r--r-- | build/common.gypi | 15 | ||||
-rw-r--r-- | build/java_apk.gypi | 15 | ||||
-rw-r--r-- | chrome/chrome_android.gypi | 2 | ||||
-rw-r--r-- | content/content_shell.gypi | 2 | ||||
-rw-r--r-- | content/content_tests.gypi | 2 |
6 files changed, 26 insertions, 12 deletions
diff --git a/android_webview/android_webview_tests.gypi b/android_webview/android_webview_tests.gypi index b8a73af..69cc234 100644 --- a/android_webview/android_webview_tests.gypi +++ b/android_webview/android_webview_tests.gypi @@ -14,7 +14,7 @@ 'variables': { 'apk_name': 'AndroidWebView', 'java_in_dir': 'test/shell', - 'native_libs_paths': ['<(SHARED_LIB_DIR)/libwebviewchromium.so'], + 'native_lib_target': 'libwebviewchromium', 'resource_dir': 'test/shell/res', 'additional_input_paths': [ '<(PRODUCT_DIR)/android_webview_apk/assets/webviewchromium.pak', diff --git a/build/common.gypi b/build/common.gypi index 149b1b87..34c350c 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -3141,9 +3141,22 @@ 'target_defaults': { 'variables': { 'release_extra_cflags%': '', + 'conditions': [ + # If we're using the components build, append "cr" to all shared + # libraries to avoid naming collisions with android system library + # versions with the same name (e.g. skia, icu). + ['component=="shared_library"', { + 'android_product_extension': 'cr.so', + }, { + 'android_product_extension': 'so', + } ], + ], }, - 'target_conditions': [ + ['_type=="shared_library"', { + 'product_extension': '<(android_product_extension)', + }], + # Settings for building device targets using Android's toolchain. # These are based on the setup.mk file from the Android NDK. # diff --git a/build/java_apk.gypi b/build/java_apk.gypi index 360b107..ad88d9b 100644 --- a/build/java_apk.gypi +++ b/build/java_apk.gypi @@ -38,9 +38,9 @@ # should be filled automatically by depending on the appropriate targets. # is_test_apk - Set to 1 if building a test apk. This prevents resources from # dependencies from being re-included. -# native_libs_paths - The path to any native library to be included in this -# target. This should be a path in <(SHARED_LIB_DIR). A stripped copy of -# the library will be included in the apk. +# native_lib_target - The target_name of the target which generates the final +# shared library to be included in this apk. A stripped copy of the +# library will be included in the apk. # resource_dir - The directory for resources. # R_package - A custom Java package to generate the resource file R.java in. # By default, the package given in AndroidManifest.xml will be used. @@ -60,7 +60,7 @@ 'app_manifest_version_code%': '<(android_app_version_code)', 'proguard_enabled%': 'false', 'proguard_flags_paths%': ['<(DEPTH)/build/android/empty_proguard.flags'], - 'native_libs_paths': [], + 'native_lib_target%': '', 'jar_name': 'chromium_apk_<(_target_name).jar', 'resource_dir%':'<(DEPTH)/build/android/ant/empty/res', 'R_package%':'', @@ -126,15 +126,16 @@ 'additional_R_text_files': ['<(PRODUCT_DIR)/<(package_name)/R.txt'], }, }], - ['native_libs_paths != [] and component == "shared_library"', { + ['native_lib_target != "" and component == "shared_library"', { 'dependencies': [ '<(DEPTH)/build/android/setup.gyp:copy_system_libraries', ] }], - ['native_libs_paths != []', { + ['native_lib_target != ""', { 'variables': { 'compile_input_paths': [ '<(native_libraries_java_stamp)' ], 'generated_src_dirs': [ '<(native_libraries_java_dir)' ], + 'native_libs_paths': ['<(SHARED_LIB_DIR)/<(native_lib_target).>(android_product_extension)'], }, 'actions': [ { @@ -271,7 +272,7 @@ }, }], ], - }], # native_libs_paths != [] + }], # native_lib_target != '' ['java_strings_grd != ""', { 'variables': { 'res_grit_dir': '<(SHARED_INTERMEDIATE_DIR)/<(package_name)_apk/res_grit', diff --git a/chrome/chrome_android.gypi b/chrome/chrome_android.gypi index 79c9c98..7cbc1ab 100644 --- a/chrome/chrome_android.gypi +++ b/chrome/chrome_android.gypi @@ -61,7 +61,7 @@ 'java_in_dir': 'android/testshell/java', 'resource_dir': 'android/testshell/res', 'asset_location': '<(ant_build_out)/../assets/<(package_name)', - 'native_libs_paths': [ '<(SHARED_LIB_DIR)/libchromiumtestshell.so', ], + 'native_lib_target': 'libchromiumtestshell', 'additional_input_paths': [ '<@(chrome_android_pak_output_resources)', '<(chrome_android_pak_output_folder)/devtools_resources.pak', diff --git a/content/content_shell.gypi b/content/content_shell.gypi index b41587d..9c54658 100644 --- a/content/content_shell.gypi +++ b/content/content_shell.gypi @@ -661,7 +661,7 @@ 'manifest_package_name': 'org.chromium.content_shell_apk', 'java_in_dir': 'shell/android/shell_apk', 'resource_dir': 'shell/android/shell_apk/res', - 'native_libs_paths': ['<(SHARED_LIB_DIR)/libcontent_shell_content_view.so'], + 'native_lib_target': 'libcontent_shell_content_view', 'additional_input_paths': ['<(PRODUCT_DIR)/content_shell/assets/content_shell.pak'], 'asset_location': '<(ant_build_out)/content_shell/assets', }, diff --git a/content/content_tests.gypi b/content/content_tests.gypi index dc3b905..d1ab699 100644 --- a/content/content_tests.gypi +++ b/content/content_tests.gypi @@ -1022,7 +1022,7 @@ 'apk_name': 'content_browsertests', 'java_in_dir': 'shell/android/browsertests_apk', 'resource_dir': 'shell/android/browsertests_apk/res', - 'native_libs_paths': ['<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)content_browsertests<(SHARED_LIB_SUFFIX)'], + 'native_lib_target': 'libcontent_browsertests', 'additional_input_paths': ['<(PRODUCT_DIR)/content_shell/assets/content_shell.pak'], 'asset_location': '<(ant_build_out)/content_shell/assets', }, |