[cfi] Exclude ubsan runtime library from non-diag CFI builds (driver changes).
Split the CFI runtime in two: cfi and cfi_diag. The latter includes
UBSan runtime to allow printing diagnostics.
llvm-svn: 255736
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 01cef90..20a1035 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -2794,6 +2794,8 @@
StaticRuntimes.push_back("safestack");
if (SanArgs.needsCfiRt())
StaticRuntimes.push_back("cfi");
+ if (SanArgs.needsCfiDiagRt())
+ StaticRuntimes.push_back("cfi_diag");
}
// Should be called before we add system libraries (C++ ABI, libstdc++/libc++,