diff options
author | dpranke <dpranke@chromium.org> | 2016-03-23 14:43:21 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-23 21:44:53 +0000 |
commit | de9261d3072db949f60ffcaf09df404cfd7b807f (patch) | |
tree | 0b5fd7393bfea67564b881aca8d3fc3620da9d11 /build | |
parent | 2864f6e586bc2eba6b7479fee7738a0a2779dd0f (diff) | |
download | chromium_src-de9261d3072db949f60ffcaf09df404cfd7b807f.zip chromium_src-de9261d3072db949f60ffcaf09df404cfd7b807f.tar.gz chromium_src-de9261d3072db949f60ffcaf09df404cfd7b807f.tar.bz2 |
Add MB support for the windows analyze bot.
This adds the MB config for the 'Chromium Windows Analyze' bot
on the chromium.fyi waterfall, and adds the needed flag maps
to disable precompiled headers (incl. adding a disable_precompiled_headers
flag to GN) and adding 'win_analyze' mixin (we need to actually
implement the win_analyze GN flag still, though).
R=brettw@chromium.org, brucedawson@chromium.org
BUG=597112
Review URL: https://codereview.chromium.org/1827683002
Cr-Commit-Position: refs/heads/master@{#382931}
Diffstat (limited to 'build')
-rw-r--r-- | build/config/BUILD.gn | 55 |
1 files changed, 31 insertions, 24 deletions
diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn index 907dff6..222385f 100644 --- a/build/config/BUILD.gn +++ b/build/config/BUILD.gn @@ -33,6 +33,11 @@ declare_args() { # Set to true to enable dcheck in Release builds. dcheck_always_on = false + + # Normally we try to decide whether to use precompiled headers or + # not based on the other build arguments, but in some cases it is + # easiest to force them off explicitly. + disable_precompiled_headers = false } # TODO(brettw) Most of these should be removed. Instead of global feature @@ -438,32 +443,34 @@ config("shared_library_config") { # # Recommend precompiled headers for targets with more than 50 .cc files. config("precompiled_headers") { - if (is_win && !is_official_build && !use_goma) { - # This is a string rather than a file GN knows about. It has to match - # exactly what's in the /FI flag below, and what might appear in the source - # code in quotes for an #include directive. - precompiled_header = "build/precompile.h" + if (!is_official_build && !use_goma && !disable_precompiled_headers) { + if (is_win) { + # This is a string rather than a file GN knows about. It has to match + # exactly what's in the /FI flag below, and what might appear in the + # source code in quotes for an #include directive. + precompiled_header = "build/precompile.h" - # This is a file that GN will compile with the above header. It will be - # implicitly added to the sources (potentially multiple times, with one - # variant for each language used in the target). - precompiled_source = "//build/precompile.cc" + # This is a file that GN will compile with the above header. It will be + # implicitly added to the sources (potentially multiple times, with one + # variant for each language used in the target). + precompiled_source = "//build/precompile.cc" - # Force include the header. - cflags = [ "/FI$precompiled_header" ] + # Force include the header. + cflags = [ "/FI$precompiled_header" ] - # Disable warning for "this file was empty after preprocessing". This - # error is generated only in C mode for ANSI compatibility. It conflicts - # with precompiled headers since the source file that's "compiled" for - # making the precompiled header is empty. - # - # This error doesn't happen every time. In VS2013, it seems if the .pch - # file doesn't exist, no error will be generated (probably MS tested this - # case but forgot the other one?). To reproduce this error, do a build, - # then delete the precompile.c.obj file, then build again. - cflags_c = [ "/wd4206" ] - } else if (is_mac && !is_official_build && !use_goma) { - precompiled_header = "build/precompile.h" - precompiled_source = "//build/precompile.h" + # Disable warning for "this file was empty after preprocessing". This + # error is generated only in C mode for ANSI compatibility. It conflicts + # with precompiled headers since the source file that's "compiled" for + # making the precompiled header is empty. + # + # This error doesn't happen every time. In VS2013, it seems if the .pch + # file doesn't exist, no error will be generated (probably MS tested this + # case but forgot the other one?). To reproduce this error, do a build, + # then delete the precompile.c.obj file, then build again. + cflags_c = [ "/wd4206" ] + } else if (is_mac) { + precompiled_header = "build/precompile.h" + precompiled_source = "//build/precompile.h" + } } } |