Add option to speed up Torque compilation

This change adds a flag v8_enable_fast_torque, which follows the pattern
of v8_enable_fast_mksnapshot and can improve build times by running an
optimized Torque compiler during debug builds. On my machine, this
change improves rebuild time after changing a .tq file by about 7
seconds.

Change-Id: I7c91d1059c614fe34eefe7ee8c3cba7c931d5a50
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1612160
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61556}
This commit is contained in:
Seth Brenith 2019-05-15 10:14:05 -07:00 committed by Commit Bot
parent 05c203df2e
commit 3161a43ca0

View File

@ -85,6 +85,9 @@ declare_args() {
# Enable fast mksnapshot runs.
v8_enable_fast_mksnapshot = false
# Optimize code for Torque executable, even during a debug build.
v8_enable_fast_torque = ""
# Enable embedded builtins.
v8_enable_embedded_builtins = true
@ -228,6 +231,9 @@ if (v8_enable_snapshot_native_code_counters == "") {
if (v8_enable_shared_ro_heap == "") {
v8_enable_shared_ro_heap = v8_enable_lite_mode
}
if (v8_enable_fast_torque == "") {
v8_enable_fast_torque = v8_enable_fast_mksnapshot
}
assert(v8_current_cpu != "x86" || !v8_untrusted_code_mitigations,
"Untrusted code mitigations are unsupported on ia32")
@ -3371,6 +3377,12 @@ v8_source_set("torque_base") {
if (is_win && is_asan) {
remove_configs += [ "//build/config/sanitizers:default_sanitizer_flags" ]
}
if (is_debug && !v8_optimized_debug && v8_enable_fast_torque) {
# The :no_optimize config is added to v8_add_configs in v8.gni.
remove_configs += [ "//build/config/compiler:no_optimize" ]
configs += [ ":always_optimize" ]
}
}
v8_source_set("torque_ls_base") {