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

Unified Diff: build/common.gypi

Issue 17820002: Add compiler flags that prevent text relocations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add flag for release. Created 7 years, 6 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 | « no previous file | sandbox/linux/sandbox_linux.gypi » ('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 75cb12e9d28d491ae97381a17ef1da26a9cbd773..85a40da6c395d2a4b060a2da70368415b38c2dae 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -2757,10 +2757,14 @@
],
'conditions' : [
['OS=="android"', {
- # Only link with needed input sections. This is to avoid getting
- # undefined reference to __cxa_bad_typeid in the CDU library.
'ldflags': [
+ '-Wl,--fatal-warnings',
+ # Only link with needed input sections. This is to avoid
+ # getting undefined reference to __cxa_bad_typeid in the CDU
+ # library.
'-Wl,--gc-sections',
+ # Warn in case of text relocations.
+ '-Wl,--warn-shared-textrel',
],
}],
['OS=="android" and android_full_debug==0', {
@@ -2830,6 +2834,11 @@
'cflags': [
'-fomit-frame-pointer',
],
+ 'ldflags': [
+ '-Wl,--fatal-warnings',
+ # Warn in case of text relocations.
+ '-Wl,--warn-shared-textrel',
+ ],
}],
['clang==1', {
'cflags!': [
« no previous file with comments | « no previous file | sandbox/linux/sandbox_linux.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698