[llvm-commits] [compiler-rt] r145674 - in /compiler-rt/trunk: lib/Makefile.mk lib/arm/Makefile.mk lib/asan/Makefile.mk lib/asan/mach_override/Makefile.mk lib/asan/sysinfo/Makefile.mk lib/i386/Makefile.mk lib/ppc/Makefile.mk lib/profile/Makefile.mk lib/x86_64/Makefile.mk make/lib_info.mk make/subdir.mk
Daniel Dunbar
daniel at zuster.org
Thu Dec 1 18:42:08 PST 2011
Author: ddunbar
Date: Thu Dec 1 20:42:07 2011
New Revision: 145674
URL: http://llvm.org/viewvc/llvm-project?rev=145674&view=rev
Log:
build: Add ModuleName per-subdir variable as a way to organize the different
sets of functions/objects into high level groups. Currently we have "builtins"
(the main compiler-rt code), "profile", and "asan".
- Use this to define CommonFunctions and ArchFunctions to only reference the
builtins functions.
Modified:
compiler-rt/trunk/lib/Makefile.mk
compiler-rt/trunk/lib/arm/Makefile.mk
compiler-rt/trunk/lib/asan/Makefile.mk
compiler-rt/trunk/lib/asan/mach_override/Makefile.mk
compiler-rt/trunk/lib/asan/sysinfo/Makefile.mk
compiler-rt/trunk/lib/i386/Makefile.mk
compiler-rt/trunk/lib/ppc/Makefile.mk
compiler-rt/trunk/lib/profile/Makefile.mk
compiler-rt/trunk/lib/x86_64/Makefile.mk
compiler-rt/trunk/make/lib_info.mk
compiler-rt/trunk/make/subdir.mk
Modified: compiler-rt/trunk/lib/Makefile.mk
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/Makefile.mk?rev=145674&r1=145673&r2=145674&view=diff
==============================================================================
--- compiler-rt/trunk/lib/Makefile.mk (original)
+++ compiler-rt/trunk/lib/Makefile.mk Thu Dec 1 20:42:07 2011
@@ -7,6 +7,7 @@
#
#===------------------------------------------------------------------------===#
+ModuleName := builtins
SubDirs :=
# Add arch specific optimized implementations.
Modified: compiler-rt/trunk/lib/arm/Makefile.mk
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/arm/Makefile.mk?rev=145674&r1=145673&r2=145674&view=diff
==============================================================================
--- compiler-rt/trunk/lib/arm/Makefile.mk (original)
+++ compiler-rt/trunk/lib/arm/Makefile.mk Thu Dec 1 20:42:07 2011
@@ -7,6 +7,7 @@
#
#===------------------------------------------------------------------------===#
+ModuleName := builtins
SubDirs :=
OnlyArchs := armv5 armv6 armv7
Modified: compiler-rt/trunk/lib/asan/Makefile.mk
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/Makefile.mk?rev=145674&r1=145673&r2=145674&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/Makefile.mk (original)
+++ compiler-rt/trunk/lib/asan/Makefile.mk Thu Dec 1 20:42:07 2011
@@ -7,6 +7,7 @@
#
#===------------------------------------------------------------------------===#
+ModuleName := asan
SubDirs := mach_override sysinfo
Sources := $(foreach file,$(wildcard $(Dir)/*.cc),$(notdir $(file)))
Modified: compiler-rt/trunk/lib/asan/mach_override/Makefile.mk
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/mach_override/Makefile.mk?rev=145674&r1=145673&r2=145674&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/mach_override/Makefile.mk (original)
+++ compiler-rt/trunk/lib/asan/mach_override/Makefile.mk Thu Dec 1 20:42:07 2011
@@ -7,6 +7,7 @@
#
#===------------------------------------------------------------------------===#
+ModuleName := asan
SubDirs :=
Sources := $(foreach file,$(wildcard $(Dir)/*.c),$(notdir $(file)))
Modified: compiler-rt/trunk/lib/asan/sysinfo/Makefile.mk
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/sysinfo/Makefile.mk?rev=145674&r1=145673&r2=145674&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/sysinfo/Makefile.mk (original)
+++ compiler-rt/trunk/lib/asan/sysinfo/Makefile.mk Thu Dec 1 20:42:07 2011
@@ -7,6 +7,7 @@
#
#===------------------------------------------------------------------------===#
+ModuleName := asan
SubDirs :=
Sources := $(foreach file,$(wildcard $(Dir)/*.cc),$(notdir $(file)))
Modified: compiler-rt/trunk/lib/i386/Makefile.mk
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/i386/Makefile.mk?rev=145674&r1=145673&r2=145674&view=diff
==============================================================================
--- compiler-rt/trunk/lib/i386/Makefile.mk (original)
+++ compiler-rt/trunk/lib/i386/Makefile.mk Thu Dec 1 20:42:07 2011
@@ -7,6 +7,7 @@
#
#===------------------------------------------------------------------------===#
+ModuleName := builtins
SubDirs :=
OnlyArchs := i386
Modified: compiler-rt/trunk/lib/ppc/Makefile.mk
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ppc/Makefile.mk?rev=145674&r1=145673&r2=145674&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ppc/Makefile.mk (original)
+++ compiler-rt/trunk/lib/ppc/Makefile.mk Thu Dec 1 20:42:07 2011
@@ -7,6 +7,7 @@
#
#===------------------------------------------------------------------------===#
+ModuleName := builtins
SubDirs :=
OnlyArchs := ppc
Modified: compiler-rt/trunk/lib/profile/Makefile.mk
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/Makefile.mk?rev=145674&r1=145673&r2=145674&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/Makefile.mk (original)
+++ compiler-rt/trunk/lib/profile/Makefile.mk Thu Dec 1 20:42:07 2011
@@ -7,6 +7,7 @@
#
#===------------------------------------------------------------------------===#
+ModuleName := profile
SubDirs :=
Sources := $(foreach file,$(wildcard $(Dir)/*.c),$(notdir $(file)))
Modified: compiler-rt/trunk/lib/x86_64/Makefile.mk
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/x86_64/Makefile.mk?rev=145674&r1=145673&r2=145674&view=diff
==============================================================================
--- compiler-rt/trunk/lib/x86_64/Makefile.mk (original)
+++ compiler-rt/trunk/lib/x86_64/Makefile.mk Thu Dec 1 20:42:07 2011
@@ -7,6 +7,7 @@
#
#===------------------------------------------------------------------------===#
+ModuleName := builtins
SubDirs :=
OnlyArchs := x86_64
Modified: compiler-rt/trunk/make/lib_info.mk
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/make/lib_info.mk?rev=145674&r1=145673&r2=145674&view=diff
==============================================================================
--- compiler-rt/trunk/make/lib_info.mk (original)
+++ compiler-rt/trunk/make/lib_info.mk Thu Dec 1 20:42:07 2011
@@ -14,6 +14,14 @@
# AvailableIn.<function> - The list of subdir keys where 'function' is
# defined.
+# 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)))
+
AvailableArchs := $(sort $(foreach key,$(SubDirKeys),\
$($(key).OnlyArchs)))
@@ -21,12 +29,12 @@
$(basename $($(key).ObjNames))))
CommonFunctions := $(sort\
- $(foreach key,$(SubDirKeys),\
+ $(foreach key,$(ModuleSubDirKeys.builtins),\
$(if $(call strneq,,$(strip $($(key).OnlyArchs) $($(key).OnlyConfigs))),,\
$(basename $($(key).ObjNames)))))
# Compute common arch functions.
-$(foreach key,$(SubDirKeys),\
+$(foreach key,$(ModuleSubDirKeys.builtins),\
$(if $(call strneq,,$($(key).OnlyConfigs)),,\
$(foreach arch,$($(key).OnlyArchs),\
$(call Append,ArchFunctions.$(arch),$(sort \
Modified: compiler-rt/trunk/make/subdir.mk
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/make/subdir.mk?rev=145674&r1=145673&r2=145674&view=diff
==============================================================================
--- compiler-rt/trunk/make/subdir.mk (original)
+++ compiler-rt/trunk/make/subdir.mk Thu Dec 1 20:42:07 2011
@@ -20,7 +20,8 @@
# The list of variables which are intended to be overridden in a subdirectory
# makefile.
-RequiredSubdirVariables := SubDirs ObjNames Implementation Dependencies
+RequiredSubdirVariables := \
+ ModuleName SubDirs ObjNames Implementation Dependencies
OptionalSubdirVariables := OnlyArchs OnlyConfigs
# Template: subdir_traverse_template subdir
More information about the llvm-commits
mailing list