[cfe-dev] Get .o and .i files by only one cmd

Csaba Raduly rcsaba at gmail.com
Thu Oct 25 00:24:21 PDT 2012


Hi,

On Thu, Oct 25, 2012 at 4:03 AM, fiveight  wrote:
> Hi All!
>
>         I can use cmd "clang.exe -c main.c -o main.o" to get .o file.
>
>         And I can use cmd "clang.exe -E main.c -o main.i" to get .i file.
>
>         Can I use only one cmd to get both tow files at the same time?

You could use the -save-temps flag, although that would also produce
the assembler output file (.s)

clang -c -save-temps main.c -o main.o

Hope this helps,

Csaba
-- 
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds




More information about the cfe-dev mailing list