Reland: Only put PARSE_TIME_MAKE_GOALS into KATI_TARGETS
Only goals that modify the parsing need to be passed to kati, filter out everything else and only pass it to ninja. Also, always specify --gen_all_phony_targets. With this flag, kati emits all phony targets in the ninja file so a ninja file generated only with PARSE_TIME_MAKE_GOALS can handle targets which don't change the parsing. This is a reland attempt of https://android-review.googlesource.com/#/c/172800/ The two issues should have been fixed by Ying in internal trees. Bug: 24339367 Change-Id: I8ba2254f9bff271da2a7aa7684fd3d987e07c9d3
This commit is contained in:
parent
7edec14c8d
commit
8b08f3a864
|
@ -54,7 +54,7 @@ PARSE_TIME_MAKE_GOALS := \
|
|||
|
||||
ANDROID_TARGETS := $(filter-out $(KATI_OUTPUT_PATTERNS) $(NINJA_GOALS),$(ORIGINAL_MAKECMDGOALS))
|
||||
EXTRA_TARGETS := $(filter-out $(KATI_OUTPUT_PATTERNS) $(NINJA_GOALS),$(filter-out $(ORIGINAL_MAKECMDGOALS),$(MAKECMDGOALS)))
|
||||
KATI_TARGETS := $(if $(filter $(PARSE_TIME_MAKE_GOALS),$(ANDROID_TARGETS)),$(ANDROID_TARGETS),)
|
||||
KATI_TARGETS := $(filter $(PARSE_TIME_MAKE_GOALS),$(ANDROID_TARGETS))
|
||||
|
||||
define replace_space_and_slash
|
||||
$(subst /,_,$(subst $(space),_,$(sort $1)))
|
||||
|
@ -136,7 +136,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 -f build/core/main.mk $(or $(KATI_TARGETS),--gen_all_phony_targets) BUILDING_WITH_NINJA=true
|
||||
+$(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 $(KATI_TARGETS) --gen_all_phony_targets BUILDING_WITH_NINJA=true
|
||||
|
||||
KATI_CXX := $(CLANG_CXX) $(CLANG_HOST_GLOBAL_CFLAGS) $(CLANG_HOST_GLOBAL_CPPFLAGS)
|
||||
KATI_LD := $(CLANG_CXX) $(CLANG_HOST_GLOBAL_LDFLAGS)
|
||||
|
|
Loading…
Reference in New Issue