| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 # This file is meant to be included into an action to provide a rule that strips | 5 # This file is meant to be included into an action to provide a rule that strips |
| 6 # native libraries. | 6 # native libraries. |
| 7 # | 7 # |
| 8 # To use this, create a gyp target with the following form: | 8 # To use this, create a gyp target with the following form: |
| 9 # { | 9 # { |
| 10 # 'actions': [ | 10 # 'actions': [ |
| 11 # 'variables': { | 11 # 'variables': { |
| 12 # 'intermediate_dir': 'location to place intermediate build artifcats' | |
| 13 # 'ordered_libraries_file': 'file generated by write_ordered_libraries' | 12 # 'ordered_libraries_file': 'file generated by write_ordered_libraries' |
| 14 # 'strip_stamp': 'file to touch when the action is complete' | 13 # 'strip_stamp': 'file to touch when the action is complete' |
| 15 # 'stripped_libraries_dir': 'directory to store stripped libraries', | 14 # 'stripped_libraries_dir': 'directory to store stripped libraries', |
| 16 # }, | 15 # }, |
| 17 # 'includes': [ '../../build/android/strip_native_libraries.gypi' ], | 16 # 'includes': [ '../../build/android/strip_native_libraries.gypi' ], |
| 18 # ], | 17 # ], |
| 19 # }, | 18 # }, |
| 20 # | 19 # |
| 21 | 20 |
| 22 { | 21 { |
| 23 'action_name': 'strip_native_libraries', | 22 'action_name': 'strip_native_libraries', |
| 24 'message': 'Stripping libraries for <(_target_name)', | 23 'message': 'Stripping libraries for <(_target_name)', |
| 25 'inputs': [ | 24 'inputs': [ |
| 26 '<(DEPTH)/build/android/gyp/util/build_utils.py', | 25 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
| 27 '<(DEPTH)/build/android/gyp/strip_library_for_device.py', | 26 '<(DEPTH)/build/android/gyp/strip_library_for_device.py', |
| 28 '<(ordered_libraries_file)' | 27 '<(ordered_libraries_file)' |
| 29 ], | 28 ], |
| 30 'variables': { | |
| 31 'strip_output_paths': [], | |
| 32 'conditions': [ | |
| 33 ['component == "shared_library"', { | |
| 34 # Add a fake output to force the build to always re-run this step. This | |
| 35 # is required because the real inputs are not known at gyp-time and | |
| 36 # changing base.so may not trigger changes to dependent libraries. | |
| 37 'variables': { | |
| 38 'strip_output_paths': [ | |
| 39 '<(intermediate_dir)/<(strip_stamp).fake', | |
| 40 ], | |
| 41 }, | |
| 42 }], | |
| 43 ], | |
| 44 }, | |
| 45 'outputs': [ | 29 'outputs': [ |
| 46 '<(strip_stamp)', | 30 '<(strip_stamp)', |
| 47 '<@(strip_output_paths)', | 31 # Add a fake output to force the build to always re-run this step. This |
| 32 # is required because the real inputs are not known at gyp-time and |
| 33 # changing base.so may not trigger changes to dependent libraries. |
| 34 '<(strip_stamp).fake', |
| 48 ], | 35 ], |
| 49 'action': [ | 36 'action': [ |
| 50 'python', '<(DEPTH)/build/android/gyp/strip_library_for_device.py', | 37 'python', '<(DEPTH)/build/android/gyp/strip_library_for_device.py', |
| 51 '--android-strip=<(android_strip)', | 38 '--android-strip=<(android_strip)', |
| 52 '--android-strip-arg=--strip-unneeded', | 39 '--android-strip-arg=--strip-unneeded', |
| 53 '--stripped-libraries-dir=<(stripped_libraries_dir)', | 40 '--stripped-libraries-dir=<(stripped_libraries_dir)', |
| 54 '--libraries-dir=<(SHARED_LIB_DIR)', | 41 '--libraries-dir=<(SHARED_LIB_DIR)', |
| 55 '--libraries-file=<(ordered_libraries_file)', | 42 '--libraries-file=<(ordered_libraries_file)', |
| 56 '--stamp=<(strip_stamp)', | 43 '--stamp=<(strip_stamp)', |
| 57 ], | 44 ], |
| 58 } | 45 } |
| OLD | NEW |