Index: src/SZTargets.def |
diff --git a/src/SZTargets.def b/src/SZTargets.def |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b07ac470c87a882331da1cf274c3d3e2833fcebd |
--- /dev/null |
+++ b/src/SZTargets.def |
@@ -0,0 +1,31 @@ |
+//===- subzero/src/SZTargets.def - Target enumeration x-macro ---*- C++ -*-===// |
+// |
+// The Subzero Code Generator |
+// |
+// This file is distributed under the University of Illinois Open Source |
+// License. See LICENSE.TXT for details. |
+// |
+//===----------------------------------------------------------------------===// |
+// |
+// This file provides an alternate implementation of llvm/Config/SZTargets.def, |
+// such that when SZTARGET is defined, it enumerates the single SZTARGET instead |
+// of the complete list. This can be used to model a proper minimal build for |
+// the browser. |
+// |
+//===----------------------------------------------------------------------===// |
+ |
+#ifdef SZTARGET |
+ |
+#ifndef SUBZERO_TARGET |
+#error Please define the macro SUBZERO_TARGET(TargetName) |
+#endif |
+ |
+SUBZERO_TARGET(SZTARGET) |
+ |
+#undef SUBZERO_TARGET |
+ |
+#else // !SZTARGET |
+ |
+#include "llvm/Config/SZTargets.def" |
+ |
+#endif // !SZTARGET |