Add GN assert for enable_resource_allowlist_generation
Improves error messages for existing asserts, and adds one for blink_symbol_level=0 Bug: 1126200 Change-Id: I6624f6858ee568a33b5174ab8ba7c1834c1d5f56 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2401853 Commit-Queue: Andrew Grieve <agrieve@chromium.org> Reviewed-by: Bruce Dawson <brucedawson@chromium.org> Cr-Commit-Position: refs/heads/master@{#805578} GitOrigin-RevId: 73b000940e519d13ccb4e326fa26e297bb620e17
This commit is contained in:
Родитель
e8efc87321
Коммит
471a6cd745
|
@ -20,9 +20,8 @@ if (is_nacl) {
|
|||
|
||||
declare_args() {
|
||||
# Enables whitelist generation for IDR_ grit defines seen by the compiler.
|
||||
# Currently works only on some platforms and enabled by default for release
|
||||
# builds.
|
||||
# Requires debug info, so disabled for symbol_level=0 & strip_debug_info=true.
|
||||
# Currently works only on some platforms and enabled by default for official
|
||||
# builds. Requires debug info.
|
||||
enable_resource_allowlist_generation =
|
||||
is_official_build &&
|
||||
# Don't enable for Android-on-Chrome OS so that they can build with
|
||||
|
@ -36,6 +35,21 @@ if ((is_linux || is_chromeos) && target_os == "android") {
|
|||
enable_resource_allowlist_generation = false
|
||||
}
|
||||
|
||||
# Ensure enable_resource_allowlist_generation is enabled only when it will work.
|
||||
if (enable_resource_allowlist_generation) {
|
||||
assert(symbol_level >= 1,
|
||||
"enable_resource_allowlist_generation=true requires symbol_level >= 1")
|
||||
assert(
|
||||
!strip_debug_info,
|
||||
"enable_resource_allowlist_generation=true requires strip_debug_info=false")
|
||||
assert(
|
||||
!is_component_build,
|
||||
"enable_resource_allowlist_generation=true requires is_component_build=false")
|
||||
assert(
|
||||
target_os == "android" || target_os == "win",
|
||||
"enable_resource_allowlist_generation=true does not work for target_os=$target_os")
|
||||
}
|
||||
|
||||
# This template defines a toolchain for something that works like gcc
|
||||
# (including clang).
|
||||
#
|
||||
|
|
Загрузка…
Ссылка в новой задаче