From: LLVM Packaging Team Date: Fri, 14 Mar 2025 09:48:31 +0000 (+0100) Subject: wasm-ld-path X-Git-Tag: archive/raspbian/1%19.1.7-3+rpi1^2~19 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5521431393e6360b46ed12ed26575e8b9aa2cd21;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; }