From 3f7e960723c3581b61cfa0be535e6217354e0d2d Mon Sep 17 00:00:00 2001 From: LLVM Packaging Team Date: Mon, 23 Sep 2024 13:23:31 +0200 Subject: [PATCH] wasm-ld-path =================================================================== Gbp-Pq: Topic wasm Gbp-Pq: Name wasm-ld-path.diff --- clang/lib/Driver/ToolChains/WebAssembly.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; } -- 2.30.2