Author: Roland McGrath Date: 2020-01-30T14:21:23-08:00 New Revision: fdf31ae32dd2bddd9cc72ee7108f0c69bb2e637f
URL: https://github.com/llvm/llvm-project/commit/fdf31ae32dd2bddd9cc72ee7108f0c69bb2e637f DIFF: https://github.com/llvm/llvm-project/commit/fdf31ae32dd2bddd9cc72ee7108f0c69bb2e637f.diff LOG: [Fuchsia] Never link in implicit "system dependencies" of sanitizer runtimes This is never appropriate on Fuchsia and any future needs for system library dependencies of compiler-supplied runtimes will be addressed via .deplibs instead of driver hacks. Patch By: mcgrathr Differential Revision: https://reviews.llvm.org/D73734 Added: Modified: clang/lib/Driver/ToolChains/CommonArgs.cpp Removed: ################################################################################ diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp index 9d3dcd6dcaec..122872ff0da2 100644 --- a/clang/lib/Driver/ToolChains/CommonArgs.cpp +++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp @@ -583,6 +583,11 @@ static bool addSanitizerDynamicList(const ToolChain &TC, const ArgList &Args, void tools::linkSanitizerRuntimeDeps(const ToolChain &TC, ArgStringList &CmdArgs) { + // Fuchsia never needs these. Any sanitizer runtimes with system + // dependencies use the `.deplibs` feature instead. + if (TC.getTriple().isOSFuchsia()) + return; + // Force linking against the system libraries sanitizers depends on // (see PR15823 why this is necessary). CmdArgs.push_back("--no-as-needed"); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits