Order-only deps on LOCAL_C/CXX and BCC_COMPAT
So if the host binaries are updated, we don't run the rules again.
Bug: 8234097
Change-Id: I6c888d2b3ae39db1f91411da630ac098273f139d
diff --git a/core/binary.mk b/core/binary.mk
index 711022e..c136a00 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -437,8 +437,9 @@
ifneq ($(strip $(cpp_objects)),)
$(cpp_objects): $(intermediates)/%.o: \
$(TOPDIR)$(LOCAL_PATH)/%$(LOCAL_CPP_EXTENSION) \
- $(yacc_cpps) $(proto_generated_headers) $(my_compiler_dependencies) \
- $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(yacc_cpps) $(proto_generated_headers) \
+ $(LOCAL_ADDITIONAL_DEPENDENCIES) \
+ | $(my_compiler_dependencies)
$(transform-$(PRIVATE_HOST)cpp-to-o)
-include $(cpp_objects:%.o=%.P)
endif
@@ -457,8 +458,9 @@
$(gen_cpp_objects): PRIVATE_ARM_CFLAGS := $(normal_objects_cflags)
$(gen_cpp_objects): $(intermediates)/%.o: \
$(intermediates)/%$(LOCAL_CPP_EXTENSION) $(yacc_cpps) \
- $(proto_generated_headers) $(my_compiler_dependencies) \
- $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(proto_generated_headers) \
+ $(LOCAL_ADDITIONAL_DEPENDENCIES) \
+ | $(my_compiler_dependencies)
$(transform-$(PRIVATE_HOST)cpp-to-o)
-include $(gen_cpp_objects:%.o=%.P)
endif
@@ -472,7 +474,8 @@
ifneq ($(strip $(gen_S_sources)),)
$(gen_S_objects): $(intermediates)/%.o: $(intermediates)/%.S \
- $(my_compiler_dependencies) $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(LOCAL_ADDITIONAL_DEPENDENCIES) \
+ | $(my_compiler_dependencies)
$(transform-$(PRIVATE_HOST)s-to-o)
-include $(gen_S_objects:%.o=%.P)
endif
@@ -482,7 +485,8 @@
ifneq ($(strip $(gen_s_objects)),)
$(gen_s_objects): $(intermediates)/%.o: $(intermediates)/%.s \
- $(my_compiler_dependencies) $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(LOCAL_ADDITIONAL_DEPENDENCIES) \
+ | $(my_compiler_dependencies)
$(transform-$(PRIVATE_HOST)s-to-o-no-deps)
-include $(gen_s_objects:%.o=%.P)
endif
@@ -508,7 +512,8 @@
ifneq ($(strip $(c_objects)),)
$(c_objects): $(intermediates)/%.o: $(TOPDIR)$(LOCAL_PATH)/%.c $(yacc_cpps) $(proto_generated_headers) \
- $(my_compiler_dependencies) $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(LOCAL_ADDITIONAL_DEPENDENCIES) \
+ | $(my_compiler_dependencies)
$(transform-$(PRIVATE_HOST)c-to-o)
-include $(c_objects:%.o=%.P)
endif
@@ -526,7 +531,8 @@
$(gen_c_objects): PRIVATE_ARM_MODE := $(normal_objects_mode)
$(gen_c_objects): PRIVATE_ARM_CFLAGS := $(normal_objects_cflags)
$(gen_c_objects): $(intermediates)/%.o: $(intermediates)/%.c $(yacc_cpps) $(proto_generated_headers) \
- $(my_compiler_dependencies) $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(LOCAL_ADDITIONAL_DEPENDENCIES) \
+ | $(my_compiler_dependencies)
$(transform-$(PRIVATE_HOST)c-to-o)
-include $(gen_c_objects:%.o=%.P)
endif
@@ -540,7 +546,8 @@
ifneq ($(strip $(objc_objects)),)
$(objc_objects): $(intermediates)/%.o: $(TOPDIR)$(LOCAL_PATH)/%.m $(yacc_cpps) $(proto_generated_headers) \
- $(my_compiler_dependencies) $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(LOCAL_ADDITIONAL_DEPENDENCIES) \
+ | $(my_compiler_dependencies)
$(transform-$(PRIVATE_HOST)m-to-o)
-include $(objc_objects:%.o=%.P)
endif
@@ -554,7 +561,8 @@
ifneq ($(strip $(asm_objects_S)),)
$(asm_objects_S): $(intermediates)/%.o: $(TOPDIR)$(LOCAL_PATH)/%.S \
- $(my_compiler_dependencies) $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(LOCAL_ADDITIONAL_DEPENDENCIES) \
+ | $(my_compiler_dependencies)
$(transform-$(PRIVATE_HOST)s-to-o)
-include $(asm_objects_S:%.o=%.P)
endif
@@ -564,7 +572,8 @@
ifneq ($(strip $(asm_objects_s)),)
$(asm_objects_s): $(intermediates)/%.o: $(TOPDIR)$(LOCAL_PATH)/%.s \
- $(my_compiler_dependencies) $(LOCAL_ADDITIONAL_DEPENDENCIES)
+ $(LOCAL_ADDITIONAL_DEPENDENCIES) \
+ | $(my_compiler_dependencies)
$(transform-$(PRIVATE_HOST)s-to-o-no-deps)
-include $(asm_objects_s:%.o=%.P)
endif