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

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: Nits + update binaries for telemetry 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: build/common.gypi
diff --git a/build/common.gypi b/build/common.gypi
index 3e18a4b188df2a391f2119b76a167bb19f0da2d3..59740500d73f0f60584410ffb470e8a941d6eec7 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -4238,10 +4238,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',
],
@@ -4250,16 +4260,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': [

Powered by Google App Engine
This is Rietveld 408576698