summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChains/Darwin.h
diff options
context:
space:
mode:
authorChris Bieneman <chris.bieneman@me.com>2018-08-15 20:09:38 +0000
committerChris Bieneman <chris.bieneman@me.com>2018-08-15 20:09:38 +0000
commit3434ade2b7ca351b61522f7da4b55070d811b83f (patch)
tree119ca80b8dac83791b7e586765ec7726b422e070 /clang/lib/Driver/ToolChains/Darwin.h
parented4239f48274d75d7797dea39ad24a7beec4e572 (diff)
downloadbcm5719-llvm-3434ade2b7ca351b61522f7da4b55070d811b83f.tar.gz
bcm5719-llvm-3434ade2b7ca351b61522f7da4b55070d811b83f.zip
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
Diffstat (limited to 'clang/lib/Driver/ToolChains/Darwin.h')
-rw-r--r--clang/lib/Driver/ToolChains/Darwin.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/lib/Driver/ToolChains/Darwin.h b/clang/lib/Driver/ToolChains/Darwin.h
index 87d553bd7e0..98ad7431919 100644
--- a/clang/lib/Driver/ToolChains/Darwin.h
+++ b/clang/lib/Driver/ToolChains/Darwin.h
@@ -189,9 +189,9 @@ public:
/// Add a runtime library to the list of items to link.
void AddLinkRuntimeLib(const llvm::opt::ArgList &Args,
- llvm::opt::ArgStringList &CmdArgs,
- StringRef DarwinLibName,
- RuntimeLinkOptions Opts = RuntimeLinkOptions()) const;
+ llvm::opt::ArgStringList &CmdArgs, StringRef Component,
+ RuntimeLinkOptions Opts = RuntimeLinkOptions(),
+ bool IsShared = false) const;
/// Add any profiling runtime libraries that are needed. This is essentially a
/// MachO specific version of addProfileRT in Tools.cpp.
@@ -252,6 +252,8 @@ public:
return llvm::ExceptionHandling::None;
}
+ virtual StringRef getOSLibraryNameSuffix() const { return ""; }
+
/// }
};
@@ -418,7 +420,7 @@ protected:
Action::OffloadKind DeviceOffloadKind) const override;
StringRef getPlatformFamily() const;
- StringRef getOSLibraryNameSuffix() const;
+ StringRef getOSLibraryNameSuffix() const override;
public:
static StringRef getSDKName(StringRef isysroot);
OpenPOWER on IntegriCloud