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. 4 5 # This file is meant to be included into an action to provide a rule that 6 # generates a json file with the list of dependent libraries needed for a given 7 # shared library or executable. 8 # 9 # To use this, create a gyp target with the following form: 10 # { 11 # 'actions': [ 12 # 'variables': { 13 # 'input_libraries': 'shared library or executable to process', 14 # 'ordered_libraries_file': 'file to generate' 15 # }, 16 # 'includes': [ '../../build/android/write_ordered_libraries.gypi' ], 17 # ], 18 # }, 19 # 20 21 { 22 'action_name': 'ordered_libraries_<(_target_name)', 23 'message': 'Writing dependency ordered libraries for <(_target_name)', 24 'variables': { 25 'input_libraries%': [], 26 }, 27 'inputs': [ 28 '<(DEPTH)/build/android/gyp/util/build_utils.py', 29 '<(DEPTH)/build/android/gyp/write_ordered_libraries.py', 30 '<@(input_libraries)', 31 ], 32 'outputs': [ 33 '<(ordered_libraries_file)', 34 ], 35 'action': [ 36 'python', '<(DEPTH)/build/android/gyp/write_ordered_libraries.py', 37 '--input-libraries=<(input_libraries)', 38 '--libraries-dir=<(SHARED_LIB_DIR)', 39 '--readelf=<(android_readelf)', 40 '--output=<(ordered_libraries_file)', 41 ], 42 } 43