Commit 7e896fe5 authored by Jakob Gruber's avatar Jakob Gruber Committed by Commit Bot

[build] Compile compiler with optimizations in fast mksnapshot mode

This changes debug builds [1] to compile src/compiler sources twice:

1. with optimizations, used in mksnapshot to improve performance.
2. without optimizations, linked into d8 and v8 libraries.

While this adds ~200 compilation targets, these can be built in parallel
and should not add much time overall.

This brings mksnapshot runtime back down to 11 seconds on my machine.

[1] The full condition is:
    is_debug && !v8_optimized_debug && v8_enable_fast_mksnapshot

Cq-Include-Trybots: luci.chromium.try:android_arm64_dbg_recipe
Cq-Include-Trybots: luci.chromium.try:fuchsia_x64
Bug: v8:8767
Change-Id: Iac57bf8331395d9eda9be5d192e8eeeded182ae6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1532335
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60713}
parent d196d7d9
This diff is collapsed.
......@@ -156,21 +156,21 @@ template("v8_source_set") {
"configs",
"remove_configs",
])
configs -= v8_remove_configs
configs += v8_add_configs
if (defined(invoker.remove_configs)) {
configs -= invoker.remove_configs
}
configs += invoker.configs
configs -= v8_remove_configs
configs += v8_add_configs
}
}
template("v8_header_set") {
jumbo_source_set(target_name) {
forward_variables_from(invoker, "*", [ "configs" ])
configs += invoker.configs
configs -= v8_remove_configs
configs += v8_add_configs
configs += invoker.configs
}
}
......@@ -182,12 +182,12 @@ template("v8_executable") {
"configs",
"remove_configs",
])
configs -= v8_remove_configs
configs += v8_add_configs
if (defined(invoker.remove_configs)) {
configs -= invoker.remove_configs
}
configs += invoker.configs
configs -= v8_remove_configs
configs += v8_add_configs
if (is_linux) {
# For enabling ASLR.
ldflags = [ "-pie" ]
......@@ -210,9 +210,9 @@ template("v8_executable") {
template("v8_component") {
component(target_name) {
forward_variables_from(invoker, "*", [ "configs" ])
configs += invoker.configs
configs -= v8_remove_configs
configs += v8_add_configs
configs += invoker.configs
}
}
......@@ -220,9 +220,9 @@ template("v8_static_library") {
static_library(target_name) {
complete_static_lib = true
forward_variables_from(invoker, "*", [ "configs" ])
configs += invoker.configs
configs -= v8_remove_configs
configs -= [ "//build/config/compiler:thin_archive" ]
configs += v8_add_configs
configs += invoker.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