From: LLVM Packaging Team Date: Wed, 30 Oct 2024 20:56:13 +0000 (+0100) Subject: wasm-ld-path X-Git-Tag: archive/raspbian/1%19.1.3-1+rpi1~19 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=20ad911c585d7d1f03db65a7c1ba02515c9e268f;p=llvm-toolchain-19.git wasm-ld-path =================================================================== Gbp-Pq: Topic wasm Gbp-Pq: Name wasm-ld-path.diff --- diff --git a/clang/lib/Driver/ToolChains/WebAssembly.cpp b/clang/lib/Driver/ToolChains/WebAssembly.cpp index 60bd97e0ee..b78bc366ad 100644 --- a/clang/lib/Driver/ToolChains/WebAssembly.cpp +++ b/clang/lib/Driver/ToolChains/WebAssembly.cpp @@ -20,6 +20,11 @@ #include "llvm/Support/Path.h" #include "llvm/Support/VirtualFileSystem.h" +#include "llvm/Config/llvm-config.h" // for LLVM_VERSION_MAJOR + +#define TOSTR2(X) #X +#define TOSTR(X) TOSTR2(X) + using namespace clang::driver; using namespace clang::driver::tools; using namespace clang::driver::toolchains; @@ -243,7 +248,7 @@ WebAssembly::WebAssembly(const Driver &D, const llvm::Triple &Triple, const char *WebAssembly::getDefaultLinker() const { if (getOS() == "wasip2") return "wasm-component-ld"; - return "wasm-ld"; + return "wasm-ld-" TOSTR(LLVM_VERSION_MAJOR); } bool WebAssembly::IsMathErrnoDefault() const { return false; }