wasm-ld-path
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Mon, 23 Sep 2024 11:23:31 +0000 (13:23 +0200)
committerSylvestre Ledru <sylvestre@debian.org>
Mon, 23 Sep 2024 11:23:31 +0000 (13:23 +0200)
===================================================================

Gbp-Pq: Topic wasm
Gbp-Pq: Name wasm-ld-path.diff

clang/lib/Driver/ToolChains/WebAssembly.cpp

index 0b16b660364f0794a9b59ed4ba91d8ddf5bf414b..21ff06a07a3ce8fce4cababe12a613906d0eb2c3 100644 (file)
 #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; }