Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: third_party/WebKit/Source/core/core.gni

Issue 2301383003: Move more of webcore_remaining into GN build files. (Closed)
Patch Set: . Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/split_static_library.gni")
6 import("//third_party/WebKit/Source/config.gni") 7 import("//third_party/WebKit/Source/config.gni")
7 8
8 blink_core_output_dir = "$root_gen_dir/blink/core" 9 blink_core_output_dir = "$root_gen_dir/blink/core"
9 10
10 # This file sets core_config_add and core_config_remove lists of configs to 11 # This file sets core_config_add and core_config_remove lists of configs to
11 # modify the default lists of configs set in the build as appropriate for core 12 # modify the default lists of configs set in the build as appropriate for core
12 # targets. This avoids duplicating logic across many targets. 13 # targets. This avoids duplicating logic across many targets.
13 core_config_add = [ 14 core_config_add = [
14 "//build/config/compiler:wexit_time_destructors", 15 "//build/config/compiler:wexit_time_destructors",
15 "//third_party/WebKit/Source:config", 16 "//third_party/WebKit/Source:config",
(...skipping 23 matching lines...) Expand all
39 # source sets. 40 # source sets.
40 core_link_large_target_type = "source_set" 41 core_link_large_target_type = "source_set"
41 core_link_small_target_type = "source_set" 42 core_link_small_target_type = "source_set"
42 } else { 43 } else {
43 # In static builds some of the libraries can get >2GB on Windows so we need 44 # In static builds some of the libraries can get >2GB on Windows so we need
44 # to split the targets for the larger ones. 45 # to split the targets for the larger ones.
45 core_link_large_target_type = "split_static_library" 46 core_link_large_target_type = "split_static_library"
46 core_link_small_target_type = "static_library" 47 core_link_small_target_type = "static_library"
47 } 48 }
48 49
50 # Use this to generate a static library or source set that gets linked into
51 # "core". This will either be a source_set (component build), a static library
52 # (split_count undefined) or a split static library (split_count defined).
53 #
54 # Special values. All unlisted values are forwarded to the underlying library.
55 #
56 # configs
57 # Normal meaning. The set_defaults call below will make the default value
58 # of configs in the calling code take into account the core_config_add and
59 # core_config_remove lists above. So you don't need to manually take these
60 # into account: just modify the configs as normal for target-specific
61 # overrides (or don't touch it).
62 #
63 # split_count
64 # If defined, non-component builds will generate this number of static
65 # libraries by splitting the sources. This is for use on Windows where the
66 # maximum static library size is 2GB, and 64-bit builds with full symbols
67 # can exceed this if there are many sources.
68 #
69 # deps
70 # Normal meaning but "core:prerequisites" target is always added. Callers
71 # shouldn'y list prerequisites as a dependency.
72 #
73 # visibility
74 # Normal meaning if defined. If undefined, defaults to everything in core.
75 template("blink_core_sources") {
76 if (is_component_build) {
77 target_type = "source_set"
78
79 # This assert avoids an unused variable warning.
80 assert(!defined(invoker.split_count) || invoker.split_count != 0)
81 } else if (!defined(invoker.split_count)) {
82 target_type = "static_library"
83 } else {
84 target_type = "split_static_library"
85 }
86
87 target(target_type, target_name) {
88 # The visibility will get overridden by forward_variables_from below if the
89 # invoker defined it.
90 visibility = [ "//third_party/WebKit/Source/core/*" ]
91
92 if (target_type == "split_static_library") {
93 split_count = invoker.split_count
94 }
95
96 deps = [
97 "//third_party/WebKit/Source/core:prerequisites",
98 ]
99 if (defined(invoker.deps)) {
100 deps += invoker.deps
101 }
102
103 # Take everything else not handled above from the invoker.
104 forward_variables_from(invoker,
105 "*",
106 [
107 "deps",
108 "split_count",
109 ])
110 }
111 }
112 set_defaults("blink_core_sources") {
113 # This sets the default list of configs when the blink_core_sources target
114 # is defined. The default_compiler_configs comes from BUILDCONFIG.gn and
115 # is the list normally applied to static libraries and source sets.
116 configs = default_compiler_configs - core_config_remove + core_config_add
117 }
118
49 # This file is the GN version of core.gypi. We rebase most paths to be absolute 119 # This file is the GN version of core.gypi. We rebase most paths to be absolute
50 # so these lists can be used by BUILD files in different directories without 120 # so these lists can be used by BUILD files in different directories without
51 # worrying about the base directory. 121 # worrying about the base directory.
52 _gypi = 122 _gypi =
53 exec_script("//build/gypi_to_gn.py", 123 exec_script("//build/gypi_to_gn.py",
54 [ 124 [
55 rebase_path("core.gypi"), 125 rebase_path("core.gypi"),
56 "--replace=<(SHARED_INTERMEDIATE_DIR)=$root_gen_dir", 126 "--replace=<(SHARED_INTERMEDIATE_DIR)=$root_gen_dir",
57 "--replace=<(blink_core_output_dir)=$blink_core_output_dir", 127 "--replace=<(blink_core_output_dir)=$blink_core_output_dir",
58 ], 128 ],
(...skipping 17 matching lines...) Expand all
76 146
77 # Interfaces that inherit from Event, including Event itself. 147 # Interfaces that inherit from Event, including Event itself.
78 core_event_idl_files = get_path_info(_gypi.core_event_idl_files, "abspath") 148 core_event_idl_files = get_path_info(_gypi.core_event_idl_files, "abspath")
79 149
80 # IDL files that only have typedefs/enums. 150 # IDL files that only have typedefs/enums.
81 core_typedefs_enums_only_idl_files = 151 core_typedefs_enums_only_idl_files =
82 get_path_info(_gypi.core_typedefs_enums_only_idl_files, "abspath") 152 get_path_info(_gypi.core_typedefs_enums_only_idl_files, "abspath")
83 153
84 webcore_non_rendering_files = 154 webcore_non_rendering_files =
85 get_path_info(_gypi.webcore_non_rendering_files, "abspath") 155 get_path_info(_gypi.webcore_non_rendering_files, "abspath")
86 webcore_rendering_files =
87 get_path_info(_gypi.webcore_rendering_files, "abspath")
88 webcore_testing_idl_files = 156 webcore_testing_idl_files =
89 get_path_info(_gypi.webcore_testing_idl_files, "abspath") 157 get_path_info(_gypi.webcore_testing_idl_files, "abspath")
90 webcore_testing_idl_with_modules_dependency_files = 158 webcore_testing_idl_with_modules_dependency_files =
91 get_path_info(_gypi.webcore_testing_idl_with_modules_dependency_files, 159 get_path_info(_gypi.webcore_testing_idl_with_modules_dependency_files,
92 "abspath") 160 "abspath")
93 webcore_testing_dependency_idl_files = 161 webcore_testing_dependency_idl_files =
94 get_path_info(_gypi.webcore_testing_dependency_idl_files, "abspath") 162 get_path_info(_gypi.webcore_testing_dependency_idl_files, "abspath")
95 generated_core_dictionary_files = 163 generated_core_dictionary_files =
96 get_path_info(_gypi.generated_core_dictionary_files, "abspath") 164 get_path_info(_gypi.generated_core_dictionary_files, "abspath")
97 generated_core_testing_dictionary_files = 165 generated_core_testing_dictionary_files =
98 get_path_info(_gypi.generated_core_testing_dictionary_files, "abspath") 166 get_path_info(_gypi.generated_core_testing_dictionary_files, "abspath")
99 generated_webcore_testing_idl_files = 167 generated_webcore_testing_idl_files =
100 get_path_info(_gypi.generated_webcore_testing_idl_files, "abspath") 168 get_path_info(_gypi.generated_webcore_testing_idl_files, "abspath")
101 webcore_testing_files = get_path_info(_gypi.webcore_testing_files, "abspath") 169 webcore_testing_files = get_path_info(_gypi.webcore_testing_files, "abspath")
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/clipboard/BUILD.gn ('k') | third_party/WebKit/Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698