Commit 08a8c759 authored by Daniel Bratell's avatar Daniel Bratell Committed by Commit Bot

Make blink/modules support jumbo compilations (-60 CPU minutes)

Compiling browser code in blink/modules currently use
about 80 CPU minutes. That is about 7% of the total compilation time.
If you use jumbo compilation (merge many files into a single
translation unit) that time drops to about a fifth of that.

There are also unit_tests in modules that will be jumbofied in
a different patch.

Bug: 713137
Change-Id: I9155d2af0c9dce6b3178f77b9366062eb45d4560
Reviewed-on: https://chromium-review.googlesource.com/568302Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#488179}
parent 17213d4f
......@@ -43,7 +43,7 @@ make_names("module_names") {
deps = [] # Don't use default deps (otherwise it will be circular).
}
target(modules_target_type, "modules") {
target("jumbo_" + modules_target_type, "modules") {
output_name = "blink_modules"
if (modules_target_type == "split_static_library") {
......
......@@ -43,4 +43,12 @@ blink_modules_sources("fetch") {
"Response.cpp",
"Response.h",
]
if (is_win && is_component_build) {
# Body.cpp exports a class (MODULES_EXPORT) that inherits from
# PairIterable<String, String> that is also used as base class by an
# imported (CORE_EXPORT) class and that confuses the Windows
# linker/compiler. https://crbug.com/739340
jumbo_excluded_sources = [ "Body.cpp" ]
}
}
......@@ -7,9 +7,12 @@
# This file is shared with all modules' BUILD files which shouldn't need access
# to the huge and slow lists of sources. If sharing is necessary, make a
# separate .gni.
import("//build/config/jumbo.gni")
import("//build/split_static_library.gni")
import("//third_party/WebKit/Source/config.gni")
blink_modules_output_dir = "$root_gen_dir/blink/modules"
# Defines a part of blink modules. This is either a source set or a static
# library with defaults for commonly-used values.
#
......@@ -29,7 +32,7 @@ template("blink_modules_sources") {
}
}
target(target_type, target_name) {
target("jumbo_" + target_type, target_name) {
# The visibility will get overridden by forward_variables_from below if the
# invoker defined it.
visibility = [ "//third_party/WebKit/Source/modules/*" ]
......
......@@ -125,6 +125,14 @@ blink_modules_sources("webaudio") {
]
if (is_win) {
jumbo_excluded_sources = [
# Uses Supplement<LocalDOMWindow> with MODULES_EXPORT while
# other files use Supplement<LocalDOMWindow> with
# CORE_EXPORT. Mixing those in the same compilation unit
# triggers link errors in Windows. https://crbug.com/739340
"WindowAudioWorklet.cpp",
]
# Result of 32-bit shift implicitly converted to 64 bits.
cflags = [ "/wd4334" ]
}
......
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