[Android] Only always trigger stripping with component build

With the component build we need to always trigger stripping because we
can't specify the inputs correctly at gyp time. This is not required
for the non-component build.

Also, slightly refactor strip_native_libraries.gypi and its users to
make it more clear what variables are being used by the .gypi.

Review URL: https://chromiumcodereview.appspot.com/14844009

git-svn-id: http://src.chromium.org/svn/trunk/src/build@200422 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
cjhopman@chromium.org 2013-05-16 02:40:29 +00:00
Родитель 22892053ed
Коммит f13445c6a5
3 изменённых файлов: 20 добавлений и 18 удалений

Просмотреть файл

@ -25,12 +25,6 @@
#
{
'variables': {
'intermediate_dir': '<(PRODUCT_DIR)/<(_target_name)',
'ordered_libraries_file': '<(intermediate_dir)/native_libraries.json',
'stripped_libraries_dir%': '<(output_dir)',
'strip_stamp': '<(intermediate_dir)/strip.stamp',
},
'copies': [
{
'destination': '<(output_dir)',
@ -43,10 +37,8 @@
'<(DEPTH)/build/android/setup.gyp:copy_system_libraries',
],
'variables': {
'intermediate_dir': '<(PRODUCT_DIR)/<(_target_name)',
'ordered_libraries_file': '<(intermediate_dir)/native_libraries.json',
'stripped_libraries_dir%': '<(output_dir)',
'strip_stamp': '<(intermediate_dir)/strip.stamp',
'intermediate_dir': '<(PRODUCT_DIR)/<(_target_name)',
'ordered_libraries_file': '<(intermediate_dir)/native_libraries.json',
},
'actions': [
{
@ -56,8 +48,11 @@
'includes': ['../../build/android/write_ordered_libraries.gypi'],
},
{
'action_name': 'stripping native libraries',
'variables': {
'stripped_libraries_dir%': '<(output_dir)',
'input_paths': ['<(native_binary)'],
'stamp': '<(intermediate_dir)/strip.stamp',
},
'includes': ['../../build/android/strip_native_libraries.gypi'],
},

Просмотреть файл

@ -7,11 +7,12 @@
#
# To use this, create a gyp target with the following form:
# {
# 'action_name': 'strip_native_libraries',
# 'actions': [
# 'variables': {
# 'ordered_libraries_file': 'file generated by write_ordered_libraries'
# 'input_paths': 'files to be added to the list of inputs'
# 'strip_stamp': 'file to touch when the action is complete'
# 'stamp': 'file to touch when the action is complete'
# 'stripped_libraries_dir': 'directory to store stripped libraries',
# },
# 'includes': [ '../../build/android/strip_native_libraries.gypi' ],
@ -20,7 +21,6 @@
#
{
'action_name': 'strip_native_libraries',
'message': 'Stripping libraries for <(_target_name)',
'variables': {
'input_paths': [],
@ -32,11 +32,15 @@
'>@(input_paths)',
],
'outputs': [
'<(strip_stamp)',
# 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_stamp).fake',
'<(stamp)',
],
'conditions': [
['component == "shared_library"', {
# 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.
'outputs': [ '<(stamp).fake' ]
}],
],
'action': [
'python', '<(DEPTH)/build/android/gyp/strip_library_for_device.py',
@ -45,6 +49,6 @@
'--stripped-libraries-dir=<(stripped_libraries_dir)',
'--libraries-dir=<(SHARED_LIB_DIR)',
'--libraries-file=<(ordered_libraries_file)',
'--stamp=<(strip_stamp)',
'--stamp=<(stamp)',
],
}

Просмотреть файл

@ -217,9 +217,12 @@
],
},
{
'action_name': 'strip_native_libraries',
'variables': {
'ordered_libraries_file%': '<(ordered_libraries_file)',
'stripped_libraries_dir': '<(libraries_source_dir)',
'input_paths': ['<@(native_libs_paths)'],
'stamp': '<(strip_stamp)'
},
'includes': ['../build/android/strip_native_libraries.gypi'],
},