Commit a86070ad authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

win: Stop using split_static_library in chrome/, content/

This was a workaround for a toolchain problem we no longer have --
lld-link has thin static libraries and this is a no-op for it for that
reason already.

Bug: 857060
Change-Id: Ib16c732e3f0a6a0973feff72c7fa4bd1154e2615
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1865420Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Reviewed-by: default avatardanakj <danakj@chromium.org>
Reviewed-by: default avatarHans Wennborg <hans@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706877}
parent 24016915
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
# found in the LICENSE file. # found in the LICENSE file.
import("//build/config/nacl/config.gni") # To see if jumbo should be turned off import("//build/config/nacl/config.gni") # To see if jumbo should be turned off
import("//build/split_static_library.gni") # When someone uses that target_type
import("//build/toolchain/goma.gni") import("//build/toolchain/goma.gni")
declare_args() { declare_args() {
...@@ -49,9 +48,9 @@ jumbo_file_merge_default = 50 ...@@ -49,9 +48,9 @@ jumbo_file_merge_default = 50
# Goma builds benefit from more parallelism # Goma builds benefit from more parallelism
jumbo_file_merge_goma = 8 jumbo_file_merge_goma = 8
# Use one of the targets jumbo_source_set, jumbo_static_library, # Use one of the targets jumbo_source_set, jumbo_static_library, or
# jumbo_split_static_library or jumbo_component to generate a target # jumbo_component to generate a target which merges sources if possible to
# which merges sources if possible to compile much faster. # compile much faster.
# #
# Special values. # Special values.
# #
...@@ -214,11 +213,6 @@ template("internal_jumbo_target") { ...@@ -214,11 +213,6 @@ template("internal_jumbo_target") {
} }
target_type = invoker.target_type target_type = invoker.target_type
if (use_jumbo_build_for_target && target_type == "split_static_library") {
# Meaningless and also impossible if split_count > len(jumbo_files)
target_type = "static_library"
not_needed(invoker, [ "split_count" ])
}
# Perform the actual operation, either on the original sources or # Perform the actual operation, either on the original sources or
# the sources post-jumbo merging. # the sources post-jumbo merging.
...@@ -280,22 +274,6 @@ set_defaults("jumbo_static_library") { ...@@ -280,22 +274,6 @@ set_defaults("jumbo_static_library") {
configs = default_compiler_configs configs = default_compiler_configs
} }
# See documentation above by "internal_jumbo_target".
template("jumbo_split_static_library") {
internal_jumbo_target(target_name) {
target_type = "split_static_library"
forward_variables_from(invoker, "*")
}
}
set_defaults("jumbo_split_static_library") {
# This sets the default list of configs when the
# jumbo_split_static_library target is defined. The
# default_compiler_configs comes from BUILDCONFIG.gn and is the list
# normally applied to static libraries and source sets.
configs = default_compiler_configs
}
# See documentation above by "internal_jumbo_target". # See documentation above by "internal_jumbo_target".
template("jumbo_component") { template("jumbo_component") {
internal_jumbo_target(target_name) { internal_jumbo_target(target_name) {
......
# Copyright 2014 The Chromium Authors. All rights reserved. # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
import("//build/config/sanitizers/sanitizers.gni")
import("//gpu/vulkan/features.gni") import("//gpu/vulkan/features.gni")
import("//cc/cc.gni") import("//cc/cc.gni")
......
...@@ -9,7 +9,6 @@ import("//build/config/features.gni") ...@@ -9,7 +9,6 @@ import("//build/config/features.gni")
import("//build/config/jumbo.gni") import("//build/config/jumbo.gni")
import("//build/config/linux/gtk/gtk.gni") import("//build/config/linux/gtk/gtk.gni")
import("//build/config/ui.gni") import("//build/config/ui.gni")
import("//build/split_static_library.gni")
import("//chrome/common/features.gni") import("//chrome/common/features.gni")
import("//components/feature_engagement/features.gni") import("//components/feature_engagement/features.gni")
import("//components/feed/features.gni") import("//components/feed/features.gni")
...@@ -73,17 +72,7 @@ proto_library("ntp_background_proto") { ...@@ -73,17 +72,7 @@ proto_library("ntp_background_proto") {
# Use a static library here because many test binaries depend on this but don't # 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. # require many files from it. This makes linking more efficient.
jumbo_split_static_library("browser") { jumbo_static_library("browser") {
# Split into multiple static libraries on Windows builds. We have hit size
# limits on Windows official builds and on goma builds when symbol_level = 2
# is selected. Always splitting on Windows builds is simpler than trying to
# perfectly calculate the scenarios where it is required.
if (is_win) {
split_count = 5
} else {
split_count = 1
}
sources = [ sources = [
"about_flags.cc", "about_flags.cc",
"about_flags.h", "about_flags.h",
......
...@@ -9,7 +9,6 @@ import("//build/config/features.gni") ...@@ -9,7 +9,6 @@ import("//build/config/features.gni")
import("//build/config/jumbo.gni") import("//build/config/jumbo.gni")
import("//build/config/linux/gtk/gtk.gni") import("//build/config/linux/gtk/gtk.gni")
import("//build/config/ui.gni") import("//build/config/ui.gni")
import("//build/split_static_library.gni")
import("//chrome/common/features.gni") import("//chrome/common/features.gni")
import("//chromeos/assistant/assistant.gni") import("//chromeos/assistant/assistant.gni")
import("//components/feature_engagement/features.gni") import("//components/feature_engagement/features.gni")
...@@ -28,17 +27,7 @@ import("//ui/views/features.gni") ...@@ -28,17 +27,7 @@ import("//ui/views/features.gni")
# Use a static library here because many test binaries depend on this but don't # 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. # require many files from it. This makes linking more efficient.
jumbo_split_static_library("ui") { jumbo_static_library("ui") {
# Split into multiple static libraries on Windows builds. We have hit size
# limits on Windows official builds and on goma builds when symbol_level = 2
# is selected. Always splitting on Windows builds is simpler than trying to
# perfectly calculate the scenarios where it is required.
if (is_win) {
split_count = 5
} else {
split_count = 1
}
sources = [ sources = [
"accelerator_utils.h", "accelerator_utils.h",
"app_list/app_list_util.cc", "app_list/app_list_util.cc",
......
...@@ -6,7 +6,6 @@ import("//build/config/chromecast_build.gni") ...@@ -6,7 +6,6 @@ import("//build/config/chromecast_build.gni")
import("//build/config/features.gni") import("//build/config/features.gni")
import("//build/config/jumbo.gni") import("//build/config/jumbo.gni")
import("//build/config/ui.gni") import("//build/config/ui.gni")
import("//build/split_static_library.gni")
import("//content/common/features.gni") import("//content/common/features.gni")
import("//media/media_options.gni") import("//media/media_options.gni")
import("//ppapi/buildflags/buildflags.gni") import("//ppapi/buildflags/buildflags.gni")
...@@ -17,7 +16,7 @@ import("//tools/ipc_fuzzer/ipc_fuzzer.gni") ...@@ -17,7 +16,7 @@ import("//tools/ipc_fuzzer/ipc_fuzzer.gni")
if (is_component_build) { if (is_component_build) {
link_target_type = "jumbo_source_set" link_target_type = "jumbo_source_set"
} else { } else {
link_target_type = "jumbo_split_static_library" link_target_type = "jumbo_static_library"
} }
target(link_target_type, "renderer") { target(link_target_type, "renderer") {
...@@ -323,15 +322,6 @@ target(link_target_type, "renderer") { ...@@ -323,15 +322,6 @@ target(link_target_type, "renderer") {
] ]
} }
if (!is_component_build) {
if (is_win && is_official_build) {
split_count = 2 # In certain configurations a full renderer.lib can
# be 2+ GB which breaks some Windows tools.
} else {
split_count = 1
}
}
configs += [ configs += [
"//content:content_implementation", "//content:content_implementation",
"//build/config/compiler:no_size_t_to_int_warning", "//build/config/compiler:no_size_t_to_int_warning",
......
...@@ -69,7 +69,7 @@ system in another browser engine. ...@@ -69,7 +69,7 @@ system in another browser engine.
1. Add `import("//build/config/jumbo.gni")` to `BUILD.gn`. 1. Add `import("//build/config/jumbo.gni")` to `BUILD.gn`.
2. Change your target, for instance `static_library`, to 2. Change your target, for instance `static_library`, to
`jumbo_static_library`. So far `source_set`, `component`, `jumbo_static_library`. So far `source_set`, `component`,
`static_library` and `split_static_library` are supported. `static_library` are supported.
3. Recompile and test. 3. Recompile and test.
### Example ### Example
......
...@@ -6,7 +6,6 @@ import("//build/config/chromecast_build.gni") ...@@ -6,7 +6,6 @@ import("//build/config/chromecast_build.gni")
import("//build/config/compiler/compiler.gni") import("//build/config/compiler/compiler.gni")
import("//build/config/dcheck_always_on.gni") import("//build/config/dcheck_always_on.gni")
import("//build/config/ui.gni") import("//build/config/ui.gni")
import("//build/split_static_library.gni")
import("//build/toolchain/toolchain.gni") import("//build/toolchain/toolchain.gni")
import("//testing/libfuzzer/fuzzer_test.gni") import("//testing/libfuzzer/fuzzer_test.gni")
import("//third_party/blink/renderer/bindings/bindings.gni") import("//third_party/blink/renderer/bindings/bindings.gni")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment