| OLD | NEW |
| (Empty) | |
| 1 # Copyright 2017 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 import("//build/config/jumbo.gni") |
| 6 import("//build/split_static_library.gni") |
| 7 |
| 8 template("content_source_set") { |
| 9 jumbo_target(target_name) { |
| 10 target_type = "source_set" |
| 11 forward_variables_from(invoker, "*") |
| 12 } |
| 13 } |
| 14 |
| 15 template("content_component") { |
| 16 jumbo_target(target_name) { |
| 17 if (is_component_build) { |
| 18 if (defined(invoker.split_count)) { |
| 19 target_type = "split_static_library" |
| 20 } else { |
| 21 target_type = "static_library" |
| 22 } |
| 23 } else { |
| 24 target_type = "source_set" |
| 25 if (defined(invoker.split_count)) { |
| 26 assert(invoker.split_count > 0) # Avoid not-user variable warning. |
| 27 } |
| 28 } |
| 29 forward_variables_from(invoker, "*") |
| 30 } |
| 31 } |
| 32 |
| 33 set_defaults("content_source_set") { |
| 34 # This sets the default list of configs when the content_source_set target |
| 35 # is defined. The default_compiler_configs comes from BUILDCONFIG.gn and |
| 36 # is the list normally applied to static libraries and source sets. |
| 37 configs = default_compiler_configs |
| 38 } |
| 39 |
| 40 set_defaults("content_component") { |
| 41 # This sets the default list of configs when the content_source_set target |
| 42 # is defined. The default_compiler_configs comes from BUILDCONFIG.gn and |
| 43 # is the list normally applied to static libraries and source sets. |
| 44 configs = default_compiler_configs |
| 45 } |
| OLD | NEW |