From: LLVM Packaging Team Date: Mon, 23 Sep 2024 11:23:31 +0000 (+0200) Subject: wasm-ld-path X-Git-Tag: archive/raspbian/1%19.1.3-1+rpi1~1^2~21 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3f7e960723c3581b61cfa0be535e6217354e0d2d;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 0b16b66036..21ff06a07a 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; @@ -241,7 +246,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; }