r260755 - Darwin: pass -stdlib=libc++ down to cc1 whenever we're targeting libc++

Hahnfeld, Jonas via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 15 23:02:41 PST 2016


Hi Tim,

> -----Original Message-----
> From: tnorthover at apple.com [mailto:tnorthover at apple.com]
> Sent: Monday, February 15, 2016 5:43 PM
> To: Hahnfeld, Jonas
> Cc: cfe-commits at lists.llvm.org
> Subject: Re: r260755 - Darwin: pass -stdlib=libc++ down to cc1 whenever
> we're targeting libc++
> 
> Hi Jonas,
> 
> Thanks for looking at the patch!
> 
> > On 13 Feb 2016, at 01:26, Hahnfeld, Jonas <Hahnfeld at itc.rwth-aachen.de>
> wrote:
> > as I did the change: Sorry that it broke for you on Darwin! I could not test
> myself and there doesn't seem to be a build-bot…
> 
> No worries. I think it only triggered in the stage 2 Green Dragon bots (when
> the compiler was actually used to try and build some ASAN test bits).
> 
> > To the change: I think the explicit passing of -stdlib=libc++ will override
> CLANG_DEFAULT_CXX_STDLIB on Darwin.
> 
> Good point, sorry about that. I thought I was being cunning by skipping the
> extra bits of GetCXXStdlibType.
> 
> > Instead, Darwin::AddClangCXXStdlibIncludeArgs should be implemented,
> maybe similar to Linux::AddClangCXXStdlibIncludeArgs.
> 
> I did look into that, but there was quite a bit of logic to be refactored and I
> was very much in fire-fighting mode at the time (everything was falling down
> around me on Friday). I’ll see what I can do if things quiet down.
> 
> > With regard to the test case: First I think this currently won't ever be
> executed because it resists in the root directory.
> 
> Good point. Don’t know how I managed to do that.
> 
> > And second: Testing the default stdlib chosen by clang is fragile now
> because it can be changed by CLANG_DEFAULT_CXX_STDLIB which would fail
> all the tests!
> 
> > I already had this problem with FreeBSD and NetBSD. As a solution we
> could think about implementing -stdlib=default which would take the
> architecture default instead…
> 
> So what have you done in the meantime? I think I’d prefer a test that’s noisy
> in less common configurations over no test at all.

Not much on this idea - but I do still like it after thinking a bit about some -stdlib=default for the tests. Let me see if I can implement this ;-)
Yep, tests are great, especially if they can catch problems for other platforms.

> 
> Anyway, I think I’ve fixed the big mistakes in r260898. I’ll see what I can do
> about the refactoring this week.

Looks good. Thanks,
Jonas

> 
> Cheers.
> 
> Tim.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5868 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160216/49d725c9/attachment-0001.bin>


More information about the cfe-commits mailing list