Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3345)

Unified Diff: build/android/pack_arm_relocations.gypi

Issue 358863002: Add gyp machinery to build with packed ARM relative relocations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Call MakeDirectory() on output dir Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/gyp/pack_arm_relocations.py ('k') | build/common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pack_arm_relocations.gypi
diff --git a/build/android/pack_arm_relocations.gypi b/build/android/pack_arm_relocations.gypi
new file mode 100644
index 0000000000000000000000000000000000000000..5a6589b138f32a50fa21e63bc5c58b3668026f0d
--- /dev/null
+++ b/build/android/pack_arm_relocations.gypi
@@ -0,0 +1,76 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This file is meant to be included into an action to provide a rule that
+# packs ARM relative relocations in native libraries.
+#
+# To use this, create a gyp target with the following form:
+# {
+# 'action_name': 'pack_arm_relocations',
+# 'actions': [
+# 'variables': {
+# 'enable_packing': 'pack relocations if 1, plain file copy if 0'
+# 'exclude_packing_list': 'names of libraries explicitly not packed',
+# 'ordered_libraries_file': 'file generated by write_ordered_libraries'
+# 'input_paths': 'files to be added to the list of inputs'
+# 'stamp': 'file to touch when the action is complete'
+# 'stripped_libraries_dir': 'directory holding stripped libraries',
+# 'packed_libraries_dir': 'directory holding packed libraries',
+# 'includes': [ '../../build/android/pack_arm_relocations.gypi' ],
+# ],
+# },
+#
+
+{
+ 'variables': {
+ 'input_paths': [],
+ },
+ 'inputs': [
+ '<(DEPTH)/build/android/gyp/util/build_utils.py',
+ '<(DEPTH)/build/android/gyp/pack_arm_relocations.py',
+ '<(ordered_libraries_file)',
+ '>@(input_paths)',
+ ],
+ 'outputs': [
+ '<(stamp)',
+ ],
+ 'conditions': [
+ ['enable_packing == 1', {
+ 'message': 'Packing ARM relative relocations for <(_target_name)',
+ 'dependencies': [
+ '<(DEPTH)/tools/relocation_packer/relocation_packer.gyp:relocation_packer#host',
+ ],
+ 'inputs': [
+ '<(PRODUCT_DIR)/relocation_packer',
+ ],
+ 'action': [
+ 'python', '<(DEPTH)/build/android/gyp/pack_arm_relocations.py',
+ '--enable-packing=1',
+ '--exclude-packing-list=<@(exclude_packing_list)',
+ '--android-pack-relocations=<(PRODUCT_DIR)/relocation_packer',
+ '--android-objcopy=<(android_objcopy)',
+ '--stripped-libraries-dir=<(stripped_libraries_dir)',
+ '--packed-libraries-dir=<(packed_libraries_dir)',
+ '--libraries-file=<(ordered_libraries_file)',
+ '--stamp=<(stamp)',
+ ],
+ }, {
+ 'message': 'Copying libraries (no relocation packing) for <(_target_name)',
+ 'action': [
+ 'python', '<(DEPTH)/build/android/gyp/pack_arm_relocations.py',
+ '--enable-packing=0',
+ '--stripped-libraries-dir=<(stripped_libraries_dir)',
+ '--packed-libraries-dir=<(packed_libraries_dir)',
+ '--libraries-file=<(ordered_libraries_file)',
+ '--stamp=<(stamp)',
+ ],
+ }],
+ ['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' ]
+ }],
+ ],
+}
« no previous file with comments | « build/android/gyp/pack_arm_relocations.py ('k') | build/common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698