This is an archive of the discontinued LLVM Phabricator instance.

Add default C++ ABI libname and include paths for FreeBSD
ClosedPublic

Authored by dim on Feb 10 2018, 3:17 PM.

Details

Summary

As noted in a discussion about testing the LLVM 6.0.0 release candidates
(with libc++) for FreeBSD, many tests turned out to fail with
"exception_ptr not yet implemented". This was because libc++ did not
choose the correct C++ ABI library, and therefore it fell back to the
exception_fallback.ipp header.

Since FreeBSD 10.x, we have been using libcxxrt as our C++ ABI library,
and its headers have always been installed in /usr/include/c++/v1,
together with the (system) libc++ headers. (Older versions of FreeBSD
used GNU libsupc++ by default, but these are now unsupported.)

Therefore, if we are building libc++ for FreeBSD, set:

  • LIBCXX_CXX_ABI_LIBNAME to "libcxxrt"
  • LIBCXX_CXX_ABI_INCLUDE_PATHS to "/usr/include/c++/v1"

by default.

Diff Detail

Repository
rL LLVM

Event Timeline

dim created this revision.Feb 10 2018, 3:17 PM
EricWF accepted this revision.Feb 11 2018, 1:29 PM
This revision is now accepted and ready to land.Feb 11 2018, 1:29 PM
EricWF added inline comments.Feb 11 2018, 1:30 PM
CMakeLists.txt
141 ↗(On Diff #133772)

Actually, I'm not sure how much I love having other libc++ header on the include path... I'm not sure how well this works especially with out forwarding header. Maybe what would be appropriate would be to copy the cxxabi.h header into the build directory?

EricWF added inline comments.Feb 11 2018, 1:35 PM
CMakeLists.txt
141 ↗(On Diff #133772)

Nevermind... That's what this already does. My bad.

This revision was automatically updated to reflect the committed changes.