diff --git a/common.gypi b/common.gypi index 86d133de7..c57f6c2d9 100644 --- a/common.gypi +++ b/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!': [