2010-01-18 14:48:56 +08:00
|
|
|
# compiler-rt Library Info
|
|
|
|
#
|
|
|
|
# This should be included once the subdirectory information has been loaded, and
|
|
|
|
# uses the utilities in 'util.mk'.
|
|
|
|
#
|
|
|
|
# This defines the following variables describing compiler-rt:
|
|
|
|
# AvailableFunctions - The entire list of function names (unmangled) the
|
|
|
|
# library can provide.
|
|
|
|
# CommonFunctions - The list of generic functions available.
|
|
|
|
# ArchFunctions.<arch> - The list of functions commonly available for
|
|
|
|
# 'arch'. This does not include any config specific
|
|
|
|
# functions.
|
|
|
|
#
|
|
|
|
# AvailableIn.<function> - The list of subdir keys where 'function' is
|
|
|
|
# defined.
|
|
|
|
|
2011-12-02 10:42:07 +08:00
|
|
|
# Determine the set of available modules.
|
|
|
|
AvailableModules := $(sort $(foreach key,$(SubDirKeys),\
|
|
|
|
$($(key).ModuleName)))
|
|
|
|
|
|
|
|
# Build a per-module map of subdir keys.
|
|
|
|
$(foreach key,$(SubDirKeys),\
|
|
|
|
$(call Append,ModuleSubDirKeys.$($(key).ModuleName),$(key)))
|
|
|
|
|
2010-01-18 14:48:56 +08:00
|
|
|
AvailableArchs := $(sort $(foreach key,$(SubDirKeys),\
|
|
|
|
$($(key).OnlyArchs)))
|
|
|
|
|
|
|
|
AvailableFunctions := $(sort $(foreach key,$(SubDirKeys),\
|
|
|
|
$(basename $($(key).ObjNames))))
|
|
|
|
|
|
|
|
CommonFunctions := $(sort\
|
2011-12-02 10:42:07 +08:00
|
|
|
$(foreach key,$(ModuleSubDirKeys.builtins),\
|
2010-01-18 14:48:56 +08:00
|
|
|
$(if $(call strneq,,$(strip $($(key).OnlyArchs) $($(key).OnlyConfigs))),,\
|
|
|
|
$(basename $($(key).ObjNames)))))
|
|
|
|
|
|
|
|
# Compute common arch functions.
|
2011-12-02 10:42:07 +08:00
|
|
|
$(foreach key,$(ModuleSubDirKeys.builtins),\
|
2010-01-18 14:48:56 +08:00
|
|
|
$(if $(call strneq,,$($(key).OnlyConfigs)),,\
|
|
|
|
$(foreach arch,$($(key).OnlyArchs),\
|
|
|
|
$(call Append,ArchFunctions.$(arch),$(sort \
|
|
|
|
$(basename $($(key).ObjNames)))))))
|
|
|
|
|
|
|
|
# Compute arch only functions.
|
|
|
|
$(foreach arch,$(AvailableArchs),\
|
|
|
|
$(call Set,ArchFunctions.$(arch),$(sort $(ArchFunctions.$(arch))))\
|
|
|
|
$(call Set,ArchOnlyFunctions.$(arch),\
|
|
|
|
$(call set_difference,$(ArchFunctions.$(arch)),$(CommonFunctions))))
|
|
|
|
|
|
|
|
# Compute lists of where each function is available.
|
|
|
|
$(foreach key,$(SubDirKeys),\
|
|
|
|
$(foreach fn,$(basename $($(key).ObjNames)),\
|
|
|
|
$(call Append,AvailableIn.$(fn),$(key))))
|
2010-01-18 14:49:33 +08:00
|
|
|
|
|
|
|
# The names of all the available options.
|
|
|
|
AvailableOptions := AR ARFLAGS \
|
2012-09-08 03:57:23 +08:00
|
|
|
CC CFLAGS LDFLAGS FUNCTIONS OPTIMIZED \
|
2010-01-19 06:19:34 +08:00
|
|
|
RANLIB RANLIBFLAGS \
|
2012-09-08 03:57:23 +08:00
|
|
|
VISIBILITY_HIDDEN KERNEL_USE \
|
2012-11-27 06:48:51 +08:00
|
|
|
SHARED_LIBRARY SHARED_LIBRARY_SUFFIX STRIP LIPO DSYMUTIL
|