forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstatic_initializers.gni
51 lines (44 loc) · 1.98 KB
/
static_initializers.gni
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Copyright 2017 The Chromium Authors. All rights reserved.
# 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("//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.
# 000101 (initializer offset 0x142e924 size 0xc)
# std::__1::ios_base::Init::Init()
#
# iostream.cpp (initializer offset 0x142e930 size 0x2)
# [empty ctor, but it still has cost on gcc <4.6]
expected_static_initializer_count = 2
# TODO(https://crbug.com/1177849): Remove from tflite:
# tflite_engine.cc (initializer offset 0x34cb88c size 0x2c)
# __ThumbV7PILongThunk__ZNSt3__18ios_base4InitC1Ev
# __ThumbV7PILongThunk___cxa_atexit
expected_static_initializer_count += 1
# From v8 I think:
# token.cc (initializer offset 0x27f024c size 0x11c)
expected_static_initializer_count += 1
# This one is from //third_party/gvr-android-sdk
# base_logging.cc (initializer offset 0x9a4b0c size 0x48)
expected_static_initializer_count += 1
if (use_static_angle && !is_official_build) {
# TODO(https://crbug.com/1172451): remove global variables from ANGLE:
#
# doc.cpp (initializer offset 0xcf9c6c size 0x138)
# SPVRemapper.cpp (initializer offset 0xcf2924 size 0x64)
expected_static_initializer_count += 2
}
}