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

Remove split_static_library from blink.

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: I98002cf0dbf70e9cfffb880d9c24984bed2ff51d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1860034
Auto-Submit: Nico Weber <thakis@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Reviewed-by: default avatarHans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#705588}
parent 8c8798a4
...@@ -128,13 +128,6 @@ blink_modules_sources("bindings_modules_impl") { ...@@ -128,13 +128,6 @@ blink_modules_sources("bindings_modules_impl") {
"//third_party/blink/renderer/modules/mediarecorder:buildflags", "//third_party/blink/renderer/modules/mediarecorder:buildflags",
"//third_party/dawn/src/dawn:dawn_headers", "//third_party/dawn/src/dawn:dawn_headers",
] ]
if (!is_component_build && is_win) {
# This target as a static library (for non-component builds) is >4GB on
# Windows, this causes linking to fail. As a workaround, split it into
# multiple shards.
split_count = 5
}
} }
action("generate_v8_context_snapshot_external_references") { action("generate_v8_context_snapshot_external_references") {
......
...@@ -1017,7 +1017,15 @@ group("all_generators") { ...@@ -1017,7 +1017,15 @@ group("all_generators") {
} }
# Compiles the code generated by the targets above. # Compiles the code generated by the targets above.
target("jumbo_" + core_link_small_target_type, "core_generated") { if (is_component_build) {
# To get exported symbols correct in component builds, the files must be in
# source sets.
core_generated_target_type = "source_set"
} else {
core_generated_target_type = "static_library"
}
target("jumbo_" + core_generated_target_type, "core_generated") {
sources = bindings_core_v8_files sources = bindings_core_v8_files
# Add all sources generated by the targets above. # Add all sources generated by the targets above.
......
...@@ -19,7 +19,6 @@ buildflag_header("buildflags") { ...@@ -19,7 +19,6 @@ buildflag_header("buildflags") {
} }
blink_core_sources("animation") { blink_core_sources("animation") {
split_count = 5
sources = [ sources = [
"animatable.cc", "animatable.cc",
"animatable.h", "animatable.h",
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
import("//build/config/chrome_build.gni") import("//build/config/chrome_build.gni")
import("//build/config/jumbo.gni") import("//build/config/jumbo.gni")
import("//build/split_static_library.gni")
import("//third_party/blink/renderer/config.gni") import("//third_party/blink/renderer/config.gni")
blink_core_output_dir = "$root_gen_dir/third_party/blink/renderer/core" blink_core_output_dir = "$root_gen_dir/third_party/blink/renderer/core"
...@@ -33,22 +32,9 @@ if (is_win && is_official_build) { ...@@ -33,22 +32,9 @@ if (is_win && is_official_build) {
core_config_remove += [ "//build/config/compiler:default_symbols" ] core_config_remove += [ "//build/config/compiler:default_symbols" ]
core_config_add += blink_symbols_config core_config_add += blink_symbols_config
# Use this target type to link core targets.
if (is_component_build) {
# To get exported symbols correct in component builds, the files must be in
# source sets.
core_link_large_target_type = "source_set"
core_link_small_target_type = "source_set"
} else {
# In static builds some of the libraries can get >2GB on Windows so we need
# to split the targets for the larger ones.
core_link_large_target_type = "split_static_library"
core_link_small_target_type = "static_library"
}
# Use this to generate a static library or source set that gets linked into # Use this to generate a static library or source set that gets linked into
# "core". This will either be a source_set (component build), a static library # "core". This will either be a source_set (component build), or a static
# (split_count undefined) or a split static library (split_count defined). # library.
# #
# Special values (all unlisted values are forwarded to the underlying library): # Special values (all unlisted values are forwarded to the underlying library):
# #
...@@ -59,12 +45,6 @@ if (is_component_build) { ...@@ -59,12 +45,6 @@ if (is_component_build) {
# into account: just modify the configs as normal for target-specific # into account: just modify the configs as normal for target-specific
# overrides (or don't touch it). # overrides (or don't touch it).
# #
# split_count
# If defined, non-component builds will generate this number of static
# libraries by splitting the sources. This is for use on Windows where the
# maximum static library size is 2GB, and 64-bit builds with full symbols
# can exceed this if there are many sources.
#
# deps # deps
# Normal meaning but "core:prerequisites" target is always added. Callers # Normal meaning but "core:prerequisites" target is always added. Callers
# shouldn't list prerequisites as a dependency. # shouldn't list prerequisites as a dependency.
...@@ -74,23 +54,14 @@ if (is_component_build) { ...@@ -74,23 +54,14 @@ if (is_component_build) {
template("blink_core_sources") { template("blink_core_sources") {
if (is_component_build) { if (is_component_build) {
target_type = "jumbo_source_set" target_type = "jumbo_source_set"
# This assert avoids an unused variable warning.
assert(!defined(invoker.split_count) || invoker.split_count != 0)
} else if (!defined(invoker.split_count)) {
target_type = "jumbo_static_library"
} else { } else {
target_type = "jumbo_split_static_library" target_type = "jumbo_static_library"
} }
target(target_type, target_name) { target(target_type, target_name) {
# The visibility will get overridden by forward_variables_from below if the # The visibility will get overridden by forward_variables_from below if the
# invoker defined it. # invoker defined it.
visibility = [ "//third_party/blink/renderer/core/*" ] visibility = [ "//third_party/blink/renderer/core/*" ]
if (target_type == "jumbo_split_static_library") {
split_count = invoker.split_count
}
deps = [ deps = [
"//third_party/blink/renderer/core:prerequisites", "//third_party/blink/renderer/core:prerequisites",
] ]
...@@ -111,7 +82,6 @@ template("blink_core_sources") { ...@@ -111,7 +82,6 @@ template("blink_core_sources") {
[ [
"deps", "deps",
"public_deps", "public_deps",
"split_count",
]) ])
} }
} }
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
import("//third_party/blink/renderer/core/core.gni") import("//third_party/blink/renderer/core/core.gni")
blink_core_sources("css") { blink_core_sources("css") {
split_count = 10
sources = [ sources = [
"abstract_property_set_css_style_declaration.cc", "abstract_property_set_css_style_declaration.cc",
"abstract_property_set_css_style_declaration.h", "abstract_property_set_css_style_declaration.h",
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
import("//third_party/blink/renderer/core/core.gni") import("//third_party/blink/renderer/core/core.gni")
blink_core_sources("dom") { blink_core_sources("dom") {
split_count = 5
sources = [ sources = [
"abort_controller.cc", "abort_controller.cc",
"abort_controller.h", "abort_controller.h",
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
import("//third_party/blink/renderer/core/core.gni") import("//third_party/blink/renderer/core/core.gni")
blink_core_sources("editing") { blink_core_sources("editing") {
split_count = 5
sources = [ sources = [
"caret_display_item_client.cc", "caret_display_item_client.cc",
"caret_display_item_client.h", "caret_display_item_client.h",
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
import("//third_party/blink/renderer/core/core.gni") import("//third_party/blink/renderer/core/core.gni")
blink_core_sources("geometry") { blink_core_sources("geometry") {
split_count = 5
sources = [ sources = [
"dom_matrix.cc", "dom_matrix.cc",
"dom_matrix.h", "dom_matrix.h",
......
...@@ -2,12 +2,9 @@ ...@@ -2,12 +2,9 @@
# 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/split_static_library.gni")
import("//third_party/blink/renderer/core/core.gni") import("//third_party/blink/renderer/core/core.gni")
blink_core_sources("html") { blink_core_sources("html") {
split_count = 4
sources = [ sources = [
"anchor_element_metrics.cc", "anchor_element_metrics.cc",
"anchor_element_metrics.h", "anchor_element_metrics.h",
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
import("//third_party/blink/renderer/core/core.gni") import("//third_party/blink/renderer/core/core.gni")
blink_core_sources("layout") { blink_core_sources("layout") {
split_count = 5
sources = [ sources = [
"api/hit_test_action.h", "api/hit_test_action.h",
"api/line_layout_api_shim.h", "api/line_layout_api_shim.h",
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
import("//third_party/blink/renderer/core/core.gni") import("//third_party/blink/renderer/core/core.gni")
blink_core_sources("paint") { blink_core_sources("paint") {
split_count = 2
sources = [ sources = [
"applied_decoration_painter.cc", "applied_decoration_painter.cc",
"applied_decoration_painter.h", "applied_decoration_painter.h",
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
import("//third_party/blink/renderer/core/core.gni") import("//third_party/blink/renderer/core/core.gni")
blink_core_sources("script") { blink_core_sources("script") {
split_count = 5
sources = [ sources = [
"classic_pending_script.cc", "classic_pending_script.cc",
"classic_pending_script.h", "classic_pending_script.h",
......
...@@ -5,14 +5,6 @@ ...@@ -5,14 +5,6 @@
import("//third_party/blink/renderer/core/core.gni") import("//third_party/blink/renderer/core/core.gni")
blink_core_sources("svg") { blink_core_sources("svg") {
# 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
}
sources = [ sources = [
"animation/smil_animation_sandwich.cc", "animation/smil_animation_sandwich.cc",
"animation/smil_animation_sandwich.h", "animation/smil_animation_sandwich.h",
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
# found in the LICENSE file. # found in the LICENSE file.
import("//build/config/chromecast_build.gni") import("//build/config/chromecast_build.gni")
import("//build/split_static_library.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")
import("//third_party/blink/renderer/bindings/modules/v8/generated.gni") import("//third_party/blink/renderer/bindings/modules/v8/generated.gni")
...@@ -18,16 +17,6 @@ if (is_android) { ...@@ -18,16 +17,6 @@ if (is_android) {
visibility = [ "//third_party/blink/renderer/*" ] visibility = [ "//third_party/blink/renderer/*" ]
if (!is_component_build && is_win) {
# This target as a static library (for non-component builds) is >2GB for
# official builds and some goma builds on Windows. This causes linking to
# fail. As a workaround, force using a split static library for these
# configurations.
modules_target_type = "split_static_library"
} else {
modules_target_type = "component"
}
config("modules_implementation") { config("modules_implementation") {
defines = [ "BLINK_MODULES_IMPLEMENTATION=1" ] defines = [ "BLINK_MODULES_IMPLEMENTATION=1" ]
} }
...@@ -38,13 +27,9 @@ make_names("module_names") { ...@@ -38,13 +27,9 @@ make_names("module_names") {
deps = [] # Don't use default deps (otherwise it will be circular). deps = [] # Don't use default deps (otherwise it will be circular).
} }
target("jumbo_" + modules_target_type, "modules") { jumbo_component("modules") {
output_name = "blink_modules" output_name = "blink_modules"
if (modules_target_type == "split_static_library") {
split_count = 5
}
visibility = [] # Allow re-assignment of list. visibility = [] # Allow re-assignment of list.
visibility = [ "//third_party/blink/*" ] visibility = [ "//third_party/blink/*" ]
......
...@@ -8,9 +8,7 @@ ...@@ -8,9 +8,7 @@
# to the huge and slow lists of sources. If sharing is necessary, make a # to the huge and slow lists of sources. If sharing is necessary, make a
# separate .gni. # separate .gni.
import("//build/config/jumbo.gni") import("//build/config/jumbo.gni")
import("//build/split_static_library.gni")
import("//third_party/blink/renderer/config.gni") import("//third_party/blink/renderer/config.gni")
blink_modules_output_dir = "$root_gen_dir/third_party/blink/renderer/modules" blink_modules_output_dir = "$root_gen_dir/third_party/blink/renderer/modules"
# Defines a part of blink modules. This is either a source set or a static # Defines a part of blink modules. This is either a source set or a static
...@@ -25,11 +23,7 @@ template("blink_modules_sources") { ...@@ -25,11 +23,7 @@ template("blink_modules_sources") {
if (is_component_build) { if (is_component_build) {
target_type = "source_set" target_type = "source_set"
} else { } else {
if (!defined(invoker.split_count)) { target_type = "static_library"
target_type = "static_library"
} else {
target_type = "split_static_library"
}
} }
target("jumbo_" + target_type, target_name) { target("jumbo_" + target_type, target_name) {
...@@ -45,17 +39,9 @@ template("blink_modules_sources") { ...@@ -45,17 +39,9 @@ template("blink_modules_sources") {
if (defined(invoker.deps)) { if (defined(invoker.deps)) {
deps += invoker.deps deps += invoker.deps
} }
if (target_type == "split_static_library") {
split_count = invoker.split_count
}
# Take everything else not handled above from the invoker. # Take everything else not handled above from the invoker.
forward_variables_from(invoker, forward_variables_from(invoker, "*", [ "deps" ])
"*",
[
"deps",
"split_count",
])
} }
} }
set_defaults("blink_modules_sources") { set_defaults("blink_modules_sources") {
......
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