Commit 3161a43c authored by Seth Brenith's avatar Seth Brenith Committed by Commit Bot

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: 's avatarTobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61556}
parent 05c203df
......@@ -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") {
......
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