blob: d05f24c94a0396a8e8701788e7e1acac66880e84 [file] [log] [blame]
# Copyright 2017 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/features.gni")
import("//build/config/sanitizers/sanitizers.gni")
import("//components/optimization_guide/features.gni")
import("//ui/gl/features.gni")
# The monochrome_static_initializers target will cause release bots to fail if
# the count of static initializers change in either direction. Please try not to
# increase the numbers. If they come from third-party code, please try to update
# the code, or apply a local modification to remove them.
#
# Some helpful hints at //docs/static_initializers.md
#
# Define expectations only for GN args covered by trybots.
if (current_toolchain == default_toolchain &&
(target_cpu == "arm" || target_cpu == "arm64") &&
(!is_debug && !using_sanitizer && proprietary_codecs)) {
# Comments show static_initializers according to
# tools/linux/dump-static-initializers.py.
_chrome_count = 0
if (target_cpu == "arm64") {
# Caused by "outline atomics". https://crbug.com/1272795
# cpu_model.c: init_have_lse_atomics
_chrome_count += 1
}
# iostream.cpp: _GLOBAL__I_000101
_chrome_count += 1
# v8/src/parsing/token.cc: _GLOBAL__sub_I_token.cc
_chrome_count += 1
# From //third_party/gvr-android-sdk: _GLOBAL__sub_I_base_logging.cc
_chrome_count += 1
if (use_clang_coverage) {
# InstrProfilingRuntime.cpp, Only in coverage builds, not production.
_chrome_count += 1
}
_optimization_guide_count = 0
if (build_with_internal_optimization_guide) {
if (target_cpu == "arm64") {
# Caused by "outline atomics". https://crbug.com/1272795
# cpu_model.c: init_have_lse_atomics
_optimization_guide_count += 1
}
# iostream_init.h: _GLOBAL__I_000100
_optimization_guide_count += 1
}
expected_static_initializer_count = _chrome_count + _optimization_guide_count
}