This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] Force ABI to libcxxabi when building cxustom libc++
ClosedPublic

Authored by dim on Feb 11 2022, 9:09 AM.

Details

Summary

Follow-up to 458ead66dc37, which replaced the bespoke CMakeLists.txt
file for building a custom instrumented libc++ with an invocation of the
runtimes build.

In the the bespoke CMakeLists.txt, the LIBCXX_CXX_ABI setting was forced
to libcxxabi, but this was not done for the CMake invocation for the
runtimes build. This would cause CMake configuration issues on platforms
where the default LIBCXX_CXX_ABI setting is not libcxxabi, such as
FreeBSD.

Add -DLIBCXX_CXX_ABI=libcxxabi to that invocation, to make sure the
custom instrumented libc++ always uses the expected ABI.

Diff Detail

Event Timeline

dim created this revision.Feb 11 2022, 9:09 AM
dim requested review of this revision.Feb 11 2022, 9:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 11 2022, 9:09 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
phosek accepted this revision.Feb 11 2022, 9:45 AM

LGTM

compiler-rt/cmake/Modules/AddCompilerRT.cmake
638–642

Nit: can you move it down so that all libc++ options are kept together?

This revision is now accepted and ready to land.Feb 11 2022, 9:45 AM
dim added inline comments.Feb 11 2022, 1:10 PM
compiler-rt/cmake/Modules/AddCompilerRT.cmake
638–642

Ah sure, it looked to me like it belonged to the libcxxabi options, but indeed it is actually a LIBCXX_* option!