OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/chrome_build.gni") | 5 import("//build/config/chrome_build.gni") |
| 6 import("//build/jumbo.gni") |
6 import("//build/split_static_library.gni") | 7 import("//build/split_static_library.gni") |
7 import("//third_party/WebKit/Source/config.gni") | 8 import("//third_party/WebKit/Source/config.gni") |
8 | 9 |
9 blink_core_output_dir = "$root_gen_dir/blink/core" | 10 blink_core_output_dir = "$root_gen_dir/blink/core" |
10 | 11 |
11 # This file sets core_config_add and core_config_remove lists of configs to | 12 # This file sets core_config_add and core_config_remove lists of configs to |
12 # modify the default lists of configs set in the build as appropriate for core | 13 # modify the default lists of configs set in the build as appropriate for core |
13 # targets. This avoids duplicating logic across many targets. | 14 # targets. This avoids duplicating logic across many targets. |
14 core_config_add = [ | 15 core_config_add = [ |
15 "//build/config/compiler:wexit_time_destructors", | 16 "//build/config/compiler:wexit_time_destructors", |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 # maximum static library size is 2GB, and 64-bit builds with full symbols | 67 # maximum static library size is 2GB, and 64-bit builds with full symbols |
67 # can exceed this if there are many sources. | 68 # can exceed this if there are many sources. |
68 # | 69 # |
69 # deps | 70 # deps |
70 # Normal meaning but "core:prerequisites" target is always added. Callers | 71 # Normal meaning but "core:prerequisites" target is always added. Callers |
71 # shouldn'y list prerequisites as a dependency. | 72 # shouldn'y list prerequisites as a dependency. |
72 # | 73 # |
73 # visibility | 74 # visibility |
74 # Normal meaning if defined. If undefined, defaults to everything in core. | 75 # Normal meaning if defined. If undefined, defaults to everything in core. |
75 template("blink_core_sources") { | 76 template("blink_core_sources") { |
76 if (is_component_build) { | 77 jumbo_target(target_name) { |
77 target_type = "source_set" | 78 if (is_component_build) { |
| 79 target_type = "source_set" |
78 | 80 |
79 # This assert avoids an unused variable warning. | 81 # This assert avoids an unused variable warning. |
80 assert(!defined(invoker.split_count) || invoker.split_count != 0) | 82 assert(!defined(invoker.split_count) || invoker.split_count != 0) |
81 } else if (!defined(invoker.split_count)) { | 83 } else if (!defined(invoker.split_count)) { |
82 target_type = "static_library" | 84 target_type = "static_library" |
83 } else { | 85 } else { |
84 target_type = "split_static_library" | 86 target_type = "split_static_library" |
85 } | 87 } |
86 | 88 |
87 target(target_type, target_name) { | |
88 # The visibility will get overridden by forward_variables_from below if the | 89 # The visibility will get overridden by forward_variables_from below if the |
89 # invoker defined it. | 90 # invoker defined it. |
90 visibility = [ "//third_party/WebKit/Source/core/*" ] | 91 visibility = [ "//third_party/WebKit/Source/core/*" ] |
91 | 92 |
92 if (target_type == "split_static_library") { | 93 if (target_type == "split_static_library") { |
93 split_count = invoker.split_count | 94 split_count = invoker.split_count |
94 } | 95 } |
95 | 96 |
96 deps = [ | 97 deps = [ |
97 "//third_party/WebKit/Source/core:prerequisites", | 98 "//third_party/WebKit/Source/core:prerequisites", |
(...skipping 22 matching lines...) Expand all Loading... |
120 set_defaults("blink_core_sources") { | 121 set_defaults("blink_core_sources") { |
121 # This sets the default list of configs when the blink_core_sources target | 122 # This sets the default list of configs when the blink_core_sources target |
122 # is defined. The default_compiler_configs comes from BUILDCONFIG.gn and | 123 # is defined. The default_compiler_configs comes from BUILDCONFIG.gn and |
123 # is the list normally applied to static libraries and source sets. | 124 # is the list normally applied to static libraries and source sets. |
124 configs = default_compiler_configs - core_config_remove + core_config_add | 125 configs = default_compiler_configs - core_config_remove + core_config_add |
125 | 126 |
126 # Compile each of the core sources targets with (core) precompiled header | 127 # Compile each of the core sources targets with (core) precompiled header |
127 # support, for lower Windows build times. | 128 # support, for lower Windows build times. |
128 configs += [ "//third_party/WebKit/Source/core:blink_core_pch" ] | 129 configs += [ "//third_party/WebKit/Source/core:blink_core_pch" ] |
129 } | 130 } |
OLD | NEW |