summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChains.cpp
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2014-02-25 13:26:03 +0000
committerAlexey Samsonov <samsonov@google.com>2014-02-25 13:26:03 +0000
commite65ceb9f16f87c97a4c0d30ff66e9ae0bb5335e7 (patch)
tree559cdb53487a791f82f61bfc254b974bd1890d48 /clang/lib/Driver/ToolChains.cpp
parente4d8577c694a3f52f551eac209f58cd5604593c2 (diff)
downloadbcm5719-llvm-e65ceb9f16f87c97a4c0d30ff66e9ae0bb5335e7.tar.gz
bcm5719-llvm-e65ceb9f16f87c97a4c0d30ff66e9ae0bb5335e7.zip
Respect ToolChain::isPIEDefault() in constructing link job on Linux and FreeBSD.
Partially based on http://llvm-reviews.chandlerc.com/D2644 by Viktor Kutuzov. llvm-svn: 202150
Diffstat (limited to 'clang/lib/Driver/ToolChains.cpp')
-rw-r--r--clang/lib/Driver/ToolChains.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp
index fb98e1236b3..5f62601e9da 100644
--- a/clang/lib/Driver/ToolChains.cpp
+++ b/clang/lib/Driver/ToolChains.cpp
@@ -2446,6 +2446,14 @@ bool FreeBSD::UseSjLjExceptions() const {
}
}
+bool FreeBSD::HasNativeLLVMSupport() const {
+ return true;
+}
+
+bool FreeBSD::isPIEDefault() const {
+ return getSanitizerArgs().hasZeroBaseShadow();
+}
+
/// NetBSD - NetBSD tool chain which can call as(1) and ld(1) directly.
NetBSD::NetBSD(const Driver &D, const llvm::Triple& Triple, const ArgList &Args)
@@ -2996,10 +3004,6 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
addPathIfExists(SysRoot + "/usr/lib", Paths);
}
-bool FreeBSD::HasNativeLLVMSupport() const {
- return true;
-}
-
bool Linux::HasNativeLLVMSupport() const {
return true;
}
OpenPOWER on IntegriCloud