r260755 - Darwin: pass -stdlib=libc++ down to cc1 whenever we're targeting libc++
Tim Northover via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 15 08:43:12 PST 2016
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.
Anyway, I think I’ve fixed the big mistakes in r260898. I’ll see what I can do about the refactoring this week.
Cheers.
Tim.
More information about the cfe-commits
mailing list