Refactor Darwin driver to refer to runtimes by component
authorChris Bieneman <chris.bieneman@me.com>
Wed, 15 Aug 2018 20:09:38 +0000 (20:09 +0000)
committerChris Bieneman <chris.bieneman@me.com>
Wed, 15 Aug 2018 20:09:38 +0000 (20:09 +0000)
commit3434ade2b7ca351b61522f7da4b55070d811b83f
tree119ca80b8dac83791b7e586765ec7726b422e070
parented4239f48274d75d7797dea39ad24a7beec4e572
Refactor Darwin driver to refer to runtimes by component

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.

Reviewers: phosek, bruno, arphaman

Reviewed By: phosek, arphaman

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D50618

llvm-svn: 339807
clang/lib/Driver/ToolChains/Darwin.cpp
clang/lib/Driver/ToolChains/Darwin.h