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

Side by Side Diff: third_party/WebKit/Source/core/BUILD.gn

Issue 2152783002: Enable precompiled headers for Blink on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
OLDNEW
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("//build/config/chrome_build.gni") 5 import("//build/config/chrome_build.gni")
6 import("//build/config/ui.gni") 6 import("//build/config/ui.gni")
7 import("//third_party/WebKit/Source/bindings/bindings.gni") 7 import("//third_party/WebKit/Source/bindings/bindings.gni")
8 import("//third_party/WebKit/Source/bindings/core/v8/generated.gni") 8 import("//third_party/WebKit/Source/bindings/core/v8/generated.gni")
9 import("//third_party/WebKit/Source/bindings/modules/modules.gni") 9 import("//third_party/WebKit/Source/bindings/modules/modules.gni")
10 import("//third_party/WebKit/Source/bindings/modules/v8/generated.gni") 10 import("//third_party/WebKit/Source/bindings/modules/v8/generated.gni")
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 config("core_include_dirs") { 57 config("core_include_dirs") {
58 include_dirs = [ 58 include_dirs = [
59 "..", 59 "..",
60 "$root_gen_dir/blink", 60 "$root_gen_dir/blink",
61 ] 61 ]
62 if (is_android && use_openmax_dl_fft) { 62 if (is_android && use_openmax_dl_fft) {
63 include_dirs += [ "//third_party/openmax_dl" ] 63 include_dirs += [ "//third_party/openmax_dl" ]
64 } 64 }
65 } 65 }
66 66
67 import("//build/config/pch.gni")
68 import("//build/toolchain/goma.gni")
69
70 config("blink_core_pch") {
71 if (!is_official_build && !use_goma && !disable_precompiled_headers) {
72 if (is_win) {
73 # This is a string rather than a file GN knows about. It has to match
74 # exactly what's in the /FI flag below, and what might appear in the
75 # source code in quotes for an #include directive.
76 precompiled_header = rebase_path("win/Precompile-core.h", root_build_dir)
77
78 # This is a file that GN will compile with the above header. It will be
79 # implicitly added to the sources (potentially multiple times, with one
80 # variant for each language used in the target).
81 precompiled_source =
82 "//third_party/WebKit/Source/core/win/Precompile-core.cpp"
83
84 # Force include the header.
85 cflags = [ "/FI$precompiled_header" ]
86
87 # Disable warning for "this file was empty after preprocessing". This
88 # error is generated only in C mode for ANSI compatibility. It conflicts
89 # with precompiled headers since the source file that's "compiled" for
90 # making the precompiled header is empty.
91 #
92 # This error doesn't happen every time. In VS2013, it seems if the .pch
93 # file doesn't exist, no error will be generated (probably MS tested this
94 # case but forgot the other one?). To reproduce this error, do a build,
95 # then delete the precompile.c.obj file, then build again.
96 cflags_c = [ "/wd4206" ]
97 }
98 }
99 }
100
101 core_config_add += [ ":blink_core_pch" ]
102
67 # GYP version: WebKit/Source/core/core.gyp:webcore_generated 103 # GYP version: WebKit/Source/core/core.gyp:webcore_generated
68 source_set("generated") { 104 source_set("generated") {
69 deps = [ 105 deps = [
70 ":make_core_generated", 106 ":make_core_generated",
71 ":prerequisites", 107 ":prerequisites",
72 "inspector:instrumentation_sources", 108 "inspector:instrumentation_sources",
73 "inspector:protocol_sources", 109 "inspector:protocol_sources",
74 "//gin", 110 "//gin",
75 "//skia", 111 "//skia",
76 "//third_party/WebKit/Source/bindings/core/v8:bindings_core_v8_generated", 112 "//third_party/WebKit/Source/bindings/core/v8:bindings_core_v8_generated",
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 # GYP version: //third_party/WebKit/Source/core/core.gyp:webcore_rendering 317 # GYP version: //third_party/WebKit/Source/core/core.gyp:webcore_rendering
282 source_set("rendering") { 318 source_set("rendering") {
283 # The files that go here are currently in "remaining". 319 # The files that go here are currently in "remaining".
284 } 320 }
285 321
286 # GYP version: WebKit/Source/core/core.gyp:webcore_testing 322 # GYP version: WebKit/Source/core/core.gyp:webcore_testing
287 source_set("testing") { 323 source_set("testing") {
288 configs += [ 324 configs += [
289 "//third_party/WebKit/Source:inside_blink", 325 "//third_party/WebKit/Source:inside_blink",
290 "//third_party/WebKit/Source:config", 326 "//third_party/WebKit/Source:config",
327 ":blink_core_pch",
291 ] 328 ]
292 329
293 deps = [ 330 deps = [
294 ":core", 331 ":core",
295 ":generated_testing_idls", 332 ":generated_testing_idls",
296 ] 333 ]
297 334
298 sources = generated_core_testing_dictionary_files + webcore_testing_files 335 sources = generated_core_testing_dictionary_files + webcore_testing_files
299 sources += [ 336 sources += [
300 "$bindings_core_v8_output_dir/V8DictionaryTest.cpp", 337 "$bindings_core_v8_output_dir/V8DictionaryTest.cpp",
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
1078 "$blink_core_output_dir/{{source_name_part}}.h", 1115 "$blink_core_output_dir/{{source_name_part}}.h",
1079 ] 1116 ]
1080 args = [ 1117 args = [
1081 "{{source}}", 1118 "{{source}}",
1082 rel_blink_core_gen_dir, 1119 rel_blink_core_gen_dir,
1083 bison_exe, 1120 bison_exe,
1084 ] 1121 ]
1085 1122
1086 deps = make_core_generated_deps 1123 deps = make_core_generated_deps
1087 } 1124 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698