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

Unified Diff: tools/android/run_pie/run_pie.gyp

Issue 287513002: [Android] Build android tools as PIE and add a wrapper for ICS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
Index: tools/android/run_pie/run_pie.gyp
diff --git a/tools/android/run_pie/run_pie.gyp b/tools/android/run_pie/run_pie.gyp
new file mode 100644
index 0000000000000000000000000000000000000000..aae012988ce1436fb09c994b889828fae883b050
--- /dev/null
+++ b/tools/android/run_pie/run_pie.gyp
@@ -0,0 +1,48 @@
+# 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.
+
+{
+ 'targets': [
+ {
+ 'target_name': 'run_pie-unstripped',
+ 'type': 'executable',
+ 'sources': [
+ 'run_pie.c',
+ ],
+ # Of course, run_pie is the only Android executable which must be NON-PIE.
bulach 2014/05/14 12:57:05 nit: be kind on our future selves! s/Of course/See
Primiano Tucci (use gerrit) 2014/05/14 13:21:23 Done.
+ 'cflags!': [
+ '-fPIE',
+ ],
+ 'ldflags!': [
+ '-pie',
+ ],
+ # Don't inherit unneeded dependencies on stlport.so, so the binary remains
+ # self-contained also in component=shared_library builds.
+ 'libraries!': [
+ '-l<(android_stlport_library)',
+ ],
+ },
+ {
+ 'target_name': 'run_pie',
+ 'type': 'none',
+ 'dependencies': [
+ 'run_pie-unstripped',
+ ],
+ 'actions': [
+ {
+ 'action_name': 'strip_run_pie',
+ 'inputs': ['<(PRODUCT_DIR)/run_pie-unstripped'],
+ 'outputs': ['<(PRODUCT_DIR)/run_pie'],
+ 'action': [
+ '<(android_strip)',
+ '--strip-unneeded',
+ '<@(_inputs)',
+ '-o',
+ '<@(_outputs)',
+ ],
+ },
+ ],
+ },
+ ],
+}

Powered by Google App Engine
This is Rietveld 408576698