Add lit config feature <target>-supported-target to mark target-specific tests

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182355 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/lit.common.cfg b/lib/lit.common.cfg
index 428554a..b410259 100644
--- a/lib/lit.common.cfg
+++ b/lib/lit.common.cfg
@@ -52,3 +52,9 @@
 config.substitutions.append(
     (' clang', """\n\n*** Do not use 'clangXXX' in tests,
      instead define '%clangXXX' substitution in lit config. ***\n\n""") )
+
+# Add supported compiler_rt architectures to a list of available features.
+compiler_rt_arch = getattr(config, 'compiler_rt_arch', None)
+if compiler_rt_arch:
+  for arch in compiler_rt_arch.split(";"):
+    config.available_features.add(arch + "-supported-target")