From 4955b857c48ff9603c8d4e95e0f2d24690d18eb9 Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Tue, 17 Apr 2018 14:15:14 -0700 Subject: [PATCH] When my_use_clang_lld, link with lld for host. When USE_CLANG_LLD is true, my_use_clang_lld is true, and *GLOBAL_LLDFLAGS will be used instead of *GLOBAL_LDFLAGS. Bug: 73768157 Test: make checkbuild Change-Id: I2598b72e9edde32f8e57df860571fd107c005540 --- core/binary.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/binary.mk b/core/binary.mk index a5f46daee..39f11611e 100644 --- a/core/binary.mk +++ b/core/binary.mk @@ -547,7 +547,11 @@ ifeq ($(my_clang),true) my_host_global_cflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CFLAGS) my_host_global_conlyflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CONLYFLAGS) $(my_c_std_conlyflags) my_host_global_cppflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_CPPFLAGS) $(my_cpp_std_cppflags) -my_host_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_LDFLAGS) +ifeq ($(my_use_clang_lld),true) + my_host_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_LLDFLAGS) +else + my_host_global_ldflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)CLANG_$(my_prefix)GLOBAL_LDFLAGS) +endif # my_use_clang_lld else my_host_global_cflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)GLOBAL_CFLAGS) my_host_global_conlyflags := $($(LOCAL_2ND_ARCH_VAR_PREFIX)$(my_prefix)GLOBAL_CONLYFLAGS) $(my_c_std_conlyflags)