Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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("config.gni") | 5 import("config.gni") |
| 6 if (is_clang) { | 6 if (is_clang) { |
| 7 import("//build/config/clang/clang.gni") | 7 import("//build/config/clang/clang.gni") |
| 8 } | 8 } |
| 9 | 9 |
| 10 visibility = [ "//third_party/WebKit/*" ] | 10 visibility = [ "//third_party/WebKit/*" ] |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 34 | 34 |
| 35 # inside_blink ----------------------------------------------------------------- | 35 # inside_blink ----------------------------------------------------------------- |
| 36 | 36 |
| 37 config("inside_blink") { | 37 config("inside_blink") { |
| 38 defines = [ | 38 defines = [ |
| 39 "BLINK_IMPLEMENTATION=1", | 39 "BLINK_IMPLEMENTATION=1", |
| 40 "INSIDE_BLINK", | 40 "INSIDE_BLINK", |
| 41 ] | 41 ] |
| 42 } | 42 } |
| 43 | 43 |
| 44 # blink_pch -------------------------------------------------------------------- | |
| 45 | |
| 46 # Precompiled headers can save a lot of time compiling since Blink has | |
| 47 # a lot of source in header files. | |
| 48 | |
| 49 import("//build/config/pch.gni") | |
| 50 import("//build/toolchain/goma.gni") | |
| 51 | |
| 52 config("blink_pch") { | |
| 53 if (!is_official_build && !use_goma && !disable_precompiled_headers) { | |
|
Nico
2016/07/14 19:58:52
Rather than repeat all these here, maybe they shou
Daniel Bratell
2016/07/15 06:43:55
I've done that change in the next version but ther
| |
| 54 if (is_win) { | |
| 55 # This is a string rather than a file GN knows about. It has to match | |
| 56 # exactly what's in the /FI flag below, and what might appear in the | |
| 57 # source code in quotes for an #include directive. | |
| 58 precompiled_header = rebase_path("build/win/Precompile.h", root_build_dir) | |
| 59 | |
| 60 # This is a file that GN will compile with the above header. It will be | |
| 61 # implicitly added to the sources (potentially multiple times, with one | |
| 62 # variant for each language used in the target). | |
| 63 precompiled_source = | |
| 64 "//third_party/WebKit/Source/build/win/Precompile.cpp" | |
| 65 | |
| 66 # Force include the header. | |
| 67 cflags = [ "/FI$precompiled_header" ] | |
| 68 | |
| 69 # Disable warning for "this file was empty after preprocessing". This | |
| 70 # error is generated only in C mode for ANSI compatibility. It conflicts | |
| 71 # with precompiled headers since the source file that's "compiled" for | |
| 72 # making the precompiled header is empty. | |
| 73 # | |
| 74 # This error doesn't happen every time. In VS2013, it seems if the .pch | |
| 75 # file doesn't exist, no error will be generated (probably MS tested this | |
| 76 # case but forgot the other one?). To reproduce this error, do a build, | |
| 77 # then delete the precompile.c.obj file, then build again. | |
| 78 cflags_c = [ "/wd4206" ] | |
| 79 } | |
| 80 } | |
| 81 } | |
| 82 | |
| 44 # config ----------------------------------------------------------------------- | 83 # config ----------------------------------------------------------------------- |
| 45 | 84 |
| 46 config("config") { | 85 config("config") { |
| 47 include_dirs = [ | 86 include_dirs = [ |
| 48 ".", | 87 ".", |
| 49 "..", | 88 "..", |
| 50 "$root_gen_dir/blink", | 89 "$root_gen_dir/blink", |
| 51 "$root_gen_dir/third_party/WebKit", | 90 "$root_gen_dir/third_party/WebKit", |
| 52 ] | 91 ] |
| 53 | 92 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 124 } | 163 } |
| 125 } | 164 } |
| 126 | 165 |
| 127 if (is_mac) { | 166 if (is_mac) { |
| 128 # This sets up precompiled headers for Mac. | 167 # This sets up precompiled headers for Mac. |
| 129 config("mac_precompiled_headers") { | 168 config("mac_precompiled_headers") { |
| 130 precompiled_header = rebase_path("build/mac/Prefix.h", root_build_dir) | 169 precompiled_header = rebase_path("build/mac/Prefix.h", root_build_dir) |
| 131 precompiled_source = "//third_party/WebKit/Source/build/mac/Prefix.h" | 170 precompiled_source = "//third_party/WebKit/Source/build/mac/Prefix.h" |
| 132 } | 171 } |
| 133 } | 172 } |
| OLD | NEW |