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

Unified Diff: build/common.gypi

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: Rebase 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
« no previous file with comments | « build/android/pylib/forwarder.py ('k') | tools/android/android_tools.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/common.gypi
diff --git a/build/common.gypi b/build/common.gypi
index 4000efe768d7df16aef16cb3402652c9fd1f45d8..e1be6a11068dd443142a009c2de28641c9cd09f2 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -4240,10 +4240,20 @@
],
'target_conditions': [
['_type=="executable"', {
+ # Force android tools to export the "main" symbol so they can be
+ # loaded on ICS using the run_pie wrapper. See crbug.com/373219.
+ # TODO(primiano): remove -fvisibility and -rdynamic flags below
+ # when ICS support will be dropped.
+ 'cflags': [
+ '-fPIE',
+ '-fvisibility=default',
+ ],
'ldflags': [
'-Bdynamic',
'-Wl,--gc-sections',
'-Wl,-z,nocopyreloc',
+ '-pie',
+ '-rdynamic',
# crtbegin_dynamic.o should be the last item in ldflags.
'<(android_ndk_lib)/crtbegin_dynamic.o',
],
@@ -4252,16 +4262,6 @@
# Do not add any libraries after this!
'<(android_ndk_lib)/crtend_android.o',
],
- 'conditions': [
- ['asan==1', {
- 'cflags': [
- '-fPIE',
- ],
- 'ldflags': [
- '-pie',
- ],
- }],
- ],
}],
['_type=="shared_library" or _type=="loadable_module"', {
'ldflags': [
« no previous file with comments | « build/android/pylib/forwarder.py ('k') | tools/android/android_tools.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698