Daniel Dunbar | 78cfbc5 | 2010-01-18 06:48:56 +0000 | [diff] [blame] | 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 | AvailableArchs := $(sort $(foreach key,$(SubDirKeys),\ |
| 18 | $($(key).OnlyArchs))) |
| 19 | |
| 20 | AvailableFunctions := $(sort $(foreach key,$(SubDirKeys),\ |
| 21 | $(basename $($(key).ObjNames)))) |
| 22 | |
| 23 | CommonFunctions := $(sort\ |
| 24 | $(foreach key,$(SubDirKeys),\ |
| 25 | $(if $(call strneq,,$(strip $($(key).OnlyArchs) $($(key).OnlyConfigs))),,\ |
| 26 | $(basename $($(key).ObjNames))))) |
| 27 | |
| 28 | # Compute common arch functions. |
| 29 | $(foreach key,$(SubDirKeys),\ |
| 30 | $(if $(call strneq,,$($(key).OnlyConfigs)),,\ |
| 31 | $(foreach arch,$($(key).OnlyArchs),\ |
| 32 | $(call Append,ArchFunctions.$(arch),$(sort \ |
| 33 | $(basename $($(key).ObjNames))))))) |
| 34 | |
| 35 | # Compute arch only functions. |
| 36 | $(foreach arch,$(AvailableArchs),\ |
| 37 | $(call Set,ArchFunctions.$(arch),$(sort $(ArchFunctions.$(arch))))\ |
| 38 | $(call Set,ArchOnlyFunctions.$(arch),\ |
| 39 | $(call set_difference,$(ArchFunctions.$(arch)),$(CommonFunctions)))) |
| 40 | |
| 41 | # Compute lists of where each function is available. |
| 42 | $(foreach key,$(SubDirKeys),\ |
| 43 | $(foreach fn,$(basename $($(key).ObjNames)),\ |
| 44 | $(call Append,AvailableIn.$(fn),$(key)))) |
Daniel Dunbar | 48464e0 | 2010-01-18 06:49:33 +0000 | [diff] [blame] | 45 | |
| 46 | # The names of all the available options. |
| 47 | AvailableOptions := AR ARFLAGS \ |
| 48 | CC CFLAGS FUNCTIONS OPTIMIZED \ |
Daniel Dunbar | 6a571fb | 2010-01-18 22:19:34 +0000 | [diff] [blame^] | 49 | RANLIB RANLIBFLAGS \ |
| 50 | VISIBILITY_HIDDEN |