Index: build/config/jumbo.gni |
diff --git a/build/config/jumbo.gni b/build/config/jumbo.gni |
index 4a5f22f4a94ee0d2937adbe6ef5088857679df44..f98d385b9765c190690a70342a3899259e4d42f4 100644 |
--- a/build/config/jumbo.gni |
+++ b/build/config/jumbo.gni |
@@ -7,7 +7,7 @@ import("//build/split_static_library.gni") # When someone uses that target_type |
declare_args() { |
# If true, use a jumbo build (files compiled together) to speed up |
# compilation. |
- use_jumbo_build = false |
+ use_jumbo_build = !is_official_build && !(is_android && !is_clang) |
Dirk Pranke
2017/07/07 20:12:10
I'm guessing this change isn't intentional (or at
Daniel Bratell
2017/07/10 09:18:29
I'm adding and removing this in every CL to verify
|
# A target to exclude from jumbo builds, for optimal round trip time |
# when frequently changing a single cpp file. |
@@ -66,6 +66,19 @@ template("jumbo_target") { |
invoker_sources = invoker.sources |
gen_target_dir = get_path_info(invoker_sources[0], "gen_dir") |
assert(excluded_sources != [] || true) # Prevent "unused variable". |
+ |
+ # Find the gen_target_dir directory with shortest path. |
Dirk Pranke
2017/07/07 20:12:10
This is a bit obscure. Can you add more to the com
Daniel Bratell
2017/07/10 09:18:30
I've expanded the comment.
The part I missed in g
|
+ foreach(source_file, invoker.sources) { |
+ possibly_better_gen_target_dir = get_path_info(gen_target_dir, "dir") |
+ possibly_better_gen_target_dir_2 = |
+ get_path_info(possibly_better_gen_target_dir, "dir") |
+ alt_gen_target_dir = get_path_info(source_file, "gen_dir") |
+ if (alt_gen_target_dir == possibly_better_gen_target_dir || |
+ alt_gen_target_dir == possibly_better_gen_target_dir_2) { |
+ gen_target_dir = alt_gen_target_dir |
+ } |
+ } |
+ |
assert(gen_target_dir != "") # Prevent "unused variable". |
if (use_jumbo_build_for_target) { |