Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: build/config/BUILD.gn

Issue 1261953002: Re-enable precompiled headers in GN on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more flags Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/allocator.gni") 5 import("//build/config/allocator.gni")
6 import("//build/config/chrome_build.gni") 6 import("//build/config/chrome_build.gni")
7 import("//build/config/crypto.gni") 7 import("//build/config/crypto.gni")
8 import("//build/config/features.gni") 8 import("//build/config/features.gni")
9 import("//build/config/sanitizers/sanitizers.gni") 9 import("//build/config/sanitizers/sanitizers.gni")
10 import("//build/config/ui.gni") 10 import("//build/config/ui.gni")
11 import("//build/module_args/v8.gni") 11 import("//build/module_args/v8.gni")
12 import("//build/toolchain/goma.gni")
12 13
13 declare_args() { 14 declare_args() {
14 # When set, turns off the (normally-on) iterator debugging and related stuff 15 # When set, turns off the (normally-on) iterator debugging and related stuff
15 # that is normally turned on for Debug builds. These are generally useful for 16 # that is normally turned on for Debug builds. These are generally useful for
16 # catching bugs but in some cases may cause conflicts or excessive slowness. 17 # catching bugs but in some cases may cause conflicts or excessive slowness.
17 disable_iterator_debugging = false 18 disable_iterator_debugging = false
18 19
19 # Set to true to not store any build metadata, e.g. ifdef out all __DATE__ 20 # Set to true to not store any build metadata, e.g. ifdef out all __DATE__
20 # and __TIME__. Set to 0 to reenable the use of these macros in the code 21 # and __TIME__. Set to 0 to reenable the use of these macros in the code
21 # base. See http://crbug.com/314403. 22 # base. See http://crbug.com/314403.
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 # Add this config to your target to enable precompiled headers. 412 # Add this config to your target to enable precompiled headers.
412 # 413 #
413 # On Windows, precompiled headers are done on a per-target basis. If you have 414 # On Windows, precompiled headers are done on a per-target basis. If you have
414 # just a couple of files, the time it takes to precompile (~2 seconds) can 415 # just a couple of files, the time it takes to precompile (~2 seconds) can
415 # actually be longer than the time saved. On a Z620, a 100 file target compiles 416 # actually be longer than the time saved. On a Z620, a 100 file target compiles
416 # about 2 seconds faster with precompiled headers, with greater savings for 417 # about 2 seconds faster with precompiled headers, with greater savings for
417 # larger targets. 418 # larger targets.
418 # 419 #
419 # Recommend precompiled headers for targets with more than 50 .cc files. 420 # Recommend precompiled headers for targets with more than 50 .cc files.
420 config("precompiled_headers") { 421 config("precompiled_headers") {
421 # TODO(brettw) enable this when everything is working. A previous attempt 422 if (is_win && !is_official_build && !use_goma) {
422 # to enable this caused some bot redness which needs ot be investigated.
423 #if (is_win) {
424 if (false) {
425 # This is a string rather than a file GN knows about. It has to match 423 # This is a string rather than a file GN knows about. It has to match
426 # exactly what's in the /FI flag below, and what might appear in the source 424 # exactly what's in the /FI flag below, and what might appear in the source
427 # code in quotes for an #include directive. 425 # code in quotes for an #include directive.
428 precompiled_header = "build/precompile.h" 426 precompiled_header = "build/precompile.h"
429 427
430 # This is a file that GN will compile with the above header. It will be 428 # This is a file that GN will compile with the above header. It will be
431 # implicitly added to the sources (potentially multiple times, with one 429 # implicitly added to the sources (potentially multiple times, with one
432 # variant for each language used in the target). 430 # variant for each language used in the target).
433 precompiled_source = "//build/precompile.cc" 431 precompiled_source = "//build/precompile.cc"
434 432
435 # Force include the header. 433 # Force include the header.
436 cflags = [ "/FI$precompiled_header" ] 434 cflags = [ "/FI$precompiled_header" ]
435
436 # Disable warning for "this file was empty after preprocessing". This
437 # error is generated only in C mode for ANSI compatibility. It conflicts
438 # with precompiled headers since the source file that's "compiled" for
439 # making the precompiled header is empty.
440 #
441 # This error doesn't happen every time. In VS2013, it seems if the .pch
442 # file doesn't exist, no error will be generated (probably MS tested this
443 # case but forgot the other one?). To reproduce this error, do a build,
444 # then delete the precompile.c.obj file, then build again.
445 cflags_c = [ "/wd4206" ]
437 } 446 }
438 } 447 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698