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
This commit is contained in:
Ying Wang 2013-02-20 13:34:05 -08:00
parent b9a4e1eeea
commit 9c3aa053f5
2 changed files with 23 additions and 14 deletions

View file

@ -437,8 +437,9 @@ cpp_objects := $(cpp_arm_objects) $(cpp_normal_objects)
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_MODE := $(normal_objects_mode)
$(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 @@ gen_S_objects := $(gen_S_sources:%.S=%.o)
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 @@ gen_s_objects := $(gen_s_sources:%.s=%.o)
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 @@ c_objects := $(c_arm_objects) $(c_normal_objects)
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 @@ ifneq ($(strip $(gen_c_objects)),)
$(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 @@ objc_objects := $(addprefix $(intermediates)/,$(objc_sources:.m=.o))
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 @@ asm_objects_S := $(addprefix $(intermediates)/,$(asm_sources_S:.S=.o))
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 @@ asm_objects_s := $(addprefix $(intermediates)/,$(asm_sources_s:.s=.o))
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

View file

@ -224,9 +224,9 @@ rs_support_lib := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/libRSSupport.so
rs_jni_lib := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/librsjni.so
LOCAL_JNI_SHARED_LIBRARIES += libRSSupport librsjni
$(rs_compatibility_jni_libs): $(RenderScript_file_stamp)
$(rs_compatibility_jni_libs): $(BCC_COMPAT) $(rs_built_clcore)
$(rs_compatibility_jni_libs): $(rs_support_lib) $(rs_jni_lib) $(rs_compiler_rt)
$(rs_compatibility_jni_libs): $(RenderScript_file_stamp) $(rs_built_clcore) \
$(rs_support_lib) $(rs_jni_lib) $(rs_compiler_rt)
$(rs_compatibility_jni_libs): | $(BCC_COMPAT)
$(rs_compatibility_jni_libs): PRIVATE_CXX := $(TARGET_CXX)
$(rs_compatibility_jni_libs): PRIVATE_LIBCLCORE := $(rs_built_clcore)
$(rs_compatibility_jni_libs): PRIVATE_COMPILER_RT := $(rs_compiler_rt)