[PATCH] D21006: [Driver] Make -flto -S emit assembly
Davide Italiano via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 5 18:49:10 PDT 2016
davide added a comment.
In http://reviews.llvm.org/D21006#449409, @dexonsmith wrote:
> I agree with Mehdi. I expect `-S -flto` to give equivalent output to `-c -flto`.
>
> In effect, with this change, `-flto -S` would silently ignore the `-flto` flag. That doesn't make sense to me.
I guess there's enough disagreement to hold on on this change.
My $0.02: When I ask for -S I really expect asm to be produced, but maybe it's just me =)
Lots of build systems have invocations of clang like:
CFLAGS= -S
${CC} ${CFLAGS} blah.c -o blah.s
sed -e ...
When CFLAGS is changed, as in:
CFLAGS += -flto
this is generally passed globally. So, not emitting ASM in this case makes LTO non transparent for the build system, i.e. Makefiles need to pass `-fno-lto`, which might not be terrible overall, just not what I expect.
http://reviews.llvm.org/D21006
More information about the cfe-commits
mailing list