am 3c524993: Merge "Make it possible to change the number of remote jobs"

* commit '3c524993c7d18cd9396a4d014c58039478c21e3e':
  Make it possible to change the number of remote jobs
This commit is contained in:
Shinichiro Hamaji 2015-09-25 04:42:46 +00:00 committed by Android Git Automerger
commit 5d1006cab6
2 changed files with 7 additions and 7 deletions

View file

@ -53,11 +53,6 @@ ifneq ($(USE_GOMA),)
CC_WRAPPER := $(strip $(CC_WRAPPER) $(goma_cc))
CXX_WRAPPER := $(strip $(CXX_WRAPPER) $(goma_cc))
# Ninja file generated by kati uses this for remote jobs (i.e.,
# commands which contain gomacc). Note the parallelism of all other
# jobs will be limited the number of cores.
KATI_REMOTE_NUM_JOBS_FLAG := --remote_num_jobs=500
# gomacc can start goma client's daemon process automatically, but
# it is safer and faster to start up it beforehand. We run this as a
# background process so this won't slow down the build.

View file

@ -105,8 +105,13 @@ PHONY: showcommands
showcommands: droid
endif
ifdef KATI_REMOTE_NUM_JOBS_FLAG
ifdef USE_GOMA
KATI_MAKEPARALLEL := $(MAKEPARALLEL)
# Ninja runs remote jobs (i.e., commands which contain gomacc) with
# this parallelism. Note the parallelism of all other jobs is still
# limited by the -j flag passed to GNU make.
NINJA_REMOTE_NUM_JOBS ?= 500
NINJA_ARGS += -j$(NINJA_REMOTE_NUM_JOBS)
else
NINJA_MAKEPARALLEL := $(MAKEPARALLEL) --ninja
endif
@ -133,7 +138,7 @@ $(KATI_OUTPUTS): kati.intermediate $(KATI_FORCE)
.INTERMEDIATE: kati.intermediate
kati.intermediate: $(KATI) $(MAKEPARALLEL)
@echo Running kati to generate build$(KATI_NINJA_SUFFIX).ninja...
+$(hide) $(KATI_MAKEPARALLEL) $(KATI) --ninja --ninja_dir=$(PRODUCT_OUT) --ninja_suffix=$(KATI_NINJA_SUFFIX) --regen --ignore_dirty=$(OUT_DIR)/% --ignore_optional_include=$(OUT_DIR)/%.P --detect_android_echo --use_find_emulator $(KATI_REMOTE_NUM_JOBS_FLAG) -f build/core/main.mk $(or $(KATI_TARGETS),--gen_all_phony_targets) USE_NINJA=false
+$(hide) $(KATI_MAKEPARALLEL) $(KATI) --ninja --ninja_dir=$(PRODUCT_OUT) --ninja_suffix=$(KATI_NINJA_SUFFIX) --regen --ignore_dirty=$(OUT_DIR)/% --ignore_optional_include=$(OUT_DIR)/%.P --detect_android_echo --use_find_emulator -f build/core/main.mk $(or $(KATI_TARGETS),--gen_all_phony_targets) USE_NINJA=false
KATI_CXX := $(CLANG_CXX) $(CLANG_HOST_GLOBAL_CFLAGS) $(CLANG_HOST_GLOBAL_CPPFLAGS)
KATI_LD := $(CLANG_CXX) $(CLANG_HOST_GLOBAL_LDFLAGS)