[(in_language "c"),
(out_language "llvm-bitcode"),
(output_suffix "bc"),
- (cmd_line "llvm-gcc -c -x c $INFILE -o $OUTFILE -emit-llvm"),
+ (cmd_line (case
+ (switch_on "E"),
+ "llvm-g++ -E -x c $INFILE -o $OUTFILE -emit-llvm",
+ (default),
+ "llvm-g++ -c -x c $INFILE -o $OUTFILE -emit-llvm")),
+ // TOFIX: Preprocessed files currently have suffix ".bc".
(switch_option "E", (stop_compilation),
+ // Make this possible:
+ // (output_suffix "i"),
(help "Stop after the preprocessing stage, do not run the compiler")),
(sink)
]>;
[(in_language "c++"),
(out_language "llvm-bitcode"),
(output_suffix "bc"),
- (cmd_line "llvm-g++ -c -x c++ $INFILE -o $OUTFILE -emit-llvm"),
+ (cmd_line (case
+ (switch_on "E"),
+ "llvm-g++ -E -x c++ $INFILE -o $OUTFILE -emit-llvm",
+ (default),
+ "llvm-g++ -c -x c++ $INFILE -o $OUTFILE -emit-llvm")),
(switch_option "E", (stop_compilation)),
(sink)
]>;