diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-12-01 01:02:45 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-12-01 01:02:45 +0000 |
| commit | 06d87f1e5d6215e5dbc2a8b15608bbdd7bc1da90 (patch) | |
| tree | 8624c4bc981da9692746461300f94603a750920d /clang/lib/Driver | |
| parent | c401755f4660d6b42ed74d53e580e4a5f8c2ee9f (diff) | |
| download | bcm5719-llvm-06d87f1e5d6215e5dbc2a8b15608bbdd7bc1da90.tar.gz bcm5719-llvm-06d87f1e5d6215e5dbc2a8b15608bbdd7bc1da90.zip | |
Remove restriction on combining ubsan with asan or tsan. This has worked for a while.
llvm-svn: 169066
Diffstat (limited to 'clang/lib/Driver')
| -rw-r--r-- | clang/lib/Driver/Tools.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 9beba88b149..89e7d8f16c1 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -1466,14 +1466,12 @@ SanitizerArgs::SanitizerArgs(const Driver &D, const ArgList &Args) { } // Only one runtime library can be used at once. - // FIXME: Allow Ubsan to be combined with the other two. bool NeedsAsan = needsAsanRt(); bool NeedsTsan = needsTsanRt(); - bool NeedsUbsan = needsUbsanRt(); - if (NeedsAsan + NeedsTsan + NeedsUbsan > 1) + if (NeedsAsan && NeedsTsan) D.Diag(diag::err_drv_argument_not_allowed_with) - << lastArgumentForKind(D, Args, NeedsAsan ? NeedsAsanRt : NeedsTsanRt) - << lastArgumentForKind(D, Args, NeedsUbsan ? NeedsUbsanRt : NeedsTsanRt); + << lastArgumentForKind(D, Args, NeedsAsanRt) + << lastArgumentForKind(D, Args, NeedsTsanRt); // If -fsanitize contains extra features of ASan, it should also // explicitly contain -fsanitize=address. @@ -1545,6 +1543,7 @@ static void addUbsanRTLinux(const ToolChain &TC, const ArgList &Args, TC.getArchName() + ".a")); CmdArgs.push_back(Args.MakeArgString(LibUbsan)); CmdArgs.push_back("-lpthread"); + CmdArgs.push_back("-export-dynamic"); } } |

