From 060741e77dc5f3c64ee237b065272db41ebd8a32 Mon Sep 17 00:00:00 2001 From: Pirama Arumuga Nainar Date: Wed, 27 Jun 2018 10:35:42 -0700 Subject: [PATCH] Use $(my_prefix)OS instead of HOST_CROSS_OS The latter is not module-specific and affects all host modules. Also remove the check for LOCAL_IS_HOST_MODULE and use $(my_prefix)OS. This should be future-proof, where may use different configurations of cross-compilations across Linux, Darwin, Windows. Test: m native Change-Id: I0a6255a8b83960ffb543b593d4a50d963be1de88 --- core/use_lld_setup.mk | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/core/use_lld_setup.mk b/core/use_lld_setup.mk index b0386d53b..5f0f4123b 100644 --- a/core/use_lld_setup.mk +++ b/core/use_lld_setup.mk @@ -18,14 +18,12 @@ else endif endif -ifeq ($(LOCAL_IS_HOST_MODULE),true) - # Do not use LLD for Darwin host executables or shared libraries. See - # https://lld.llvm.org/AtomLLD.html for status of lld for Mach-O. - ifeq ($(HOST_OS),darwin) - my_use_clang_lld := false - endif - # http://b/110800681 - lld cannot link Android's Windows modules yet. - ifeq ($(HOST_CROSS_OS),windows) - my_use_clang_lld := false - endif +# Do not use LLD for Darwin host executables or shared libraries. See +# https://lld.llvm.org/AtomLLD.html for status of lld for Mach-O. +ifeq ($($(my_prefix)OS),darwin) +my_use_clang_lld := false +endif +# http://b/110800681 - lld cannot link Android's Windows modules yet. +ifeq ($($(my_prefix)OS),windows) +my_use_clang_lld := false endif