Chromium Code Reviews| 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 # 'action_name': 'strip_native_libraries', | |
| 10 # 'actions': [ | 11 # 'actions': [ |
| 11 # 'variables': { | 12 # 'variables': { |
| 12 # 'ordered_libraries_file': 'file generated by write_ordered_libraries' | 13 # 'ordered_libraries_file': 'file generated by write_ordered_libraries' |
| 13 # 'input_paths': 'files to be added to the list of inputs' | 14 # 'input_paths': 'files to be added to the list of inputs' |
| 14 # 'strip_stamp': 'file to touch when the action is complete' | 15 # 'stamp': 'file to touch when the action is complete' |
| 15 # 'stripped_libraries_dir': 'directory to store stripped libraries', | 16 # 'stripped_libraries_dir': 'directory to store stripped libraries', |
| 17 # 'always_run': 0, # set to 1 to force this action to always run | |
| 16 # }, | 18 # }, |
| 17 # 'includes': [ '../../build/android/strip_native_libraries.gypi' ], | 19 # 'includes': [ '../../build/android/strip_native_libraries.gypi' ], |
| 18 # ], | 20 # ], |
| 19 # }, | 21 # }, |
| 20 # | 22 # |
| 21 | 23 |
| 22 { | 24 { |
| 23 'action_name': 'strip_native_libraries', | |
|
Yaron
2013/05/15 00:32:41
Why did you pull this out?
cjhopman
2013/05/15 21:13:33
An action_name must be unique within a target. I a
| |
| 24 'message': 'Stripping libraries for <(_target_name)', | 25 'message': 'Stripping libraries for <(_target_name)', |
| 25 'variables': { | 26 'variables': { |
| 26 'input_paths': [], | 27 'input_paths': [], |
| 27 }, | 28 }, |
| 28 'inputs': [ | 29 'inputs': [ |
| 29 '<(DEPTH)/build/android/gyp/util/build_utils.py', | 30 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
| 30 '<(DEPTH)/build/android/gyp/strip_library_for_device.py', | 31 '<(DEPTH)/build/android/gyp/strip_library_for_device.py', |
| 31 '<(ordered_libraries_file)', | 32 '<(ordered_libraries_file)', |
| 32 '>@(input_paths)', | 33 '>@(input_paths)', |
| 33 ], | 34 ], |
| 34 'outputs': [ | 35 'outputs': [ |
| 35 '<(strip_stamp)', | 36 '<(stamp)', |
| 36 # Add a fake output to force the build to always re-run this step. This | 37 ], |
| 37 # is required because the real inputs are not known at gyp-time and | 38 'conditions': [ |
| 38 # changing base.so may not trigger changes to dependent libraries. | 39 ['component == "shared_library"', { |
| 39 '<(strip_stamp).fake', | 40 # Add a fake output to force the build to always re-run this step. This |
| 41 # is required because the real inputs are not known at gyp-time and | |
| 42 # changing base.so may not trigger changes to dependent libraries. | |
| 43 'outputs': [ '<(stamp).fake' ] | |
| 44 }], | |
| 40 ], | 45 ], |
| 41 'action': [ | 46 'action': [ |
| 42 'python', '<(DEPTH)/build/android/gyp/strip_library_for_device.py', | 47 'python', '<(DEPTH)/build/android/gyp/strip_library_for_device.py', |
| 43 '--android-strip=<(android_strip)', | 48 '--android-strip=<(android_strip)', |
| 44 '--android-strip-arg=--strip-unneeded', | 49 '--android-strip-arg=--strip-unneeded', |
| 45 '--stripped-libraries-dir=<(stripped_libraries_dir)', | 50 '--stripped-libraries-dir=<(stripped_libraries_dir)', |
| 46 '--libraries-dir=<(SHARED_LIB_DIR)', | 51 '--libraries-dir=<(SHARED_LIB_DIR)', |
| 47 '--libraries-file=<(ordered_libraries_file)', | 52 '--libraries-file=<(ordered_libraries_file)', |
| 48 '--stamp=<(strip_stamp)', | 53 '--stamp=<(stamp)', |
| 49 ], | 54 ], |
| 50 } | 55 } |
| OLD | NEW |