]> granicus.if.org Git - clang/commit
Add option to use temporary file for assembling with clang
authorDavid Peixotto <dpeixott@codeaurora.org>
Fri, 6 Dec 2013 20:27:33 +0000 (20:27 +0000)
committerDavid Peixotto <dpeixott@codeaurora.org>
Fri, 6 Dec 2013 20:27:33 +0000 (20:27 +0000)
commitd27975a1381bb92337e06397f8ee2d9f712c3667
tree55f4284fb73aad8837bc6bd181e2eb7655459a49
parentec8d5a825d8f511199d110be14ce57f652461aae
Add option to use temporary file for assembling with clang

This commit adds the flag '-via-file-asm' to the clang driver. The
purpose of this flag is to have a way to test that clang can consume
the assembly code that it outputs. When passed this flag, clang will
generate a temporary file that contains the assembly output from the
compile step. This assembly file will then be consumed by either the
integrated assembler or the external assembler. To test that the
integrated assembler can consume its own output compile with:

  $ clang -integrated-assembler -via-file-asm

Without the '-via-file-asm' flag, clang would directly create the
object file when using the integrated assembler. With the flag it
will first create the temporary assembly file and then read that
file and assemble it with the integrated assembler.

The flow is similar to -save-temps, except that it only effects
the assembly input and the temporary file is not saved.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196606 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Driver/Options.td
lib/Driver/Driver.cpp
test/Driver/via-file-asm.c [new file with mode: 0644]