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 | |
Daniel Dunbar | f06648a | 2011-12-02 02:42:07 +0000 | [diff] [blame] | 17 | # Determine the set of available modules. |
| 18 | AvailableModules := $(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 | |
Daniel Dunbar | 78cfbc5 | 2010-01-18 06:48:56 +0000 | [diff] [blame] | 25 | AvailableArchs := $(sort $(foreach key,$(SubDirKeys),\ |
| 26 | $($(key).OnlyArchs))) |
| 27 | |
| 28 | AvailableFunctions := $(sort $(foreach key,$(SubDirKeys),\ |
| 29 | $(basename $($(key).ObjNames)))) |
| 30 | |
| 31 | CommonFunctions := $(sort\ |
Daniel Dunbar | f06648a | 2011-12-02 02:42:07 +0000 | [diff] [blame] | 32 | $(foreach key,$(ModuleSubDirKeys.builtins),\ |
Daniel Dunbar | 78cfbc5 | 2010-01-18 06:48:56 +0000 | [diff] [blame] | 33 | $(if $(call strneq,,$(strip $($(key).OnlyArchs) $($(key).OnlyConfigs))),,\ |
| 34 | $(basename $($(key).ObjNames))))) |
| 35 | |
| 36 | # Compute common arch functions. |
Daniel Dunbar | f06648a | 2011-12-02 02:42:07 +0000 | [diff] [blame] | 37 | $(foreach key,$(ModuleSubDirKeys.builtins),\ |
Daniel Dunbar | 78cfbc5 | 2010-01-18 06:48:56 +0000 | [diff] [blame] | 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)))) |
Daniel Dunbar | 48464e0 | 2010-01-18 06:49:33 +0000 | [diff] [blame] | 53 | |
| 54 | # The names of all the available options. |
| 55 | AvailableOptions := AR ARFLAGS \ |
Daniel Dunbar | 8bc01cb | 2012-09-07 19:57:23 +0000 | [diff] [blame] | 56 | CC CFLAGS LDFLAGS FUNCTIONS OPTIMIZED \ |
Daniel Dunbar | 6a571fb | 2010-01-18 22:19:34 +0000 | [diff] [blame] | 57 | RANLIB RANLIBFLAGS \ |
Daniel Dunbar | 8bc01cb | 2012-09-07 19:57:23 +0000 | [diff] [blame] | 58 | VISIBILITY_HIDDEN KERNEL_USE \ |
Nick Kledzik | c0973d6 | 2012-11-26 22:48:51 +0000 | [diff] [blame] | 59 | SHARED_LIBRARY SHARED_LIBRARY_SUFFIX STRIP LIPO DSYMUTIL |