This is an archive of the discontinued LLVM Phabricator instance.

clang-cl: add support for /FA (output assembly file)
ClosedPublic

Authored by hans on Oct 15 2013, 4:41 PM.

Details

Summary

This adds support for the /FA option (output assembly file), and /Fa which sets the filename.

The patch achieves this in a way similar to how -save-temps works: it changes the compilation pipeline to not use the integrated assembler, and keeps the intermediate assembly output.

The catch here is that clang is often not able to assemble the output it produces on Windows. I've uploaded http://llvm-reviews.chandlerc.com/D1945 to address that.

Diff Detail

Event Timeline

rnk added a comment.Oct 15 2013, 5:21 PM

LGTM with a fix to make /Fa not require /FA.

include/clang/Driver/CLCompatOptions.td
118 ↗(On Diff #4941)

I always use /Fa only, which implies /FA, so I'd make the doc text here stand on its own without referencing /FA.

test/Driver/cl-outputs.c
106 ↗(On Diff #4941)

This should output asm to foo.asm, I think.

hans updated this revision to Unknown Object (????).Oct 15 2013, 5:56 PM

New version. I want to get the llvm-side landed first.

hans closed this revision.Oct 17 2013, 9:20 AM

Closed by commit rL192902 (authored by @hans).