mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Make it possible to change the output file suffix based on command-line options.
For instance, the following command: llvmc2 -E hello.c now generates a file with the correct suffix (hello.i). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51733 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -30,10 +30,7 @@ def llvm_gcc_c : Tool<
|
||||
"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"),
|
||||
(switch_option "E", (stop_compilation),(output_suffix "i"),
|
||||
(help "Stop after the preprocessing stage, do not run the compiler")),
|
||||
(sink)
|
||||
]>;
|
||||
@@ -47,7 +44,7 @@ def llvm_gcc_cpp : Tool<
|
||||
"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)),
|
||||
(switch_option "E", (stop_compilation), (output_suffix "i")),
|
||||
(sink)
|
||||
]>;
|
||||
|
||||
|
Reference in New Issue
Block a user