OLD | NEW |
(Empty) | |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 cc_remove_configs = [] |
| 6 cc_add_configs = [] |
| 7 |
| 8 if (!is_debug && (is_win || is_android)) { |
| 9 cc_remove_configs += [ "//build/config/compiler:default_optimization" ] |
| 10 cc_add_configs += [ "//build/config/compiler:optimize_max" ] |
| 11 } |
| 12 |
| 13 template("cc_source_set") { |
| 14 source_set(target_name) { |
| 15 forward_variables_from(invoker, "*", [ "configs" ]) |
| 16 if (defined(invoker.configs)) { |
| 17 configs += invoker.configs |
| 18 } |
| 19 configs -= cc_remove_configs |
| 20 configs += cc_add_configs |
| 21 } |
| 22 } |
| 23 |
| 24 template("cc_component") { |
| 25 component(target_name) { |
| 26 forward_variables_from(invoker, "*", [ "configs" ]) |
| 27 if (defined(invoker.configs)) { |
| 28 configs += invoker.configs |
| 29 } |
| 30 configs -= cc_remove_configs |
| 31 configs += cc_add_configs |
| 32 } |
| 33 } |
OLD | NEW |