[M108 Migration][Loading Performance] Introduce |BeginMainFrame| throttling
[platform/framework/web/chromium-efl.git] / cc / cc.gni
1 # Copyright 2016 The Chromium Authors
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import("//testing/test.gni")
6
7 cc_remove_configs = []
8 cc_add_configs = [
9   "//build/config:precompiled_headers",
10   "//build/config/compiler:wexit_time_destructors",
11 ]
12
13 if (!is_debug) {
14   cc_remove_configs += [ "//build/config/compiler:default_optimization" ]
15   cc_add_configs += [ "//build/config/compiler:optimize_max" ]
16 }
17
18 template("cc_component") {
19   component(target_name) {
20     forward_variables_from(invoker, "*", [ "configs" ])
21     if (defined(invoker.configs)) {
22       configs += invoker.configs
23     }
24     configs -= cc_remove_configs
25     configs += cc_add_configs
26   }
27 }
28
29 template("cc_test_static_library") {
30   static_library(target_name) {
31     forward_variables_from(invoker, "*", [ "configs" ])
32     if (defined(invoker.configs)) {
33       configs += invoker.configs
34     }
35     configs -= cc_remove_configs
36     configs += cc_add_configs
37
38     # Not needed in test code.
39     configs -= [ "//build/config/compiler:wexit_time_destructors" ]
40   }
41 }
42
43 template("cc_test") {
44   test(target_name) {
45     forward_variables_from(invoker, "*", [ "configs" ])
46     if (defined(invoker.configs)) {
47       configs += invoker.configs
48     }
49     configs -= cc_remove_configs
50     configs += cc_add_configs
51
52     # Not needed in test code.
53     configs -= [ "//build/config/compiler:wexit_time_destructors" ]
54   }
55 }