This is an archive of the discontinued LLVM Phabricator instance.

Refactor Darwin driver to refer to runtimes by component
ClosedPublic

Authored by beanz on Aug 12 2018, 5:16 PM.

Details

Summary

In r335809, Petr Hosek lays out support for what he calls the multiarch
runtimes layout. This new way of laying out the directories for runtime
libraries is workable for all platforms. Petr did some of the common
infrastructure and made it work for Linux and Fuscia. This patch is a
cleanup to the Darwin and MachO drivers to serve as a step toward
supporting it in Darwin.

This patch does primarily two things:
(1) Changes the APIs for how the Darwin driver refers to compiler-rt
libraries to use the component names, similar to how Linux and Fuscia do

(2) Removes some legacy functionality for supporting macOS versions
before 10.6. This functionality is effectively dead code because in
r339277, the support was removed from compiler-rt for generating the 10.4
runtime support library, and Xcode 10 (currently in beta) removes
libgcc_s.10.4 and libgcc_s.10.5 from the macOS SDK.

With this patch landed a subsequent patch can modify
MachO::AddLinkRuntimeLib to support the multiarch runtimes layout.

Worth noting: None of the removed functionality was actually covered in
the test suite. So no test case updates are required.

Diff Detail

Repository
rC Clang

Event Timeline

beanz created this revision.Aug 12 2018, 5:16 PM
phosek accepted this revision.Aug 14 2018, 11:52 AM

LGTM

This revision is now accepted and ready to land.Aug 14 2018, 11:52 AM
arphaman accepted this revision.Aug 14 2018, 1:29 PM
This revision was automatically updated to reflect the committed changes.