summaryrefslogtreecommitdiffstats
path: root/build/common.gypi
diff options
context:
space:
mode:
authorbrucedawson <brucedawson@chromium.org>2016-02-18 17:48:21 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-19 01:49:50 +0000
commitf2022a6019e290df03ba46b44396372043a11a44 (patch)
tree8c9f692d88c8d949058edb23f4214c65e4f29fec /build/common.gypi
parent5e288c8b55f4ab8173485fa69f7ee59e2c6a3a5f (diff)
downloadchromium_src-f2022a6019e290df03ba46b44396372043a11a44.zip
chromium_src-f2022a6019e290df03ba46b44396372043a11a44.tar.gz
chromium_src-f2022a6019e290df03ba46b44396372043a11a44.tar.bz2
Build without thread-safe statics with VC++ 2015
For consistently with other platforms, and to avoid the overhead, build with /Zc:threadSafeInit- to disable thread-safe statics on VC++ 2015. VC++ 2013 did not support thread safe statics so this merely maintains existing behavior across the transition. This saves ~54 thousand bytes of file size in chrome*.dll. BUG=440500,587210 Review URL: https://codereview.chromium.org/1706023002 Cr-Commit-Position: refs/heads/master@{#376341}
Diffstat (limited to 'build/common.gypi')
-rw-r--r--build/common.gypi6
1 files changed, 6 insertions, 0 deletions
diff --git a/build/common.gypi b/build/common.gypi
index 3dfcc90..c2e617f 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -3282,6 +3282,10 @@
'AdditionalOptions': [
# Work around crbug.com/526851, bug in VS 2015 RTM compiler.
'/Zc:sizedDealloc-',
+ # Disable thread-safe statics to avoid overhead and because
+ # they are disabled on other platforms. See crbug.com/587210
+ # and -fno-threadsafe-statics.
+ '/Zc:threadSafeInit-',
],
},
},
@@ -3689,6 +3693,8 @@
'cflags_cc': [
'-fno-exceptions',
'-fno-rtti',
+ # If this is removed then remove the corresponding /Zc:threadSafeInit-
+ # for Windows.
'-fno-threadsafe-statics',
# Make inline functions have hidden visiblity by default.
# Surprisingly, not covered by -fvisibility=hidden.