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

Unified Diff: build/java_apk.gypi

Issue 11096038: Move shared library copy and strip to java_apk.gypi (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Workaround make generator bug Created 8 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 | « build/android/prepare_library_for_apk ('k') | chrome/chrome_android.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/java_apk.gypi
diff --git a/build/java_apk.gypi b/build/java_apk.gypi
index e8a161b042af06b094d4c7e62eaf429cd4fb1593..0973f8dbba2df85dccbc0c2f5e9f70afcf43891c 100644
--- a/build/java_apk.gypi
+++ b/build/java_apk.gypi
@@ -48,21 +48,52 @@
# input_jars_paths - The path to jars to be included in the classpath. This
# should be filled automatically by depending on the appropriate targets.
# native_libs_paths - The path to any native library to be included in this
-# target.
+# target. This should be a path in <(SHARED_LIB_DIR). A stripped copy of
+# the library will be included in the apk and symbolic links to the
+# unstripped copy will be added to <(android_product_out) to enable native
+# debugging.
{
'variables': {
'asset_location%': '',
'additional_input_paths': [],
'input_jars_paths': [],
- 'native_libs_paths': [],
'additional_src_dirs': [],
'generated_src_dirs': [],
'app_manifest_version_name%': '<(android_app_version_name)',
'app_manifest_version_code%': '<(android_app_version_code)',
'proguard_enabled%': 'false',
- 'proguard_flags%': ''
+ 'proguard_flags%': '',
+ 'native_libs_paths': [],
+ 'manifest_package_name%': 'unknown.package.name',
},
+ 'sources': [
+ '<@(native_libs_paths)'
+ ],
+ 'rules': [
+ {
+ 'rule_name': 'copy_and_strip_native_libraries',
+ 'extension': 'so',
+ 'variables': {
+ 'stripped_library_path': '<(PRODUCT_DIR)/<(package_name)/libs/<(android_app_abi)/<(RULE_INPUT_ROOT).so',
+ 'link_dir': '<(android_product_out)/symbols/data/data/<(manifest_package_name)/lib/',
+ },
+ 'outputs': [
+ '<(stripped_library_path)',
+ '<(link_dir)/<(RULE_INPUT_ROOT).so',
+ ],
+ # There is no way to do 2 actions for each source library in gyp. So to
+ # both strip the library and create the link in <(link_dir) a separate
+ # script is required.
+ 'action': [
+ '<(DEPTH)/build/android/prepare_library_for_apk',
+ '<(android_strip)',
+ '<(RULE_INPUT_PATH)',
+ '<(stripped_library_path)',
+ '<(link_dir)',
+ ],
+ },
+ ],
'actions': [
{
'action_name': 'ant_<(package_name)_apk',
@@ -72,7 +103,7 @@
'<(DEPTH)/build/android/ant/chromium-apk.xml',
'<(DEPTH)/build/android/ant/common.xml',
'<(DEPTH)/build/android/ant/sdk-targets.xml',
- # If there is a separate find for additonal_src_dirs, it will find the
+ # If there is a separate find for additional_src_dirs, it will find the
# wrong .java files when additional_src_dirs is empty.
'>!@(find >(java_in_dir) >(additional_src_dirs) -name "*.java")',
'<!@(find <(java_in_dir)/<(resource_dir) -name "*")',
« no previous file with comments | « build/android/prepare_library_for_apk ('k') | chrome/chrome_android.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698