[LLVMbugs] [Bug 17421] New: save-temps in gcc can take an argument

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Sep 30 18:07:47 PDT 2013


            Bug ID: 17421
           Summary: save-temps in gcc can take an argument
           Product: clang
           Version: 3.2
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Driver
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rkotler at mips.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

save-temps does not accept an argument in clang.

Store the usual “temporary” intermediate files permanently; place them in the
current directory and name them based on the source file. Thus, compiling foo.c
with -c -save-temps produces files foo.i and foo.s, as well as foo.o. This
creates a preprocessed foo.i output file even though the compiler now normally
uses an integrated preprocessor.
When used in combination with the -x command-line option, -save-temps is
sensible enough to avoid over writing an input source file with the same
extension as an intermediate file. The corresponding intermediate file may be
obtained by renaming the source file before using -save-temps.

If you invoke GCC in parallel, compiling several different source files that
share a common base name in different subdirectories or the same source file
compiled for multiple output destinations, it is likely that the different
parallel compilers will interfere with each other, and overwrite the temporary
files. For instance:

          gcc -save-temps -o outdir1/foo.o indir1/foo.c&
          gcc -save-temps -o outdir2/foo.o indir2/foo.c&
may result in foo.i and foo.o being written to simultaneously by both

Store the usual “temporary” intermediate files permanently. If the -o option is
used, the temporary files are based on the object file. If the -o option is not
used, the -save-temps=obj switch behaves like -save-temps.
For example:

          gcc -save-temps=obj -c foo.c
          gcc -save-temps=obj -c bar.c -o dir/xbar.o
          gcc -save-temps=obj foobar.c -o dir2/yfoobar
creates foo.i, foo.s, dir/xbar.i, dir/xbar.s, dir2/yfoobar.i, dir2/yfoobar.s,
and dir2/yfoobar.o.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131001/b2177695/attachment.html>

More information about the llvm-bugs mailing list