Disable Warning 4702 for the PGO builds.

There's more optimization done on a PGO build than on a regular one, this results in some "Unreachable code" warnings that we don't see normally.

But probably anything that this would catch that wouldn't be caught in a normal build isn't going to actually be a bug, so the incremental value of C4702 for PGO builds is likely very small and blocks the setup of the PGO bots.

BUG=380175

Review URL: https://codereview.chromium.org/315323002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276737 0039d316-1c4b-4281-b951-d872f2087c98
parent 3d458921
......@@ -537,19 +537,10 @@ LogMessage::LogMessage(const char* file, int line)
Init(file, line);
}
#if defined(OS_WIN)
// Disable warning C4702 ("unreachable code") until we fix crbug.com/380175.
// TODO(scottmg|sebmarchand): Remove this pragma once the bug is fixed.
#pragma warning(push)
#pragma warning(disable: 4702)
#endif
LogMessage::LogMessage(const char* file, int line, LogSeverity severity)
: severity_(severity), file_(file), line_(line) {
Init(file, line);
}
#if defined(OS_WIN)
#pragma warning(pop)
#endif
LogMessage::LogMessage(const char* file, int line, std::string* result)
: severity_(LOG_FATAL), file_(file), line_(line) {
......
......@@ -4979,6 +4979,14 @@
},
],
['optimize=="max"', {
# Disable Warning 4702 ("Unreachable code") for the WPO/PGO
# builds. Probably anything that this would catch that
# wouldn't be caught in a normal build isn't going to
# actually be a bug, so the incremental value of C4702 for
# PGO builds is likely very small.
'msvs_disabled_warnings': [
4702
],
'msvs_settings': {
'VCCLCompilerTool': {
# 2, optimizeMaxSpeed, Maximize Speed (/O2)
......
......@@ -766,6 +766,11 @@ config("optimize_max") {
cflags += [
"/Ot", # Favor speed over size.
"/GL", # Whole program optimization.
# Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds.
# Probably anything that this would catch that wouldn't be caught in a
# normal build isn't going to actually be a bug, so the incremental value
# of C4702 for PGO builds is likely very small.
"/wd4702",
]
} else {
cflags += [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment