• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# compiler-rt Library Info
2#
3# This should be included once the subdirectory information has been loaded, and
4# uses the utilities in 'util.mk'.
5#
6# This defines the following variables describing compiler-rt:
7#   AvailableFunctions   - The entire list of function names (unmangled) the
8#                          library can provide.
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
12#                          functions.
13#
14#   AvailableIn.<function> - The list of subdir keys where 'function' is
15#                            defined.
16
17# Determine the set of available modules.
18AvailableModules := $(sort $(foreach key,$(SubDirKeys),\
19	$($(key).ModuleName)))
20
21# Build a per-module map of subdir keys.
22$(foreach key,$(SubDirKeys),\
23	$(call Append,ModuleSubDirKeys.$($(key).ModuleName),$(key)))
24
25AvailableArchs := $(sort $(foreach key,$(SubDirKeys),\
26	$($(key).OnlyArchs)))
27
28AvailableFunctions := $(sort $(foreach key,$(SubDirKeys),\
29	$(basename $($(key).ObjNames))))
30
31CommonFunctions := $(sort\
32  $(foreach key,$(ModuleSubDirKeys.builtins),\
33    $(if $(call strneq,,$(strip $($(key).OnlyArchs) $($(key).OnlyConfigs))),,\
34         $(basename $($(key).ObjNames)))))
35
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)))))))
42
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))))
48
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))))
53
54# The names of all the available options.
55AvailableOptions := AR ARFLAGS \
56                    CC CFLAGS LDFLAGS FUNCTIONS OPTIMIZED \
57                    RANLIB RANLIBFLAGS \
58                    VISIBILITY_HIDDEN KERNEL_USE \
59                    SHARED_LIBRARY SHARED_LIBRARY_SUFFIX STRIP LIPO DSYMUTIL
60