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.
5 import("//testing/test.gni")
9 "//build/config:precompiled_headers",
10 "//build/config/compiler:wexit_time_destructors",
14 cc_remove_configs += [ "//build/config/compiler:default_optimization" ]
15 cc_add_configs += [ "//build/config/compiler:optimize_max" ]
18 template("cc_component") {
19 component(target_name) {
20 forward_variables_from(invoker, "*", [ "configs" ])
21 if (defined(invoker.configs)) {
22 configs += invoker.configs
24 configs -= cc_remove_configs
25 configs += cc_add_configs
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
35 configs -= cc_remove_configs
36 configs += cc_add_configs
38 # Not needed in test code.
39 configs -= [ "//build/config/compiler:wexit_time_destructors" ]
45 forward_variables_from(invoker, "*", [ "configs" ])
46 if (defined(invoker.configs)) {
47 configs += invoker.configs
49 configs -= cc_remove_configs
50 configs += cc_add_configs
52 # Not needed in test code.
53 configs -= [ "//build/config/compiler:wexit_time_destructors" ]