[PATCH] Add option to use temporary file for assembling with clang

David Blaikie dblaikie at gmail.com
Wed Dec 4 16:11:48 PST 2013


What's the value in this flag?

If it's only for testing, normal test cases would just do this as two
commands (emit the asm, then run llc on the asm)

 I'm guessing you want this so you could test the correctness of the
integrated assembler over a large codebase using an existing build
system?

On Wed, Dec 4, 2013 at 4:02 PM, David Peixotto <dpeixott at codeaurora.org> wrote:
> Please help to review this patch.
>
> 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.
>
>
>
> -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
> by The Linux Foundation
>
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>



More information about the cfe-commits mailing list