diff options
author | Jordan Rupprecht <rupprecht@google.com> | 2018-10-04 23:06:28 +0000 |
---|---|---|
committer | Jordan Rupprecht <rupprecht@google.com> | 2018-10-04 23:06:28 +0000 |
commit | 9fa0a1f211b7c9a402767bc895a87481cf347230 (patch) | |
tree | 7a330cdd5ac39684a5f959ec67cacc04a1e8aebb /lib/Driver/ToolChains/Darwin.cpp | |
parent | 5d752c0d24d20907081f5b7831e161f02bf3e1fb (diff) | |
parent | da396cc1841fc3bafad999f5d7c454a32d15cbbb (diff) |
Creating branches/google/stable and tags/google/stable/2018-10-04 from r343360
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/google/stable@343826 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains/Darwin.cpp')
-rw-r--r-- | lib/Driver/ToolChains/Darwin.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/Driver/ToolChains/Darwin.cpp b/lib/Driver/ToolChains/Darwin.cpp index 5971a0ae44..9d7f7848a5 100644 --- a/lib/Driver/ToolChains/Darwin.cpp +++ b/lib/Driver/ToolChains/Darwin.cpp @@ -1105,6 +1105,13 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList &Args, if (Sanitize.needsEsanRt()) AddLinkSanitizerLibArgs(Args, CmdArgs, "esan"); + const XRayArgs &XRay = getXRayArgs(); + if (XRay.needsXRayRt()) { + AddLinkRuntimeLib(Args, CmdArgs, "xray"); + AddLinkRuntimeLib(Args, CmdArgs, "xray-basic"); + AddLinkRuntimeLib(Args, CmdArgs, "xray-fdr"); + } + // Otherwise link libSystem, then the dynamic runtime library, and finally any // target specific static runtime library. CmdArgs.push_back("-lSystem"); @@ -2251,9 +2258,15 @@ SanitizerMask Darwin::getSupportedSanitizers() const { Res |= SanitizerKind::Fuzzer; Res |= SanitizerKind::FuzzerNoLink; Res |= SanitizerKind::Function; + + // Prior to 10.9, macOS shipped a version of the C++ standard library without + // C++11 support. The same is true of iOS prior to version 5. These OS'es are + // incompatible with -fsanitize=vptr. + if (!(isTargetMacOS() && isMacosxVersionLT(10, 9)) + && !(isTargetIPhoneOS() && isIPhoneOSVersionLT(5, 0))) + Res |= SanitizerKind::Vptr; + if (isTargetMacOS()) { - if (!isMacosxVersionLT(10, 9)) - Res |= SanitizerKind::Vptr; if (IsX86_64) Res |= SanitizerKind::Thread; } else if (isTargetIOSSimulator() || isTargetTvOSSimulator()) { |