lib_info.mk revision 6a571fb3c515c5ea53308ba0eda750e8dd76ef6b
178cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar# compiler-rt Library Info 278cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar# 378cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar# This should be included once the subdirectory information has been loaded, and 478cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar# uses the utilities in 'util.mk'. 578cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar# 678cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar# This defines the following variables describing compiler-rt: 778cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar# AvailableFunctions - The entire list of function names (unmangled) the 878cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar# library can provide. 978cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar# CommonFunctions - The list of generic functions available. 1078cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar# ArchFunctions.<arch> - The list of functions commonly available for 1178cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar# 'arch'. This does not include any config specific 1278cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar# functions. 1378cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar# 1478cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar# AvailableIn.<function> - The list of subdir keys where 'function' is 1578cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar# defined. 1678cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar 1778cfbc57c62949e16fa7b4a69775aa6450343a00Daniel DunbarAvailableArchs := $(sort $(foreach key,$(SubDirKeys),\ 1878cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar $($(key).OnlyArchs))) 1978cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar 2078cfbc57c62949e16fa7b4a69775aa6450343a00Daniel DunbarAvailableFunctions := $(sort $(foreach key,$(SubDirKeys),\ 2178cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar $(basename $($(key).ObjNames)))) 2278cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar 2378cfbc57c62949e16fa7b4a69775aa6450343a00Daniel DunbarCommonFunctions := $(sort\ 2478cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar $(foreach key,$(SubDirKeys),\ 2578cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar $(if $(call strneq,,$(strip $($(key).OnlyArchs) $($(key).OnlyConfigs))),,\ 2678cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar $(basename $($(key).ObjNames))))) 2778cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar 2878cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar# Compute common arch functions. 2978cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar$(foreach key,$(SubDirKeys),\ 3078cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar $(if $(call strneq,,$($(key).OnlyConfigs)),,\ 3178cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar $(foreach arch,$($(key).OnlyArchs),\ 3278cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar $(call Append,ArchFunctions.$(arch),$(sort \ 3378cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar $(basename $($(key).ObjNames))))))) 3478cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar 3578cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar# Compute arch only functions. 3678cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar$(foreach arch,$(AvailableArchs),\ 3778cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar $(call Set,ArchFunctions.$(arch),$(sort $(ArchFunctions.$(arch))))\ 3878cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar $(call Set,ArchOnlyFunctions.$(arch),\ 3978cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar $(call set_difference,$(ArchFunctions.$(arch)),$(CommonFunctions)))) 4078cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar 4178cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar# Compute lists of where each function is available. 4278cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar$(foreach key,$(SubDirKeys),\ 4378cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar $(foreach fn,$(basename $($(key).ObjNames)),\ 4478cfbc57c62949e16fa7b4a69775aa6450343a00Daniel Dunbar $(call Append,AvailableIn.$(fn),$(key)))) 4548464e0ee1c2de5bcbf0d609348f55d0c301085dDaniel Dunbar 4648464e0ee1c2de5bcbf0d609348f55d0c301085dDaniel Dunbar# The names of all the available options. 4748464e0ee1c2de5bcbf0d609348f55d0c301085dDaniel DunbarAvailableOptions := AR ARFLAGS \ 4848464e0ee1c2de5bcbf0d609348f55d0c301085dDaniel Dunbar CC CFLAGS FUNCTIONS OPTIMIZED \ 496a571fb3c515c5ea53308ba0eda750e8dd76ef6bDaniel Dunbar RANLIB RANLIBFLAGS \ 506a571fb3c515c5ea53308ba0eda750e8dd76ef6bDaniel Dunbar VISIBILITY_HIDDEN 51