diff --git a/core/binary.mk b/core/binary.mk index d2fed70a32..862aa8c6ee 100644 --- a/core/binary.mk +++ b/core/binary.mk @@ -38,6 +38,7 @@ my_static_libraries := $(LOCAL_STATIC_LIBRARIES) my_whole_static_libraries := $(LOCAL_WHOLE_STATIC_LIBRARIES) my_shared_libraries := $(LOCAL_SHARED_LIBRARIES) my_cflags := $(LOCAL_CFLAGS) +my_conlyflags := $(LOCAL_CONLYFLAGS) my_cppflags := $(LOCAL_CPPFLAGS) my_ldflags := $(LOCAL_LDFLAGS) my_ldlibs := $(LOCAL_LDLIBS) @@ -272,10 +273,12 @@ endif # LOCAL_SDK_VERSION ifeq ($(my_clang),true) my_target_global_cflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_TARGET_GLOBAL_CFLAGS) +my_target_global_conlyflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_TARGET_GLOBAL_CONLYFLAGS) my_target_global_cppflags += $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_TARGET_GLOBAL_CPPFLAGS) my_target_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_TARGET_GLOBAL_LDFLAGS) else my_target_global_cflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_GLOBAL_CFLAGS) +my_target_global_conlyflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_GLOBAL_CONLYFLAGS) my_target_global_cppflags += $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_GLOBAL_CPPFLAGS) my_target_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)TARGET_GLOBAL_LDFLAGS) endif # my_clang @@ -310,6 +313,7 @@ endif $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_PROJECT_INCLUDES := $(my_target_project_includes) $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_C_INCLUDES := $(my_target_c_includes) $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_GLOBAL_CFLAGS := $(my_target_global_cflags) +$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_GLOBAL_CONLYFLAGS := $(my_target_global_conlyflags) $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_GLOBAL_CPPFLAGS := $(my_target_global_cppflags) $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_TARGET_GLOBAL_LDFLAGS := $(my_target_global_ldflags) @@ -317,11 +321,13 @@ else # LOCAL_IS_HOST_MODULE ifeq ($(my_clang),true) my_host_global_cflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_HOST_GLOBAL_CFLAGS) +my_host_global_conlyflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_HOST_GLOBAL_CONLYFLAGS) my_host_global_cppflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_HOST_GLOBAL_CPPFLAGS) my_host_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_HOST_GLOBAL_LDFLAGS) my_host_c_includes := $($(LOCAL_2ND_ARCH_VAR_PREFIX)HOST_C_INCLUDES) else my_host_global_cflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)HOST_GLOBAL_CFLAGS) +my_host_global_conlyflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)HOST_GLOBAL_CONLYFLAGS) my_host_global_cppflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)HOST_GLOBAL_CPPFLAGS) my_host_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)HOST_GLOBAL_LDFLAGS) my_host_c_includes := $($(LOCAL_2ND_ARCH_VAR_PREFIX)HOST_C_INCLUDES) @@ -329,6 +335,7 @@ endif # my_clang $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_HOST_C_INCLUDES := $(my_host_c_includes) $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_HOST_GLOBAL_CFLAGS := $(my_host_global_cflags) +$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_HOST_GLOBAL_CONLYFLAGS := $(my_host_global_conlyflags) $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_HOST_GLOBAL_CPPFLAGS := $(my_host_global_cppflags) $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_HOST_GLOBAL_LDFLAGS := $(my_host_global_ldflags) endif # LOCAL_IS_HOST_MODULE @@ -984,10 +991,12 @@ endif ifeq ($(my_clang),true) my_cflags += $(LOCAL_CLANG_CFLAGS) +my_conlyflags += $(LOCAL_CLANG_CONLYFLAGS) my_cppflags += $(LOCAL_CLANG_CPPFLAGS) my_asflags += $(LOCAL_CLANG_ASFLAGS) my_ldflags += $(LOCAL_CLANG_LDFLAGS) my_cflags += $(LOCAL_CLANG_CFLAGS_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) $(LOCAL_CLANG_CFLAGS_$(my_32_64_bit_suffix)) +my_conlyflags += $(LOCAL_CLANG_CONLYFLAGS_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) $(LOCAL_CLANG_CONLYFLAGS_$(my_32_64_bit_suffix)) my_cppflags += $(LOCAL_CLANG_CPPFLAGS_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) $(LOCAL_CLANG_CPPFLAGS_$(my_32_64_bit_suffix)) my_ldflags += $(LOCAL_CLANG_LDFLAGS_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) $(LOCAL_CLANG_LDFLAGS_$(my_32_64_bit_suffix)) my_asflags += $(LOCAL_CLANG_ASFLAGS_$($(my_prefix)$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)) $(LOCAL_CLANG_ASFLAGS_$(my_32_64_bit_suffix)) @@ -999,7 +1008,7 @@ endif $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_YACCFLAGS := $(LOCAL_YACCFLAGS) $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_ASFLAGS := $(my_asflags) -$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CONLYFLAGS := $(LOCAL_CONLYFLAGS) +$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CONLYFLAGS := $(my_conlyflags) $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CFLAGS := $(my_cflags) $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CPPFLAGS := $(my_cppflags) $(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_RTTI_FLAG := $(LOCAL_RTTI_FLAG) diff --git a/core/clang/HOST_x86.mk b/core/clang/HOST_x86.mk index fb5cbf4cbf..35cfe60ded 100644 --- a/core/clang/HOST_x86.mk +++ b/core/clang/HOST_x86.mk @@ -34,6 +34,12 @@ CLANG_CONFIG_x86_HOST_EXTRA_CFLAGS := \ $(CLANG_CONFIG_x86_HOST_COMBO_EXTRA_CFLAGS) \ $(CLANG_CONFIG_x86_HOST_EXTRA_ASFLAGS) +CLANG_CONFIG_x86_HOST_EXTRA_CONLYFLAGS := \ + $(CLANG_CONFIG_EXTRA_CONLYFLAGS) \ + $(CLANG_CONFIG_HOST_EXTRA_CONLYFLAGS) \ + $(CLANG_CONFIG_x86_EXTRA_CONLYFLAGS) \ + $(CLANG_CONFIG_x86_HOST_COMBO_EXTRA_CONLYFLAGS) + CLANG_CONFIG_x86_HOST_EXTRA_CPPFLAGS := \ $(CLANG_CONFIG_EXTRA_CPPFLAGS) \ $(CLANG_CONFIG_HOST_EXTRA_CPPFLAGS) \ @@ -59,6 +65,10 @@ $(clang_2nd_arch_prefix)CLANG_HOST_GLOBAL_CFLAGS := \ $(call $(clang_2nd_arch_prefix)convert-to-host-clang-flags,$($(clang_2nd_arch_prefix)HOST_GLOBAL_CFLAGS)) \ $(CLANG_CONFIG_x86_HOST_EXTRA_CFLAGS) +$(clang_2nd_arch_prefix)CLANG_HOST_GLOBAL_CONLYFLAGS := \ + $(call $(clang_2nd_arch_prefix)convert-to-host-clang-flags,$($(clang_2nd_arch_prefix)HOST_GLOBAL_CONLYFLAGS)) \ + $(CLANG_CONFIG_x86_HOST_EXTRA_CONLYFLAGS) + $(clang_2nd_arch_prefix)CLANG_HOST_GLOBAL_CPPFLAGS := \ $(call $(clang_2nd_arch_prefix)convert-to-host-clang-flags,$($(clang_2nd_arch_prefix)HOST_GLOBAL_CPPFLAGS)) \ $(CLANG_CONFIG_x86_HOST_EXTRA_CPPFLAGS) diff --git a/core/clang/HOST_x86_64.mk b/core/clang/HOST_x86_64.mk index 5f70678af4..c546715e92 100644 --- a/core/clang/HOST_x86_64.mk +++ b/core/clang/HOST_x86_64.mk @@ -34,6 +34,12 @@ CLANG_CONFIG_x86_64_HOST_EXTRA_CFLAGS := \ $(CLANG_CONFIG_x86_64_HOST_COMBO_EXTRA_CFLAGS) \ $(CLANG_CONFIG_x86_64_HOST_EXTRA_ASFLAGS) +CLANG_CONFIG_x86_64_HOST_EXTRA_CONLYFLAGS := \ + $(CLANG_CONFIG_EXTRA_CONLYFLAGS) \ + $(CLANG_CONFIG_HOST_EXTRA_CONLYFLAGS) \ + $(CLANG_CONFIG_x86_64_EXTRA_CONLYFLAGS) \ + $(CLANG_CONFIG_x86_64_HOST_COMBO_EXTRA_CONLYFLAGS) + CLANG_CONFIG_x86_64_HOST_EXTRA_CPPFLAGS := \ $(CLANG_CONFIG_EXTRA_CPPFLAGS) \ $(CLANG_CONFIG_HOST_EXTRA_CPPFLAGS) \ @@ -59,6 +65,10 @@ CLANG_HOST_GLOBAL_CFLAGS := \ $(call convert-to-host-clang-flags,$(HOST_GLOBAL_CFLAGS)) \ $(CLANG_CONFIG_x86_64_HOST_EXTRA_CFLAGS) +CLANG_HOST_GLOBAL_CONLYFLAGS := \ + $(call convert-to-host-clang-flags,$(HOST_GLOBAL_CONLYFLAGS)) \ + $(CLANG_CONFIG_x86_64_HOST_EXTRA_CONLYFLAGS) + CLANG_HOST_GLOBAL_CPPFLAGS := \ $(call convert-to-host-clang-flags,$(HOST_GLOBAL_CPPFLAGS)) \ $(CLANG_CONFIG_x86_64_HOST_EXTRA_CPPFLAGS) diff --git a/core/clang/TARGET_arm.mk b/core/clang/TARGET_arm.mk index 59ed41f98e..1f6117c322 100644 --- a/core/clang/TARGET_arm.mk +++ b/core/clang/TARGET_arm.mk @@ -19,6 +19,11 @@ CLANG_CONFIG_arm_TARGET_EXTRA_CFLAGS := \ -target $(CLANG_CONFIG_arm_TARGET_TRIPLE) \ $(CLANG_CONFIG_arm_TARGET_EXTRA_ASFLAGS) +CLANG_CONFIG_arm_TARGET_EXTRA_CONLYFLAGS := \ + $(CLANG_CONFIG_EXTRA_CONLYFLAGS) \ + $(CLANG_CONFIG_TARGET_EXTRA_CONLYFLAGS) \ + $(CLANG_CONFIG_arm_EXTRA_CONLYFLAGS) + CLANG_CONFIG_arm_TARGET_EXTRA_CPPFLAGS := \ $(CLANG_CONFIG_EXTRA_CPPFLAGS) \ $(CLANG_CONFIG_TARGET_EXTRA_CPPFLAGS) \ @@ -44,6 +49,10 @@ $(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CFLAGS := \ $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS)) \ $(CLANG_CONFIG_arm_TARGET_EXTRA_CFLAGS) +$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CONLYFLAGS := \ + $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CONLYFLAGS)) \ + $(CLANG_CONFIG_arm_TARGET_EXTRA_CONLYFLAGS) + $(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CPPFLAGS := \ $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CPPFLAGS)) \ $(CLANG_CONFIG_arm_TARGET_EXTRA_CPPFLAGS) diff --git a/core/clang/TARGET_arm64.mk b/core/clang/TARGET_arm64.mk index 6f9e5406ab..ba6e5f1fae 100644 --- a/core/clang/TARGET_arm64.mk +++ b/core/clang/TARGET_arm64.mk @@ -18,6 +18,11 @@ CLANG_CONFIG_arm64_TARGET_EXTRA_CFLAGS := \ $(CLANG_CONFIG_arm64_EXTRA_CFLAGS) \ $(CLANG_CONFIG_arm64_TARGET_EXTRA_ASFLAGS) +CLANG_CONFIG_arm64_TARGET_EXTRA_CONLYFLAGS := \ + $(CLANG_CONFIG_EXTRA_CONLYFLAGS) \ + $(CLANG_CONFIG_TARGET_EXTRA_CONLYFLAGS) \ + $(CLANG_CONFIG_arm64_EXTRA_CONLYFLAGS) + CLANG_CONFIG_arm64_TARGET_EXTRA_CPPFLAGS := \ $(CLANG_CONFIG_EXTRA_CPPFLAGS) \ $(CLANG_CONFIG_TARGET_EXTRA_CPPFLAGS) \ @@ -42,6 +47,10 @@ CLANG_TARGET_GLOBAL_CFLAGS := \ $(call convert-to-clang-flags,$(TARGET_GLOBAL_CFLAGS)) \ $(CLANG_CONFIG_arm64_TARGET_EXTRA_CFLAGS) +CLANG_TARGET_GLOBAL_CONLYFLAGS := \ + $(call convert-to-clang-flags,$(TARGET_GLOBAL_CONLYFLAGS)) \ + $(CLANG_CONFIG_arm64_TARGET_EXTRA_CONLYFLAGS) + CLANG_TARGET_GLOBAL_CPPFLAGS := \ $(call convert-to-clang-flags,$(TARGET_GLOBAL_CPPFLAGS)) \ $(CLANG_CONFIG_arm64_TARGET_EXTRA_CPPFLAGS) diff --git a/core/clang/TARGET_mips.mk b/core/clang/TARGET_mips.mk index b7e40e3906..2360181751 100644 --- a/core/clang/TARGET_mips.mk +++ b/core/clang/TARGET_mips.mk @@ -19,6 +19,11 @@ CLANG_CONFIG_mips_TARGET_EXTRA_CFLAGS := \ $(CLANG_CONFIG_mips_EXTRA_CFLAGS) \ $(CLANG_CONFIG_mips_TARGET_EXTRA_ASFLAGS) +CLANG_CONFIG_mips_TARGET_EXTRA_CONLYFLAGS := \ + $(CLANG_CONFIG_EXTRA_CONLYFLAGS) \ + $(CLANG_CONFIG_TARGET_EXTRA_CONLYFLAGS) \ + $(CLANG_CONFIG_mips_EXTRA_CONLYFLAGS) + CLANG_CONFIG_mips_TARGET_EXTRA_CPPFLAGS := \ $(CLANG_CONFIG_EXTRA_CPPFLAGS) \ $(CLANG_CONFIG_TARGET_EXTRA_CPPFLAGS) \ @@ -43,6 +48,10 @@ $(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CFLAGS := \ $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS)) \ $(CLANG_CONFIG_mips_TARGET_EXTRA_CFLAGS) +$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CONLYFLAGS := \ + $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CONLYFLAGS)) \ + $(CLANG_CONFIG_mips_TARGET_EXTRA_CONLYFLAGS) + $(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CPPFLAGS := \ $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CPPFLAGS)) \ $(CLANG_CONFIG_mips_TARGET_EXTRA_CPPFLAGS) diff --git a/core/clang/TARGET_mips64.mk b/core/clang/TARGET_mips64.mk index ab69aedab1..742be4be22 100644 --- a/core/clang/TARGET_mips64.mk +++ b/core/clang/TARGET_mips64.mk @@ -18,6 +18,11 @@ CLANG_CONFIG_mips64_TARGET_EXTRA_CFLAGS := \ $(CLANG_CONFIG_mips64_EXTRA_CFLAGS) \ $(CLANG_CONFIG_mips64_TARGET_EXTRA_ASFLAGS) +CLANG_CONFIG_mips64_TARGET_EXTRA_CONLYFLAGS := \ + $(CLANG_CONFIG_EXTRA_CONLYFLAGS) \ + $(CLANG_CONFIG_TARGET_EXTRA_CONLYFLAGS) \ + $(CLANG_CONFIG_mips64_EXTRA_CONLYFLAGS) + CLANG_CONFIG_mips64_TARGET_EXTRA_CPPFLAGS := \ $(CLANG_CONFIG_EXTRA_CPPFLAGS) \ $(CLANG_CONFIG_TARGET_EXTRA_CPPFLAGS) \ @@ -42,6 +47,10 @@ CLANG_TARGET_GLOBAL_CFLAGS := \ $(call convert-to-clang-flags,$(TARGET_GLOBAL_CFLAGS)) \ $(CLANG_CONFIG_mips64_TARGET_EXTRA_CFLAGS) +CLANG_TARGET_GLOBAL_CONLYFLAGS := \ + $(call convert-to-clang-flags,$(TARGET_GLOBAL_CONLYFLAGS)) \ + $(CLANG_CONFIG_mips64_TARGET_EXTRA_CONLYFLAGS) + CLANG_TARGET_GLOBAL_CPPFLAGS := \ $(call convert-to-clang-flags,$(TARGET_GLOBAL_CPPFLAGS)) \ $(CLANG_CONFIG_mips64_TARGET_EXTRA_CPPFLAGS) diff --git a/core/clang/TARGET_x86.mk b/core/clang/TARGET_x86.mk index 60ee06fdaa..507b4e45fc 100644 --- a/core/clang/TARGET_x86.mk +++ b/core/clang/TARGET_x86.mk @@ -20,6 +20,11 @@ CLANG_CONFIG_x86_TARGET_EXTRA_CFLAGS := \ $(CLANG_CONFIG_x86_EXTRA_CFLAGS) \ $(CLANG_CONFIG_x86_TARGET_EXTRA_ASFLAGS) +CLANG_CONFIG_x86_TARGET_EXTRA_CONLYFLAGS := \ + $(CLANG_CONFIG_EXTRA_CONLYFLAGS) \ + $(CLANG_CONFIG_TARGET_EXTRA_CONLYFLAGS) \ + $(CLANG_CONFIG_x86_EXTRA_CONLYFLAGS) + CLANG_CONFIG_x86_TARGET_EXTRA_CPPFLAGS := \ $(CLANG_CONFIG_EXTRA_CPPFLAGS) \ $(CLANG_CONFIG_TARGET_EXTRA_CPPFLAGS) \ @@ -44,6 +49,10 @@ $(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CFLAGS := \ $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS)) \ $(CLANG_CONFIG_x86_TARGET_EXTRA_CFLAGS) +$(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CONLYFLAGS := \ + $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CONLYFLAGS)) \ + $(CLANG_CONFIG_x86_TARGET_EXTRA_CONLYFLAGS) + $(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_CPPFLAGS := \ $(call $(clang_2nd_arch_prefix)convert-to-clang-flags,$($(clang_2nd_arch_prefix)TARGET_GLOBAL_CPPFLAGS)) \ $(CLANG_CONFIG_x86_TARGET_EXTRA_CPPFLAGS) diff --git a/core/clang/TARGET_x86_64.mk b/core/clang/TARGET_x86_64.mk index 5561e42490..9f8e8b062a 100644 --- a/core/clang/TARGET_x86_64.mk +++ b/core/clang/TARGET_x86_64.mk @@ -18,6 +18,11 @@ CLANG_CONFIG_x86_64_TARGET_EXTRA_CFLAGS := \ $(CLANG_CONFIG_x86_64_EXTRA_CFLAGS) \ $(CLANG_CONFIG_x86_64_TARGET_EXTRA_ASFLAGS) +CLANG_CONFIG_x86_64_TARGET_EXTRA_CONLYFLAGS := \ + $(CLANG_CONFIG_EXTRA_CONLYFLAGS) \ + $(CLANG_CONFIG_TARGET_EXTRA_CONLYFLAGS) \ + $(CLANG_CONFIG_x86_64_EXTRA_CONLYFLAGS) + CLANG_CONFIG_x86_64_TARGET_EXTRA_CPPFLAGS := \ $(CLANG_CONFIG_EXTRA_CPPFLAGS) \ $(CLANG_CONFIG_TARGET_EXTRA_CPPFLAGS) \ @@ -42,6 +47,10 @@ CLANG_TARGET_GLOBAL_CFLAGS := \ $(call convert-to-clang-flags,$(TARGET_GLOBAL_CFLAGS)) \ $(CLANG_CONFIG_x86_64_TARGET_EXTRA_CFLAGS) +CLANG_TARGET_GLOBAL_CONLYFLAGS := \ + $(call convert-to-clang-flags,$(TARGET_GLOBAL_CONLYFLAGS)) \ + $(CLANG_CONFIG_x86_64_TARGET_EXTRA_CONLYFLAGS) + CLANG_TARGET_GLOBAL_CPPFLAGS := \ $(call convert-to-clang-flags,$(TARGET_GLOBAL_CPPFLAGS)) \ $(CLANG_CONFIG_x86_64_TARGET_EXTRA_CPPFLAGS) diff --git a/core/clang/config.mk b/core/clang/config.mk index b102afca37..d5b4e7a82c 100644 --- a/core/clang/config.mk +++ b/core/clang/config.mk @@ -32,6 +32,7 @@ endif # Clang flags for all host or target rules CLANG_CONFIG_EXTRA_ASFLAGS := CLANG_CONFIG_EXTRA_CFLAGS := +CLANG_CONFIG_EXTRA_CONLYFLAGS := CLANG_CONFIG_EXTRA_CPPFLAGS := CLANG_CONFIG_EXTRA_LDFLAGS := diff --git a/core/clear_vars.mk b/core/clear_vars.mk index 8ee7734ca3..9f339ffb65 100644 --- a/core/clear_vars.mk +++ b/core/clear_vars.mk @@ -48,6 +48,7 @@ LOCAL_CFLAGS:= LOCAL_CPPFLAGS:= LOCAL_CLANG_ASFLAGS:= LOCAL_CLANG_CFLAGS:= +LOCAL_CLANG_CONLYFLAGS:= LOCAL_CLANG_CPPFLAGS:= LOCAL_CONLYFLAGS:= LOCAL_RTTI_FLAG:= diff --git a/core/definitions.mk b/core/definitions.mk index 506467f021..935050d9dd 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -1013,6 +1013,7 @@ $(hide) $(PRIVATE_CC) \ -c \ $(if $(PRIVATE_NO_DEFAULT_COMPILER_FLAGS),, \ $(PRIVATE_TARGET_GLOBAL_CFLAGS) \ + $(PRIVATE_TARGET_GLOBAL_CONLYFLAGS) \ $(PRIVATE_ARM_CFLAGS) \ ) \ $(1) \ @@ -1111,6 +1112,7 @@ $(hide) $(PRIVATE_CC) \ -c \ $(if $(PRIVATE_NO_DEFAULT_COMPILER_FLAGS),, \ $(PRIVATE_HOST_GLOBAL_CFLAGS) \ + $(PRIVATE_HOST_GLOBAL_CONLYFLAGS) \ ) \ $(1) \ -MD -MF $(patsubst %.o,%.d,$@) -o $@ $<