r196606 - Add option to use temporary file for assembling with clang

David Peixotto dpeixott at codeaurora.org
Mon Dec 9 17:00:30 PST 2013


Ah, I see. Should be fixed in r196854. I modified the test to always pass a
target that has an external assembler. Please let me know if it is still
causing you a problem.

 

 

From: Reid Kleckner [mailto:rnk at google.com] 
Sent: Monday, December 09, 2013 4:04 PM
To: Timur Iskhodzhanov
Cc: David Peixotto; cfe-commits
Subject: Re: r196606 - Add option to use temporary file for assembling with
clang

 

This is still happening for me.  The win32 target doesn't support an
external assembler.  We emit a diagnostic and then hit an assertion
somewhere downstream.

 

On Mon, Dec 9, 2013 at 10:22 AM, Timur Iskhodzhanov <timurrrr at google.com>
wrote:

This happens on my private bot running check-all.

Reid, can you please help David?

09 дек. 2013 г. 22:02 пользователь "David Peixotto"
<dpeixott at codeaurora.org> написал:

 

Hi Timur,

Where do you see this failure? I am not getting a notification from the
build bot and I do not see the failure locally. What is the process for
debugging a failure like this?

-David

> -----Original Message-----
> From: Timur Iskhodzhanov [mailto:timurrrr at google.com]
> Sent: Monday, December 09, 2013 3:00 AM
> To: David Peixotto
> Cc: cfe-commits
> Subject: Re: r196606 - Add option to use temporary file for assembling
> with clang
>
> FYI
>
> I see this test failure after your change:
> Command 2: "llvm/build/bin/./clang.EXE" "-no-integrated-as"
> "-via-file-asm" "llvm\tools\clang\test\Driver\via-file-asm.c" "-###"
> Command 2 Result: 3
>
> Looks like an assertion failure?
>
> 2013/12/7 David Peixotto <dpeixott at codeaurora.org>:
> > Author: dpeixott
> > Date: Fri Dec  6 14:27:33 2013
> > New Revision: 196606
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=196606
<http://llvm.org/viewvc/llvm-project?rev=196606&view=rev> &view=rev
> > Log:
> > 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.
> >
> > Added:
> >     cfe/trunk/test/Driver/via-file-asm.c
> > Modified:
> >     cfe/trunk/include/clang/Driver/Options.td
> >     cfe/trunk/lib/Driver/Driver.cpp
> >
> > Modified: cfe/trunk/include/clang/Driver/Options.td
> > URL:
> > http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Opt
> > ions.td?rev=196606
<http://ions.td?rev=196606&r1=196605&r2=196606&view=diff>
&r1=196605&r2=196606&view=diff
> > ======================================================================
> > ========
> > --- cfe/trunk/include/clang/Driver/Options.td (original)
> > +++ cfe/trunk/include/clang/Driver/Options.td Fri Dec  6 14:27:33 2013
> > @@ -1230,6 +1230,8 @@ def rtlib_EQ : Joined<["-", "--"], "rtli  def r
> > : Flag<["-"], "r">;  def save_temps : Flag<["-", "--"], "save-temps">,
> > Flags<[DriverOption]>,
> >    HelpText<"Save intermediate compilation results">;
> > +def via_file_asm : Flag<["-", "--"], "via-file-asm">,
> > +Flags<[DriverOption]>,
> > +  HelpText<"Write assembly to file for input to assemble jobs">;
> >  def sectalign : MultiArg<["-"], "sectalign", 3>;  def sectcreate :
> > MultiArg<["-"], "sectcreate", 3>;  def sectobjectsymbols :
> > MultiArg<["-"], "sectobjectsymbols", 2>;
> >
> > Modified: cfe/trunk/lib/Driver/Driver.cpp
> > URL:
> > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?re
> > v=196606&r1=196605&r2=196606&view=diff
> > ======================================================================
> > ========
> > --- cfe/trunk/lib/Driver/Driver.cpp (original)
> > +++ cfe/trunk/lib/Driver/Driver.cpp Fri Dec  6 14:27:33 2013
> > @@ -1456,6 +1456,7 @@ static const Tool *SelectToolForJob(Comp
> >
> >    if (TC->useIntegratedAs() &&
> >        !C.getArgs().hasArg(options::OPT_save_temps) &&
> > +      !C.getArgs().hasArg(options::OPT_via_file_asm) &&
> >        !C.getArgs().hasArg(options::OPT__SLASH_FA) &&
> >        !C.getArgs().hasArg(options::OPT__SLASH_Fa) &&
> >        isa<AssembleJobAction>(JA) &&
> >
> > Added: cfe/trunk/test/Driver/via-file-asm.c
> > URL:
> > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/via-file-asm
> > .c?rev=196606&view=auto
> > ======================================================================
> > ========
> > --- cfe/trunk/test/Driver/via-file-asm.c (added)
> > +++ cfe/trunk/test/Driver/via-file-asm.c Fri Dec  6 14:27:33 2013
> > @@ -0,0 +1,14 @@
> > +// Should save and read back the assembly from a file // RUN: %clang
> > +-integrated-as -via-file-asm %s -### 2>&1 | FileCheck %s // CHECK:
> > +"-cc1"
> > +// CHECK: "-o" "[[TMP:[^"]*]]"
> > +// CHECK: -cc1as
> > +// CHECK: [[TMP]]
> > +
> > +// Should not force using the integrated assembler // RUN: %clang
> > +-no-integrated-as -via-file-asm %s -### 2>&1 | FileCheck
> > +--check-prefix=NO_IAS %s // NO_IAS-NOT: "-cc1as"
> > +
> > +// Test arm target specifically for the same behavior // RUN: %clang
> > +-target arm -integrated-as -via-file-asm %s -### 2>&1 | FileCheck %s
> > +// RUN: %clang -target arm -no-integrated-as -via-file-asm %s -###
> > +2>&1 | FileCheck --check-prefix=NO_IAS %s
> >
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131209/2f190094/attachment.html>


More information about the cfe-commits mailing list