Add support for "platform" configurations, which define a suite of compiler-rt
libraries to generate.
 - Each library may be built with different flags and for different
   architectures, and there is support for building Darwin style fat archives.

 - Uses an ambituous amount of make programming, but should be hidden to
   users and developers.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@93720 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/make/util.mk b/make/util.mk
index 6764a91..57ff4da 100644
--- a/make/util.mk
+++ b/make/util.mk
@@ -66,6 +66,15 @@
 #   CHECKVALUE: foo: $(call streq,,) - true
 CheckValue = $(info CHECKVALUE: $(1): $(value $(1)) - $($(1)))
 
+# Function: CopyVariable src dst
+#
+# Copy the value of the variable 'src' to 'dst', taking care to not define 'dst'
+# if 'src' is undefined. The destination variable must be undefined.
+CopyVariable = \
+  $(call AssertValue,$(call IsUndefined,$(2)),destination is already defined)\
+  $(if $(call IsUndefined,$(1)),,\
+       $(call Set,$(2),$($(1))))
+
 # Function: Assert value message
 #
 # Check that a value is true, or give an error including the given message