blob: 2026f317ca973f7af2f07d173c0b0f9f212a9f30 [file] [log] [blame]
Chih-Hung Hsieh32427d62018-04-12 10:55:54 -07001#############################################################
Dan Willemsen2eea5992018-10-21 19:46:36 -07002## Set up flags based on LOCAL_USE_CLANG_LLD.
3## Input variables: LOCAL_USE_CLANG_LLD
Chih-Hung Hsieh32427d62018-04-12 10:55:54 -07004## Output variables: my_use_clang_lld
5#############################################################
6
Chih-Hung Hsieh4ad17372018-06-12 10:50:10 -07007# Use LLD by default.
Dan Willemsen2eea5992018-10-21 19:46:36 -07008# Do not use LLD if LOCAL_USE_CLANG_LLD is false or 0
Chih-Hung Hsieh4ad17372018-06-12 10:50:10 -07009my_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
Chih-Hung Hsieh32427d62018-04-12 10:55:54 -070014endif
Chih-Hung Hsieh3365ae72018-04-23 16:20:10 -070015
Pirama Arumuga Nainar060741e2018-06-27 10:35:42 -070016# 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# http://b/110800681 - lld cannot link Android's Windows modules yet.
22ifeq ($($(my_prefix)OS),windows)
23my_use_clang_lld := false
Chih-Hung Hsieh3365ae72018-04-23 16:20:10 -070024endif