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
3 # found in the LICENSE file.
5 # This file is meant to be included into an action to provide a rule that strips
8 # To use this, create a gyp target with the following form:
10 # 'action_name': 'strip_native_libraries',
13 # 'ordered_libraries_file': 'file generated by write_ordered_libraries'
14 # 'input_paths': 'files to be added to the list of inputs'
15 # 'stamp': 'file to touch when the action is complete'
16 # 'stripped_libraries_dir': 'directory to store stripped libraries',
18 # 'includes': [ '../../build/android/strip_native_libraries.gypi' ],
24 'message': 'Stripping libraries for <(_target_name)',
29 '<(DEPTH)/build/android/gyp/util/build_utils.py',
30 '<(DEPTH)/build/android/gyp/strip_library_for_device.py',
31 '<(ordered_libraries_file)',
38 ['android_must_copy_system_libraries == 1', {
39 # Add a fake output to force the build to always re-run this step. This
40 # is required because the real inputs are not known at gyp-time and
41 # changing base.so may not trigger changes to dependent libraries.
42 'outputs': [ '<(stamp).fake' ]
46 'python', '<(DEPTH)/build/android/gyp/strip_library_for_device.py',
47 '--android-strip=<(android_strip)',
48 '--android-strip-arg=--strip-unneeded',
49 '--stripped-libraries-dir=<(stripped_libraries_dir)',
50 '--libraries-dir=<(SHARED_LIB_DIR),<(PRODUCT_DIR)',
51 '--libraries=@FileArg(<(ordered_libraries_file):libraries)',