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

Unified 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: merge Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/split_static_library.gni ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/BUILD.gn
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 988f833f0604f96044303ed867e25a7bf4e69017..22bfb6e2f84e22cd3103f1db680287dafc3d9442 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -6,6 +6,7 @@ import("//build/config/chrome_build.gni")
import("//build/config/crypto.gni")
import("//build/config/features.gni")
import("//build/config/ui.gni")
+import("//build/split_static_library.gni")
import("//chrome/common/features.gni")
import("//media/media_options.gni")
import("//third_party/protobuf/proto_library.gni")
@@ -78,15 +79,16 @@ if (is_desktop_linux) {
}
# Use a static library here because many test binaries depend on this but don't
-# require many files from it. This makes linking more efficient. However, on
-# Windows official builds the static library will be too large (> 32-bits) so
-# use source sets in that case.
-if (is_win && is_official_build) {
- chrome_browser_target_type = "source_set"
-} else {
- chrome_browser_target_type = "static_library"
-}
-target(chrome_browser_target_type, "browser") {
+# require many files from it. This makes linking more efficient.
+split_static_library("browser") {
+ # Split into multiple static libraries on Windows official builds, where we
+ # run into a 2GB max size limit.
+ if (is_win && is_official_build) {
+ split_count = 5
+ } else {
+ split_count = 1
+ }
+
configs += [
"//build/config/compiler:wexit_time_destructors",
"//build/config:precompiled_headers",
« no previous file with comments | « build/split_static_library.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698