diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-13 18:11:04 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-13 18:11:04 +0000 |
commit | ab295637537b23093388b1dc0b8395e7f4c2088d (patch) | |
tree | 6e772ff95be068dcc04d7baaac7d50c5c67992c6 /build | |
parent | 199ed63f28098561badf54c521282f1c43ca91a6 (diff) | |
download | chromium_src-ab295637537b23093388b1dc0b8395e7f4c2088d.zip chromium_src-ab295637537b23093388b1dc0b8395e7f4c2088d.tar.gz chromium_src-ab295637537b23093388b1dc0b8395e7f4c2088d.tar.bz2 |
Use -fno-threadsafe-statics to disable thread-safe static semantics in C++.
This will eliminate the cxa_guard_acquire/release locks around static guard
accesses. The Windows compiler doesn't support thread-safe statics at all,
so none of our cross-platform code relies on thread safety. We are using
-fno-threadsafe-statics on Linux as well, since r20616. It's likely that
threading is not a concern in most to all Mac-specific code using statics.
BUG=16713
TEST=none
Review URL: http://codereview.chromium.org/165461
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23326 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r-- | build/common.gypi | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/build/common.gypi b/build/common.gypi index 8ff4fb3..99025df 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -198,8 +198,8 @@ 'conditions': [ ['OS=="mac"', { 'xcode_settings': { - 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', - 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', + 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs + 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage }, # Add -lgcov for executables, not for static_libraries. # This is a delayed conditional. @@ -245,7 +245,7 @@ [ 'OS=="mac"', { 'xcode_settings': { 'COPY_PHASE_STRIP': 'NO', - 'GCC_OPTIMIZATION_LEVEL': '0', + 'GCC_OPTIMIZATION_LEVEL': '0', # -O0 } }], [ 'OS=="win"', { @@ -279,7 +279,7 @@ 'conditions': [ [ 'OS=="mac"', { 'xcode_settings': { - 'DEAD_CODE_STRIPPING': 'YES', + 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip 'conditions': [ ['mac_release_optimization != "UNSET"', {'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)'}], @@ -556,21 +556,23 @@ 'mac_bundle': 0, 'xcode_settings': { 'ALWAYS_SEARCH_USER_PATHS': 'NO', - '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', - 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', - 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', + 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99 + 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks + 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic + # (Equivalent to -fPIC) + 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions + 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti + 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings + 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES', # -fvisibility-inlines-hidden + 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors + 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden + 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics + 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror 'GCC_VERSION': '4.2', - 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', - 'MACOSX_DEPLOYMENT_TARGET': '10.5', - 'PREBINDING': 'NO', - 'SDKROOT': 'macosx10.5', + 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof + 'MACOSX_DEPLOYMENT_TARGET': '10.5', # -mmacosx-version-min=10.5 + 'PREBINDING': 'NO', # No -Wl,-prebind + 'SDKROOT': 'macosx10.5', # -isysroot 'USE_HEADERMAP': 'NO', 'WARNING_CFLAGS': ['-Wall', '-Wendif-labels'], 'conditions': [ |