diff --git a/BUILD.gn b/BUILD.gn index 73cd783766..201e5ef949 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -109,6 +109,9 @@ declare_args() { v8_enable_pointer_compression = "" v8_enable_31bit_smis_on_64bit_arch = false + # Disable arguments adaptor frame (sets -dV8_NO_ARGUMENTS_ADAPTOR). + v8_disable_arguments_adaptor = false + # Reverse JS arguments order in the stack (sets -dV8_REVERSE_JSARGS). v8_enable_reverse_jsargs = v8_current_cpu != "mipsel" && v8_current_cpu != "mips64el" @@ -353,6 +356,10 @@ assert( assert(!v8_enable_heap_sandbox || v8_enable_pointer_compression, "V8 Heap Sandbox requires pointer compression") +assert( + !v8_disable_arguments_adaptor || v8_enable_reverse_jsargs, + "Disabling the arguments adaptor frame requires reversing the JS arguments stack") + assert(!v8_enable_unconditional_write_barriers || !v8_disable_write_barriers, "Write barriers can't be both enabled and disabled") @@ -508,6 +515,9 @@ config("v8_header_features") { if (v8_imminent_deprecation_warnings) { defines += [ "V8_IMMINENT_DEPRECATION_WARNINGS" ] } + if (v8_disable_arguments_adaptor) { + defines += [ "V8_NO_ARGUMENTS_ADAPTOR" ] + } if (v8_enable_reverse_jsargs) { defines += [ "V8_REVERSE_JSARGS" ] }