Allow conditional lit tests in Subzero, based on build flags.

Adds conditionality to lit tests in two ways:

1) Allows the use of "; REQUIRES: XXX" lines in lit tests. In this
case, the tests defined by the file are only run if all REQUIRES are
met.

2) Allows the conditional running of RUN commands, based on build
flags. This comes in two subforms. There are predefined %ifX commands
that run the command defined by remaining arguments, if the
corresponding %X2i command is applicable. Alternatively, one can use
%if with explicit '--att' arguments to define what conditions should
be checked.

In any case, unlike REQUIRES, the %if commands RUN all the time, but
simply generate empty output, rather then output defined by the
following command, if the condition is not met. These latter tests are
useful when the same input is to be tested under different conditions,
since the REQUIRES form does not allow this.

Note that m2i, p2i, l2i, and lc2i are also conditionally controlled,
so that they do nothing if the build did not construct the appropriate
Subzero translator.

This CL replaces https://codereview.chromium.org/644143002

BUG=None
R=jvoung@chromium.org, stichnot@chromium.org

Review URL: https://codereview.chromium.org/659513005
diff --git a/Makefile b/Makefile
index 12ffff7..b8934e4 100644
--- a/Makefile
+++ b/Makefile
@@ -11,3 +11,9 @@
 
 # Include LLVM common makefile.
 include $(LEVEL)/Makefile.common
+
+CXX.Flags += -std=c++11 -Wextra -Werror -Wno-error=unused-parameter
+
+CPP.Defines += -DALLOW_TEXT_ASM=1 -DALLOW_DUMP=1 -DALLOW_LLVM_CL=1 \
+               -DALLOW_LLVM_IR=1 -DALLOW_LLVM_IR_AS_INPUT=1
+