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

Unified Diff: build/config/jumbo.gni

Issue 2867693004: Snapshot of all changes to get jumbo in blink and content.
Patch Set: Exclude certain files from jumbo because of a Windows problem Created 3 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 | « base/trace_event/trace_log.cc ('k') | build/precompile.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/jumbo.gni
diff --git a/build/config/jumbo.gni b/build/config/jumbo.gni
index 90e8f52e482e1bd31ccdfc7a1cced2f341271d6f..8e206fba67108cc80e5ffac2ada7003dd10b5cc0 100644
--- a/build/config/jumbo.gni
+++ b/build/config/jumbo.gni
@@ -3,11 +3,13 @@
# found in the LICENSE file.
import("//build/split_static_library.gni") # When someone uses that target_type
+import("//testing/test.gni") # When someone uses the test target_type
declare_args() {
# If true, use a jumbo build (files compiled together) to speed up
- # compilation.
- use_jumbo_build = false
+ # compilation. Enabled by default for everything official builds and
+ # Android+gcc builds because of a warning that prevents builds.
+ use_jumbo_build = !is_official_build && !(is_android && !is_clang)
# A target to exclude from jumbo builds, for optimal round trip time
# when frequently changing a single cpp file.
@@ -21,7 +23,8 @@ declare_args() {
# Higher numbers than 100 does not reduce wall clock compile times
# even for 4 cores or less so no reason to go (much) higher than 100.
# 100 uses 8% less total CPU than 50 when compiling content and 10%
- # less wall clock when compiling with 4 cores.
+ # less wall clock when compiling with 4 cores but content is extreme so
+ # the total negative effect of 50 is smaller.
jumbo_file_merge_limit = 100
}
@@ -47,6 +50,14 @@ declare_args() {
# If set to a list of files, those files will not be merged with
# the rest. This can be necessary if merging the files causes
# compilation issues and fixing the issues is impractical.
+#
+# jumbo_gen_dir
+# If set, this overrides the default location for the generated
+# jumbo files. This can be needed if the default location is too
+# deep for the build tools. By default the location is based on
+# the first file in sources. (Might not be neeeded one Chromium
+# has the fix for
+# https://github.com/ninja-build/ninja/issues/1161.
template("internal_jumbo_target") {
use_jumbo_build_for_target = use_jumbo_build
if (defined(invoker.always_build_jumbo) && invoker.always_build_jumbo) {
@@ -65,8 +76,11 @@ template("internal_jumbo_target") {
}
invoker_sources = invoker.sources
- gen_target_dir = get_path_info(invoker_sources[0], "gen_dir")
- assert(excluded_sources != [] || true) # Prevent "unused variable".
+ if (defined(invoker.jumbo_gen_dir)) {
+ gen_target_dir = invoker.jumbo_gen_dir
+ } else {
+ gen_target_dir = get_path_info(invoker_sources[0], "gen_dir")
+ }
# Find the gen_target_dir directory with shortest path. Short paths
# are nice in themselves since they mean shorter error messages and
@@ -255,3 +269,21 @@ set_defaults("jumbo_component") {
configs = default_compiler_configs
}
}
+
+# See documentation above by "internal_jumbo_target".
+template("jumbo_test") {
+ internal_jumbo_target(target_name) {
+ target_type = "test"
+ forward_variables_from(invoker, "*")
+ }
+}
+
+set_defaults("jumbo_test") {
+ if (is_android) {
+ configs = default_shared_library_configs
+ configs -= [ "//build/config/android:hide_all_but_jni_onload" ]
+ configs += [ "//build/config/android:hide_all_but_jni" ]
+ } else {
+ configs = default_executable_configs
+ }
+}
« no previous file with comments | « base/trace_event/trace_log.cc ('k') | build/precompile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698