[PATCH] D21006: [Driver] Make -flto -S emit assembly

Mehdi Amini via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 5 19:06:12 PDT 2016


But what pipeline do we setup? For instance with ThinLTO we reduced the amount of passes ran during the compile phase with the expectation that more will run during the link, this would get fuzzy here...

> On Jun 5, 2016, at 6:49 PM, Davide Italiano <dccitaliano at gmail.com> wrote:
> 
> 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