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

Side by Side Diff: chrome/browser/BUILD.gn

Issue 2105513002: Use split_static_library in GN build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split_list
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
« build/config/BUILDCONFIG.gn ('K') | « build/split_static_library.gni ('k') | 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 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/crypto.gni") 6 import("//build/config/crypto.gni")
7 import("//build/config/features.gni") 7 import("//build/config/features.gni")
8 import("//build/config/ui.gni") 8 import("//build/config/ui.gni")
9 import("//build/split_static_library.gni")
9 import("//chrome/common/features.gni") 10 import("//chrome/common/features.gni")
10 import("//media/media_options.gni") 11 import("//media/media_options.gni")
11 import("//third_party/kasko/kasko.gni") 12 import("//third_party/kasko/kasko.gni")
12 import("//third_party/protobuf/proto_library.gni") 13 import("//third_party/protobuf/proto_library.gni")
13 14
14 # //build/config/android/rules.gni imports //tools/grit/grit_rule.gni, which 15 # //build/config/android/rules.gni imports //tools/grit/grit_rule.gni, which
15 # produces a conflict for the "grit" template so we have to only include one. 16 # produces a conflict for the "grit" template so we have to only include one.
16 if (is_android) { 17 if (is_android) {
17 import("//build/config/android/rules.gni") 18 import("//build/config/android/rules.gni")
18 } else { 19 } else {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 # If you want to link gnome-keyring directly (use only for unit tests) 72 # If you want to link gnome-keyring directly (use only for unit tests)
72 # ADDITIONALLY add this config on top of ":gnome_keyring". pkg-config is a 73 # ADDITIONALLY add this config on top of ":gnome_keyring". pkg-config is a
73 # bit slow, so prefer not to run it again. In practice, gnome-keyring's libs 74 # bit slow, so prefer not to run it again. In practice, gnome-keyring's libs
74 # are just itself and common gnome ones we link already, so we can get away 75 # are just itself and common gnome ones we link already, so we can get away
75 # with additionally just coding the library name here. 76 # with additionally just coding the library name here.
76 config("gnome_keyring_direct") { 77 config("gnome_keyring_direct") {
77 libs = [ "gnome-keyring" ] 78 libs = [ "gnome-keyring" ]
78 } 79 }
79 } 80 }
80 81
81 # Use a static library here because many test binaries depend on this but don't 82 split_static_library("browser") {
82 # require many files from it. This makes linking more efficient. However, on 83 # Split into multiple static libraries on Windows official builds, where we
83 # Windows official builds the static library will be too large (> 32-bits) so 84 # run into a 2GB max size limit.
84 # use source sets in that case. 85 if (is_win && is_official_build) {
85 if (is_mac || (is_win && is_official_build)) { 86 split_count = 5
86 # TODO(brettw) bug 618797: Remove the mac condition. On Mac making this 87 } else {
87 # target a static_library causes a crash on startup and the browser_tests all 88 split_count = 1
88 # fail. My guess is this is due to a required static initializer not being 89 }
89 # brought in. 90
90 chrome_browser_target_type = "source_set"
91 } else {
92 chrome_browser_target_type = "static_library"
93 }
94 target(chrome_browser_target_type, "browser") {
95 configs += [ 91 configs += [
96 "//build/config/compiler:wexit_time_destructors", 92 "//build/config/compiler:wexit_time_destructors",
97 "//build/config:precompiled_headers", 93 "//build/config:precompiled_headers",
98 "//third_party/WebKit/public:debug_devtools", 94 "//third_party/WebKit/public:debug_devtools",
99 ] 95 ]
100 defines = [] 96 defines = []
101 sources = [] 97 sources = []
102 libs = [] 98 libs = []
103 ldflags = [] 99 ldflags = []
104 100
(...skipping 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1374 # linking all of the test support. 1370 # linking all of the test support.
1375 source_set("pepper_cdm_test_constants") { 1371 source_set("pepper_cdm_test_constants") {
1376 testonly = true 1372 testonly = true
1377 visibility = [ "//chrome/*" ] 1373 visibility = [ "//chrome/*" ]
1378 sources = [ 1374 sources = [
1379 "media/pepper_cdm_test_constants.cc", 1375 "media/pepper_cdm_test_constants.cc",
1380 "media/pepper_cdm_test_constants.h", 1376 "media/pepper_cdm_test_constants.h",
1381 ] 1377 ]
1382 } 1378 }
1383 } 1379 }
OLDNEW
« build/config/BUILDCONFIG.gn ('K') | « build/split_static_library.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698