diff options
-rw-r--r-- | build/common.gypi | 13 | ||||
-rw-r--r-- | sandbox/linux/sandbox_linux.gypi | 5 |
2 files changed, 16 insertions, 2 deletions
diff --git a/build/common.gypi b/build/common.gypi index 86d133d..c57f6c2 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -2761,10 +2761,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', { @@ -2834,6 +2838,11 @@ 'cflags': [ '-fomit-frame-pointer', ], + 'ldflags': [ + '-Wl,--fatal-warnings', + # Warn in case of text relocations. + '-Wl,--warn-shared-textrel', + ], }], ['clang==1', { 'cflags!': [ diff --git a/sandbox/linux/sandbox_linux.gypi b/sandbox/linux/sandbox_linux.gypi index 8dc97ce..29639f8 100644 --- a/sandbox/linux/sandbox_linux.gypi +++ b/sandbox/linux/sandbox_linux.gypi @@ -76,6 +76,11 @@ 'dependencies': [ '../testing/android/native_test.gyp:native_test_native_code', ], + 'ldflags!': [ + # Remove warnings about text relocations, to prevent build + # failure. + '-Wl,--warn-shared-textrel' + ], }], ], }, |