Package: llvm-toolchain-5.0 / 1:5.0.1-2~bpo9+1

libfuzzer-path.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Index: llvm-toolchain-5.0-5.0.1/clang/lib/Driver/ToolChains/CommonArgs.cpp
===================================================================
--- llvm-toolchain-5.0-5.0.1.orig/clang/lib/Driver/ToolChains/CommonArgs.cpp
+++ llvm-toolchain-5.0-5.0.1/clang/lib/Driver/ToolChains/CommonArgs.cpp
@@ -600,9 +600,8 @@ collectSanitizerRuntimes(const ToolChain
 static void addLibFuzzerRuntime(const ToolChain &TC,
                                 const ArgList &Args,
                                 ArgStringList &CmdArgs) {
-    StringRef ParentDir = llvm::sys::path::parent_path(TC.getDriver().InstalledDir);
-    SmallString<128> P(ParentDir);
-    llvm::sys::path::append(P, "lib", "libLLVMFuzzer.a");
+    SmallString<128> P;
+    llvm::sys::path::append(P, TC.getDriver().Dir, "/../lib" CLANG_LIBDIR_SUFFIX, "libFuzzer.a");
     CmdArgs.push_back(Args.MakeArgString(P));
     TC.AddCXXStdlibLibArgs(Args, CmdArgs);
 }