diff options
author | yfriedman@chromium.org <yfriedman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-18 07:23:26 +0000 |
---|---|---|
committer | yfriedman@chromium.org <yfriedman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-18 07:23:26 +0000 |
commit | 7beabebff197b32fcb8c8ddcbc638ac80c908df7 (patch) | |
tree | 3879e9d625e1671e17df92bc9e6e17d8325a61fa /build/java_apk.gypi | |
parent | 82cafd94d689e4779840c78c842ba36f63c55efc (diff) | |
download | chromium_src-7beabebff197b32fcb8c8ddcbc638ac80c908df7.zip chromium_src-7beabebff197b32fcb8c8ddcbc638ac80c908df7.tar.gz chromium_src-7beabebff197b32fcb8c8ddcbc638ac80c908df7.tar.bz2 |
[Android] Fix forwarder for the component build
Repurposes the gyp scripts for processing native libraries for an apk and use them for a native library (i.e. forwarder).
Additionally, adjusts the forwarder python script to set LD_LIBRARY_PATH when invoking the forwarder.
BUG=158821
Review URL: https://chromiumcodereview.appspot.com/14322004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194833 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/java_apk.gypi')
-rw-r--r-- | build/java_apk.gypi | 83 |
1 files changed, 12 insertions, 71 deletions
diff --git a/build/java_apk.gypi b/build/java_apk.gypi index 8521742..ecf5474 100644 --- a/build/java_apk.gypi +++ b/build/java_apk.gypi @@ -107,7 +107,6 @@ 'final_apk_path%': '<(PRODUCT_DIR)/apks/<(apk_name).apk', 'source_dir': '<(java_in_dir)/src', 'apk_install_stamp': '<(intermediate_dir)/apk_install.stamp', - 'strip_output_paths': [], 'apk_package_native_libs_dir': '<(intermediate_dir)/libs', }, # Pass the jar path to the apk's "fake" jar target. This would be better as @@ -137,14 +136,6 @@ 'dependencies': [ '<(DEPTH)/build/android/setup.gyp:copy_system_libraries', ], - 'variables': { - # Add a fake output to force the build to always re-run this step. This - # is required because the real inputs are not known at gyp-time and - # changing base.so may not trigger changes to dependent libraries. - 'strip_output_paths': [ - '<(intermediate_dir)/<(strip_stamp).fake', - ], - }, }], ['native_lib_target != ""', { 'variables': { @@ -154,22 +145,10 @@ }, 'actions': [ { - 'action_name': 'ordered_libraries_<(_target_name)', - 'message': 'Writing dependency ordered libraries for <(_target_name).', - 'inputs': [ - '<(DEPTH)/build/android/gyp/util/build_utils.py', - '<(DEPTH)/build/android/gyp/write_ordered_libraries.py', - '<@(native_libs_paths)', - ], - 'outputs': [ - '<(ordered_libraries_file)', - ], - 'action': [ - 'python', '<(DEPTH)/build/android/gyp/write_ordered_libraries.py', - '--input-libraries=<(native_libs_paths)', - '--readelf=<(android_readelf)', - '--output=<(ordered_libraries_file)', - ], + 'variables': { + 'input_libraries': ['<@(native_libs_paths)'], + }, + 'includes': ['../build/android/write_ordered_libraries.gypi'], }, { 'action_name': 'native_libraries_template_data_<(_target_name)', @@ -210,32 +189,16 @@ ], }, { - 'action_name': 'strip_native_libraries', - 'message': 'Stripping libraries for <(_target_name)', - 'inputs': [ - '<(DEPTH)/build/android/gyp/util/build_utils.py', - '<(DEPTH)/build/android/gyp/strip_library_for_apk.py', - '<(ordered_libraries_file)' - ], - 'outputs': [ - '<(strip_stamp)', - '<@(strip_output_paths)', - ], - 'action': [ - 'python', '<(DEPTH)/build/android/gyp/strip_library_for_apk.py', - '--android-strip=<(android_strip)', - '--android-strip-arg=--strip-unneeded', - '--stripped-libraries-dir=<(apk_libraries_dir)', - '--libraries-dir=<(SHARED_LIB_DIR)', - '--libraries-file=<(ordered_libraries_file)', - '--stamp=<(strip_stamp)', - ], + 'variables': { + 'stripped_libraries_dir': '<(libraries_source_dir)', + }, + 'includes': ['../build/android/strip_native_libraries.gypi'], }, ], 'conditions': [ ['gyp_managed_install == 1', { 'variables': { - 'apk_libraries_dir': '<(intermediate_dir)/lib.stripped/<(android_app_abi)', + 'libraries_source_dir': '<(intermediate_dir)/lib.stripped/<(android_app_abi)', 'apk_package_native_libs_dir': '<(intermediate_dir)/libs.managed', 'device_library_dir': '/data/local/tmp/chromium/lib.stripped/<(_target_name)', }, @@ -244,29 +207,7 @@ ], 'actions': [ { - 'action_name': 'push_libraries_<(_target_name)', - 'message': 'Pushing libraries to device for <(_target_name)', - 'inputs': [ - '<(DEPTH)/build/android/gyp/util/build_utils.py', - '<(DEPTH)/build/android/gyp/util/md5_check.py', - '<(DEPTH)/build/android/gyp/push_libraries.py', - '<(strip_stamp)', - ], - 'outputs': [ - '<(push_stamp)', - # If a user switches the connected device, new libraries may - # need to be pushed even if there have been no changes. To - # ensure that the libraries on the device are always - # up-to-date, this step should always be triggered. - '<(push_stamp).fake', - ], - 'action': [ - 'python', '<(DEPTH)/build/android/gyp/push_libraries.py', - '--libraries-dir=<(apk_libraries_dir)', - '--device-dir=<(device_library_dir)', - '--libraries-json=<(ordered_libraries_file)', - '--stamp=<(push_stamp)', - ], + 'includes': ['../build/android/push_libraries.gypi'], }, { 'action_name': 'create_library_links', @@ -283,7 +224,7 @@ 'python', '<(DEPTH)/build/android/gyp/create_device_library_links.py', '--apk=<(final_apk_path)', '--libraries-json=<(ordered_libraries_file)', - '--libraries-dir=<(apk_libraries_dir)', + '--libraries-dir=<(libraries_source_dir)', '--target-dir=<(device_library_dir)', '--stamp=<(link_stamp)', ], @@ -292,7 +233,7 @@ }, { # gyp_managed_install != 1 'variables': { - 'apk_libraries_dir': '<(apk_package_native_libs_dir)/<(android_app_abi)', + 'libraries_source_dir': '<(apk_package_native_libs_dir)/<(android_app_abi)', 'package_input_paths': [ '<(strip_stamp)' ], }, }], |