2018-04-13 01:55:54 +08:00
|
|
|
#############################################################
|
|
|
|
## Set up flags based on USE_CLANG_LLD and LOCAL_USE_CLANG_LLD.
|
|
|
|
## Input variables: USE_CLANG_LLD,LOCAL_USE_CLANG_LLD.
|
|
|
|
## Output variables: my_use_clang_lld
|
|
|
|
#############################################################
|
|
|
|
|
2018-06-13 01:50:10 +08:00
|
|
|
# Use LLD by default.
|
|
|
|
# Do not use LLD if LOCAL_USE_CLANG_LLD is false or 0,
|
|
|
|
# of if LOCAL_USE_CLANG_LLD is not set and USE_CLANG_LLD is 0 or false.
|
|
|
|
my_use_clang_lld := true
|
|
|
|
ifneq (,$(LOCAL_USE_CLANG_LLD))
|
|
|
|
ifneq (,$(filter 0 false,$(LOCAL_USE_CLANG_LLD)))
|
|
|
|
my_use_clang_lld := false
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
ifneq (,$(filter 0 false,$(USE_CLANG_LLD)))
|
|
|
|
my_use_clang_lld := false
|
2018-04-13 01:55:54 +08:00
|
|
|
endif
|
|
|
|
endif
|
2018-04-24 07:20:10 +08:00
|
|
|
|
|
|
|
ifeq ($(LOCAL_IS_HOST_MODULE),true)
|
2018-06-26 07:02:08 +08:00
|
|
|
# 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.
|
2018-04-24 07:20:10 +08:00
|
|
|
ifeq ($(HOST_OS),darwin)
|
|
|
|
my_use_clang_lld := false
|
|
|
|
endif
|
2018-06-26 07:02:08 +08:00
|
|
|
# http://b/110800681 - lld cannot link Android's Windows modules yet.
|
|
|
|
ifeq ($(HOST_CROSS_OS),windows)
|
|
|
|
my_use_clang_lld := false
|
|
|
|
endif
|
2018-04-24 07:20:10 +08:00
|
|
|
endif
|