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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/core.gni
diff --git a/third_party/WebKit/Source/core/core.gni b/third_party/WebKit/Source/core/core.gni
index d6bcd445eac0d34448bfc67c09f02ff989176b41..9692b5a27cc990b2245c9742ee999ec14f0c1438 100644
--- a/third_party/WebKit/Source/core/core.gni
+++ b/third_party/WebKit/Source/core/core.gni
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//build/config/chrome_build.gni")
+import("//build/split_static_library.gni")
import("//third_party/WebKit/Source/config.gni")
blink_core_output_dir = "$root_gen_dir/blink/core"
@@ -46,6 +47,75 @@ if (is_component_build) {
core_link_small_target_type = "static_library"
}
+# Use this to generate a static library or source set that gets linked into
+# "core". This will either be a source_set (component build), a static library
+# (split_count undefined) or a split static library (split_count defined).
+#
+# Special values. All unlisted values are forwarded to the underlying library.
+#
+# configs
+# Normal meaning. The set_defaults call below will make the default value
+# of configs in the calling code take into account the core_config_add and
+# core_config_remove lists above. So you don't need to manually take these
+# into account: just modify the configs as normal for target-specific
+# overrides (or don't touch it).
+#
+# split_count
+# If defined, non-component builds will generate this number of static
+# libraries by splitting the sources. This is for use on Windows where the
+# maximum static library size is 2GB, and 64-bit builds with full symbols
+# can exceed this if there are many sources.
+#
+# deps
+# Normal meaning but "core:prerequisites" target is always added. Callers
+# shouldn'y list prerequisites as a dependency.
+#
+# visibility
+# Normal meaning if defined. If undefined, defaults to everything in core.
+template("blink_core_sources") {
+ if (is_component_build) {
+ target_type = "source_set"
+
+ # This assert avoids an unused variable warning.
+ assert(!defined(invoker.split_count) || invoker.split_count != 0)
+ } else if (!defined(invoker.split_count)) {
+ target_type = "static_library"
+ } else {
+ target_type = "split_static_library"
+ }
+
+ target(target_type, target_name) {
+ # The visibility will get overridden by forward_variables_from below if the
+ # invoker defined it.
+ visibility = [ "//third_party/WebKit/Source/core/*" ]
+
+ if (target_type == "split_static_library") {
+ split_count = invoker.split_count
+ }
+
+ deps = [
+ "//third_party/WebKit/Source/core:prerequisites",
+ ]
+ if (defined(invoker.deps)) {
+ deps += invoker.deps
+ }
+
+ # Take everything else not handled above from the invoker.
+ forward_variables_from(invoker,
+ "*",
+ [
+ "deps",
+ "split_count",
+ ])
+ }
+}
+set_defaults("blink_core_sources") {
+ # This sets the default list of configs when the blink_core_sources target
+ # is defined. The default_compiler_configs comes from BUILDCONFIG.gn and
+ # is the list normally applied to static libraries and source sets.
+ configs = default_compiler_configs - core_config_remove + core_config_add
+}
+
# This file is the GN version of core.gypi. We rebase most paths to be absolute
# so these lists can be used by BUILD files in different directories without
# worrying about the base directory.
@@ -83,8 +153,6 @@ core_typedefs_enums_only_idl_files =
webcore_non_rendering_files =
get_path_info(_gypi.webcore_non_rendering_files, "abspath")
-webcore_rendering_files =
- get_path_info(_gypi.webcore_rendering_files, "abspath")
webcore_testing_idl_files =
get_path_info(_gypi.webcore_testing_idl_files, "abspath")
webcore_testing_idl_with_modules_dependency_files =
« 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