[PATCH] Use the integrated assembler by default on OpenBSD/powerpc

Daniel Sanders Daniel.Sanders at imgtec.com
Fri Jun 13 04:03:48 PDT 2014


Hi Brad,

> // CHECK-POWERPC-AS-NOT: "-no-integrated-as"

That looks right to me. The -NOT suffix causes FileCheck to report failure if the string matches.

That said, I think the behaviour I expected from your patch was wrong. Even though Jeorg committed your patch in r202967, -no-integrated-as still appears in the clang subcommand and it still calls the assembler separately when I run 'clang -target powerpc-unknown-openbsd -### -c tools/clang/test/Driver/openbsd.c'.

I believe the bit I hadn't realised at the time is that clang has its opinion on whether the integrated assembler is enabled by default and that it currently (r210886) thinks it should be off for PowerPC OpenBSD (see Generic_GCC::IsIntegratedAssemblerDefault() in tools/clang/lib/Driver/ToolChains.cpp). Adding the 'CHECK-POWERPC-AS-NOT' will make sense when clang's default is changed.

> -----Original Message-----
> From: Brad Smith [mailto:brad at comstyle.com]
> Sent: 12 June 2014 06:35
> To: Daniel Sanders
> Cc: llvm cfe
> Subject: Re: [PATCH] Use the integrated assembler by default on
> OpenBSD/powerpc
> 
> On 12/06/14 12:26 AM, Brad Smith wrote:
> > On 07/03/14 9:30 AM, Daniel Sanders wrote:
> >> The test in the clang patch passes without the rest of the patch. I
> >> think you need to add a check that -no-integrated-as isn't present in
> >> the sub-command.
> >  > Other than that it LGTM. I'm happy to commit it for you once you've
> > fixed that  > bug.
> >
> > Getting back to this. I don't understand why the test would be passing
> > without the rest of the patch. But I don't have much familiarity with
> > the test framework. Your suggestion does make more sense. Taking into
> > consideration my lack of familiarity with the framework can you make a
> > suggestion as to what I should change the test to?
> >
> > // Check that the integrated assembler is enabld for PowerPC // RUN:
> > %clang -target powerpc-unknown-openbsd -### -c %s 2>&1 \
> > // RUN:   | FileCheck -check-prefix=CHECK-POWERPC-AS %s
> > // CHECK-POWERPC-AS: clang{{.*}}" "-cc1" "-triple"
> > "powerpc-unknown-openbsd" "-emit-obj"
> 
> Looking at some of the other tests for inspiration I'm wondering if this would
> be enough...
> 
> // CHECK-POWERPC-AS-NOT: "-no-integrated-as"
> 
> ??
> 
> --
> This message has been scanned for viruses and dangerous content by
> MailScanner, and is believed to be clean.





More information about the cfe-commits mailing list