| Index: build/config/jumbo.gni
|
| diff --git a/build/config/jumbo.gni b/build/config/jumbo.gni
|
| index a16795aee1ee2fe0da9aa6c070c6987c3dbcc706..7203bff690f5e4971b27f08c0df4b9b8216220d9 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.
|
| @@ -19,9 +21,10 @@ declare_args() {
|
| #
|
| # Recommendations:
|
| # Higher numbers than 200 does not reduce wall clock compile times
|
| - # for 4 cores or less.
|
| + # even for 4 cores or less so no reason to go (much) higher than 200.
|
| # 200 uses 8% less total CPU than 100 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 100 is smaller.
|
| jumbo_file_merge_limit = 200
|
| }
|
|
|
| @@ -46,6 +49,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) {
|
| @@ -64,8 +75,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
|
| @@ -194,6 +208,7 @@ set_defaults("jumbo_target") {
|
| # See documentation above by "internal_jumbo_target".
|
| template("jumbo_component") {
|
| internal_jumbo_target(target_name) {
|
| + target_type = "component"
|
| forward_variables_from(invoker, "*")
|
| }
|
| }
|
|
|