1#############################################################
2## Set up flags based on LOCAL_USE_CLANG_LLD.
3## Input variables: LOCAL_USE_CLANG_LLD
4## Output variables: my_use_clang_lld
5#############################################################
6
7# Use LLD by default.
8# Do not use LLD if LOCAL_USE_CLANG_LLD is false or 0
9my_use_clang_lld := true
10ifneq (,$(LOCAL_USE_CLANG_LLD))
11  ifneq (,$(filter 0 false,$(LOCAL_USE_CLANG_LLD)))
12    my_use_clang_lld := false
13  endif
14endif
15
16# Do not use LLD for Darwin host executables or shared libraries.  See
17# https://lld.llvm.org/AtomLLD.html for status of lld for Mach-O.
18ifeq ($($(my_prefix)OS),darwin)
19my_use_clang_lld := false
20endif
21