summaryrefslogtreecommitdiff
path: root/lib/Driver/ToolChains/Solaris.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Driver/ToolChains/Solaris.cpp')
-rw-r--r--lib/Driver/ToolChains/Solaris.cpp27
1 files changed, 5 insertions, 22 deletions
diff --git a/lib/Driver/ToolChains/Solaris.cpp b/lib/Driver/ToolChains/Solaris.cpp
index b48edbb08ee6..38f24d4cf7e7 100644
--- a/lib/Driver/ToolChains/Solaris.cpp
+++ b/lib/Driver/ToolChains/Solaris.cpp
@@ -1,9 +1,8 @@
//===--- Solaris.cpp - Solaris ToolChain Implementations --------*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -66,10 +65,6 @@ void solaris::Linker::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-Bdynamic");
if (Args.hasArg(options::OPT_shared)) {
CmdArgs.push_back("-shared");
- } else {
- CmdArgs.push_back("--dynamic-linker");
- CmdArgs.push_back(
- Args.MakeArgString(getToolChain().GetFilePath("ld.so.1")));
}
// libpthread has been folded into libc since Solaris 10, no need to do
@@ -97,13 +92,6 @@ void solaris::Linker::ConstructJob(Compilation &C, const JobAction &JA,
Args.MakeArgString(getToolChain().GetFilePath("crtbegin.o")));
}
- // Provide __start___sancov_guards. Solaris ld doesn't automatically create
- // __start_SECNAME labels.
- CmdArgs.push_back("--whole-archive");
- CmdArgs.push_back(
- getToolChain().getCompilerRTArgString(Args, "sancov_begin", false));
- CmdArgs.push_back("--no-whole-archive");
-
getToolChain().AddFilePathLibArgs(Args, CmdArgs);
Args.AddAllArgs(CmdArgs, {options::OPT_L, options::OPT_T_Group,
@@ -132,13 +120,6 @@ void solaris::Linker::ConstructJob(Compilation &C, const JobAction &JA,
linkSanitizerRuntimeDeps(getToolChain(), CmdArgs);
}
- // Provide __stop___sancov_guards. Solaris ld doesn't automatically create
- // __stop_SECNAME labels.
- CmdArgs.push_back("--whole-archive");
- CmdArgs.push_back(
- getToolChain().getCompilerRTArgString(Args, "sancov_end", false));
- CmdArgs.push_back("--no-whole-archive");
-
if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) {
CmdArgs.push_back(
Args.MakeArgString(getToolChain().GetFilePath("crtend.o")));
@@ -200,6 +181,8 @@ SanitizerMask Solaris::getSupportedSanitizers() const {
// FIXME: Omit X86_64 until 64-bit support is figured out.
if (IsX86) {
Res |= SanitizerKind::Address;
+ Res |= SanitizerKind::PointerCompare;
+ Res |= SanitizerKind::PointerSubtract;
}
Res |= SanitizerKind::Vptr;
return Res;