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

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

Issue 2702363002: Share precompiled header setup for blink between Windows and Mac. (Closed)
Patch Set: Share precompiled header setup for blink between Windows and Mac. Created 3 years, 9 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("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
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 } else if (is_mac) {
73 precompiled_header = rebase_path("build/mac/Prefix.h", root_build_dir)
Nico 2017/03/03 16:04:35 I don't think you need the rebase_path call here.
Nico 2017/03/03 19:28:38 Looking at this more, maybe precompiled_header isn
Nico 2017/03/03 20:30:31 I think you can in fact remove this line. https://
74 precompiled_source = "//third_party/WebKit/Source/build/mac/Prefix.h"
72 } 75 }
73 } 76 }
74 } 77 }
75 78
76 # config ----------------------------------------------------------------------- 79 # config -----------------------------------------------------------------------
77 80
78 config("config") { 81 config("config") {
79 include_dirs = [ 82 include_dirs = [
80 ".", 83 ".",
81 "..", 84 "..",
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 159
157 # The follow configs apply to all targets except for unit tests, which rely on 160 # The follow configs apply to all targets except for unit tests, which rely on
158 # static initializers. 161 # static initializers.
159 config("non_test_config") { 162 config("non_test_config") {
160 cflags = [] 163 cflags = []
161 164
162 if (is_clang) { 165 if (is_clang) {
163 cflags += [ "-Wglobal-constructors" ] 166 cflags += [ "-Wglobal-constructors" ]
164 } 167 }
165 } 168 }
166
167 if (is_mac) {
168 # This sets up precompiled headers for Mac.
169 config("mac_precompiled_headers") {
170 precompiled_header = rebase_path("build/mac/Prefix.h", root_build_dir)
171 precompiled_source = "//third_party/WebKit/Source/build/mac/Prefix.h"
172 }
173 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/BUILD.gn » ('j') | third_party/WebKit/Source/core/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698