Disable RTTI and C++ exceptions in the Mac build. Disable RTTI in the Linux
build, where C++ exceptions are already disabled.
BUG=19094 12248
TEST=Mac release-mode Google Chrome.app should shrink by about 6MB.
Mac disk image should shrink by about 1.5MB.
Linux binary and package should shrink too.
Review URL: http://codereview.chromium.org/165330
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23304 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/build/common.gypi b/build/common.gypi
index d9d35dc8..8ff4fb3b 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -356,13 +356,14 @@
'werror%': '-Werror',
},
'cflags': [
- '<(werror)', # See note above about the werror variable.
- '-pthread',
- '-fno-exceptions',
- '-Wall',
- '-D_FILE_OFFSET_BITS=64',
+ '<(werror)', # See note above about the werror variable.
+ '-pthread',
+ '-fno-exceptions',
+ '-Wall',
+ '-D_FILE_OFFSET_BITS=64',
],
'cflags_cc': [
+ '-fno-rtti',
'-fno-threadsafe-statics',
],
'ldflags': [
@@ -558,6 +559,8 @@
'GCC_C_LANGUAGE_STANDARD': 'c99',
'GCC_CW_ASM_SYNTAX': 'NO',
'GCC_DYNAMIC_NO_PIC': 'NO',
+ 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO',
+ 'GCC_ENABLE_CPP_RTTI': 'NO',
'GCC_ENABLE_PASCAL_STRINGS': 'NO',
'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
'GCC_OBJC_CALL_CXX_CDTORS': 'YES',