Page MenuHomePhabricator

Make VCRuntime ABI configuration a first-class option.
ClosedPublic

Authored by EricWF on Mar 4 2019, 5:27 PM.

Details

Summary

On Windows we currently provide two separate ABI configurations. One which defers to vcruntime to provide the C++ runtime and another which doesn't.
Using vcruntime allows interoperability which programs compiled against the MSVC STL, and should be preferred whenever possible.

When deferring to vcruntime much of the ABI we provide changes. Including the layout of <stdexcept> types, their vtables, and how the linkage of their members.

This patch introduces the _LIBCPP_ABI_VCRUNTIME macro to denote this configuration. It also cleans up the existing configuration for using vcruntime.

This cleanup lays the groundwork for fixing a number of ABI and interoperability bugs in <stdexcept>.

Diff Detail

Repository
rCXX libc++

Event Timeline

EricWF created this revision.Mar 4 2019, 5:27 PM
smeenai accepted this revision.Mar 4 2019, 5:44 PM

LGTM; this is a nice cleanup.

This revision is now accepted and ready to land.Mar 4 2019, 5:44 PM
This revision was automatically updated to reflect the committed changes.