This is an archive of the discontinued LLVM Phabricator instance.

[clang][Darwin] Re-apply "Always set the default C++ Standard Library to libc++"
ClosedPublic

Authored by ldionne on Aug 5 2022, 11:04 AM.

Details

Summary

Newer SDKs don't even provide libstdc++ headers, so it's effectively
never valid to build for libstdc++ unless the user explicitly asks
for it (in which case they will need to provide include paths and more).

This is a re-application of c5ccb78ade81 which had been reverted in
33171df9cc7f because it broke the Fuchsia CI bots. The issue was that
the test was XPASSing because it didn't fail anymore when the
CLANG_DEFAULT_CXX_LIB was set to libc++, which seems to be done for
Fuchsia. Instead, the test only fails if CLANG_DEFAULT_CXX_LIB is
set to libstdc++.

Diff Detail

Event Timeline

ldionne created this revision.Aug 5 2022, 11:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 5 2022, 11:04 AM
ldionne requested review of this revision.Aug 5 2022, 11:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 5 2022, 11:04 AM

@leonardchan Does this fix the Fuchsia issues you were seeing? I think I understand what went wrong and I think this version of the patch should address the issue.

leonardchan accepted this revision.Aug 5 2022, 2:11 PM

LGTM. Asserted locally the test passes. Thanks for the fix!

This revision is now accepted and ready to land.Aug 5 2022, 2:11 PM
ldionne updated this revision to Diff 450771.Aug 8 2022, 5:40 AM

Fix additional tests.

ldionne updated this revision to Diff 451287.Aug 9 2022, 3:30 PM

Fix more tests that failed on internal bots (but I can't reproduce the failure locally for some reason)