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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 precompiled_header = rebase_path("build/win/Precompile.h", root_build_dir) | 62 precompiled_header = rebase_path("build/win/Precompile.h", root_build_dir) |
63 | 63 |
64 # This is a file that GN will compile with the above header. It will be | 64 # This is a file that GN will compile with the above header. It will be |
65 # implicitly added to the sources (potentially multiple times, with one | 65 # implicitly added to the sources (potentially multiple times, with one |
66 # variant for each language used in the target). | 66 # variant for each language used in the target). |
67 precompiled_source = | 67 precompiled_source = |
68 "//third_party/WebKit/Source/build/win/Precompile.cpp" | 68 "//third_party/WebKit/Source/build/win/Precompile.cpp" |
69 | 69 |
70 # Force include the header. | 70 # Force include the header. |
71 cflags = [ "/FI$precompiled_header" ] | 71 cflags = [ "/FI$precompiled_header" ] |
72 | |
73 # Disable warning for "this file was empty after preprocessing". This | |
74 # error is generated only in C mode for ANSI compatibility. It conflicts | |
75 # with precompiled headers since the source file that's "compiled" for | |
76 # making the precompiled header is empty. | |
77 # | |
78 # This error doesn't happen every time. In VS2013, it seems if the .pch | |
79 # file doesn't exist, no error will be generated (probably MS tested this | |
80 # case but forgot the other one?). To reproduce this error, do a build, | |
81 # then delete the precompile.c.obj file, then build again. | |
82 cflags_c = [ "/wd4206" ] | |
83 } | 72 } |
84 } | 73 } |
85 } | 74 } |
86 | 75 |
87 # config ----------------------------------------------------------------------- | 76 # config ----------------------------------------------------------------------- |
88 | 77 |
89 config("config") { | 78 config("config") { |
90 include_dirs = [ | 79 include_dirs = [ |
91 ".", | 80 ".", |
92 "..", | 81 "..", |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 } | 164 } |
176 } | 165 } |
177 | 166 |
178 if (is_mac) { | 167 if (is_mac) { |
179 # This sets up precompiled headers for Mac. | 168 # This sets up precompiled headers for Mac. |
180 config("mac_precompiled_headers") { | 169 config("mac_precompiled_headers") { |
181 precompiled_header = rebase_path("build/mac/Prefix.h", root_build_dir) | 170 precompiled_header = rebase_path("build/mac/Prefix.h", root_build_dir) |
182 precompiled_source = "//third_party/WebKit/Source/build/mac/Prefix.h" | 171 precompiled_source = "//third_party/WebKit/Source/build/mac/Prefix.h" |
183 } | 172 } |
184 } | 173 } |
OLD | NEW |