[build] Add new build argument v8_symbol_level

May override the global symbol_level config. Useful for debugging V8
within a release Chromium, like v8_enable_debugging_features.

Change-Id: Ie081b5110dc93914cbe53fdde3cdec77822b9819
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2051959
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66262}
This commit is contained in:
Pengyu Chen 2020-02-13 01:00:59 +00:00 committed by Commit Bot
parent f44027169d
commit fe6bd3019d
2 changed files with 17 additions and 0 deletions

View File

@ -151,6 +151,7 @@ Oliver Dunk <oliver@oliverdunk.com>
Paolo Giarrusso <p.giarrusso@gmail.com>
Patrick Gansterer <paroga@paroga.com>
Peng Fei <pfgenyun@gmail.com>
Peng-Yu Chen <pengyu@libstarrify.so>
Peter Rybin <peter.rybin@gmail.com>
Peter Varga <pvarga@inf.u-szeged.hu>
Peter Wong <peter.wm.wong@gmail.com>

View File

@ -57,6 +57,9 @@ declare_args() {
# Use Perfetto (https://perfetto.dev) as the default TracingController. Not
# currently implemented.
v8_use_perfetto = false
# Override global symbol level setting for v8
v8_symbol_level = symbol_level
}
if (v8_use_external_startup_data == "") {
@ -116,6 +119,19 @@ if (v8_code_coverage && !is_clang) {
]
}
if (v8_symbol_level != symbol_level) {
v8_remove_configs += [ "//build/config/compiler:default_symbols" ]
if (v8_symbol_level == 0) {
v8_add_configs += [ "//build/config/compiler:no_symbols" ]
} else if (v8_symbol_level == 1) {
v8_add_configs += [ "//build/config/compiler:minimal_symbols" ]
} else if (v8_symbol_level == 2) {
v8_add_configs += [ "//build/config/compiler:symbols" ]
} else {
assert(false)
}
}
if ((is_posix || is_fuchsia) &&
(v8_enable_backtrace || v8_monolithic || v8_expose_symbols)) {
v8_remove_configs += [ "//build/config/gcc:symbol_visibility_hidden" ]