Commit a0aec7b2 authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

[build] Split v8_base on static-library builds on windows

Bug: v8:6461
Change-Id: Iafabf2d53aa6492b78a9e5ae683f010453bb195d
Reviewed-on: https://chromium-review.googlesource.com/533014Reviewed-by: 's avatarJochen Eisinger <jochen@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45922}
parent d701edfc
...@@ -1081,6 +1081,9 @@ v8_header_set("v8_headers") { ...@@ -1081,6 +1081,9 @@ v8_header_set("v8_headers") {
v8_source_set("v8_base") { v8_source_set("v8_base") {
visibility = [ ":*" ] # Only targets in this file can depend on this. visibility = [ ":*" ] # Only targets in this file can depend on this.
# Split static libraries on windows into two.
split_count = 2
sources = [ sources = [
"//base/trace_event/common/trace_event_common.h", "//base/trace_event/common/trace_event_common.h",
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
import("//build/config/sanitizers/sanitizers.gni") import("//build/config/sanitizers/sanitizers.gni")
import("//build/config/v8_target_cpu.gni") import("//build/config/v8_target_cpu.gni")
import("//build/split_static_library.gni")
declare_args() { declare_args() {
# Includes files needed for correctness fuzzing. # Includes files needed for correctness fuzzing.
...@@ -91,20 +92,19 @@ if (is_posix && v8_enable_backtrace) { ...@@ -91,20 +92,19 @@ if (is_posix && v8_enable_backtrace) {
# All templates should be kept in sync. # All templates should be kept in sync.
template("v8_source_set") { template("v8_source_set") {
if (defined(v8_static_library) && v8_static_library) { if (defined(invoker.split_count) && invoker.split_count > 1 &&
static_library(target_name) { defined(v8_static_library) && v8_static_library && is_win) {
forward_variables_from(invoker, "*", [ "configs" ]) link_target_type = "split_static_library"
configs += invoker.configs } else if (defined(v8_static_library) && v8_static_library) {
configs -= v8_remove_configs link_target_type = "static_library"
configs += v8_add_configs
}
} else { } else {
source_set(target_name) { link_target_type = "source_set"
forward_variables_from(invoker, "*", [ "configs" ]) }
configs += invoker.configs target(link_target_type, target_name) {
configs -= v8_remove_configs forward_variables_from(invoker, "*", [ "configs" ])
configs += v8_add_configs configs += invoker.configs
} configs -= v8_remove_configs
configs += v8_add_configs
} }
} }
......
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