1 # compiler-rt Library Info
3 # This should be included once the subdirectory information has been loaded, and
4 # uses the utilities in 'util.mk'.
6 # This defines the following variables describing compiler-rt:
7 # AvailableFunctions - The entire list of function names (unmangled) the
9 # CommonFunctions - The list of generic functions available.
10 # ArchFunctions.<arch> - The list of functions commonly available for
11 # 'arch'. This does not include any config specific
14 # AvailableIn.<function> - The list of subdir keys where 'function' is
17 # Determine the set of available modules.
18 AvailableModules
:= $(sort $(foreach key
,$(SubDirKeys
),\
19 $($(key
).ModuleName
)))
21 # Build a per-module map of subdir keys.
22 $(foreach key
,$(SubDirKeys
),\
23 $(call Append
,ModuleSubDirKeys.
$($(key
).ModuleName
),$(key
)))
25 AvailableArchs
:= $(sort $(foreach key
,$(SubDirKeys
),\
28 AvailableFunctions
:= $(sort $(foreach key
,$(SubDirKeys
),\
29 $(basename $($(key
).ObjNames
))))
31 CommonFunctions
:= $(sort\
32 $(foreach key
,$(ModuleSubDirKeys.builtins
),\
33 $(if
$(call strneq
,,$(strip $($(key
).OnlyArchs
) $($(key
).OnlyConfigs
))),,\
34 $(basename $($(key
).ObjNames
)))))
36 # Compute common arch functions.
37 $(foreach key
,$(ModuleSubDirKeys.builtins
),\
38 $(if
$(call strneq
,,$($(key
).OnlyConfigs
)),,\
39 $(foreach arch
,$($(key
).OnlyArchs
),\
40 $(call Append
,ArchFunctions.
$(arch
),$(sort \
41 $(basename $($(key
).ObjNames
)))))))
43 # Compute arch only functions.
44 $(foreach arch
,$(AvailableArchs
),\
45 $(call Set
,ArchFunctions.
$(arch
),$(sort $(ArchFunctions.
$(arch
))))\
46 $(call Set
,ArchOnlyFunctions.
$(arch
),\
47 $(call set_difference
,$(ArchFunctions.
$(arch
)),$(CommonFunctions
))))
49 # Compute lists of where each function is available.
50 $(foreach key
,$(SubDirKeys
),\
51 $(foreach fn
,$(basename $($(key
).ObjNames
)),\
52 $(call Append
,AvailableIn.
$(fn
),$(key
))))
54 # The names of all the available options.
55 AvailableOptions
:= AR ARFLAGS \
56 CC CFLAGS LDFLAGS FUNCTIONS OPTIMIZED \
58 VISIBILITY_HIDDEN KERNEL_USE \
59 SHARED_LIBRARY SHARED_LIBRARY_SUFFIX STRIP LIPO DSYMUTIL