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

Unified Diff: build/config/jumbo.gni

Issue 2973603003: Jumbo for blink/core generated files as well (saving 8 CPU minutes) (Closed)
Patch Set: Remove temporary testing code. Created 3 years, 5 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 | « no previous file | third_party/WebKit/Source/core/BUILD.gn » ('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 4a5f22f4a94ee0d2937adbe6ef5088857679df44..364485cb49cb919b9a1fa8016f362f180a01b66a 100644
--- a/build/config/jumbo.gni
+++ b/build/config/jumbo.gni
@@ -66,6 +66,25 @@ 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. Short paths
+ # are nice in themselves since they mean shorter error messages and
+ # fewer bytes to parse, but the currently deployed version of ninja
+ # also has a limitation where it only allows 32 path components in
+ # Windows.
+ # See https://crbug.com/738186 and
+ # https://github.com/ninja-build/ninja/issues/1161
+ 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) {
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698