From 449d10c4fe59a30b885c6bdb9569802ac78eff03 Mon Sep 17 00:00:00 2001 From: Jacob Pedersen Date: Thu, 18 Jun 2026 00:27:09 +0200 Subject: [PATCH] =?UTF-8?q?don't=20route=20link=20step=20through=20ccache?= =?UTF-8?q?=20=E2=80=94=20linker=20calls=20are=20uncacheable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CPPBuild/Target.cpp | 4 +++- CPPBuild/Target.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CPPBuild/Target.cpp b/CPPBuild/Target.cpp index 5921982..2d173ff 100644 --- a/CPPBuild/Target.cpp +++ b/CPPBuild/Target.cpp @@ -571,7 +571,7 @@ void Target::link() File::writeAllText(responsefilename, responsefile); - std::string cmdline = ccpp + " \"@" + responsefilename + "\""; + std::string cmdline = linker + " \"@" + responsefilename + "\""; runCommand(cmdline, "Could not link " + outputFile); } } @@ -992,6 +992,7 @@ void Target::loadTarget(BuildSetup& setup, PackageManager* packages) { cc = "emcc"; ccpp = "emcc"; + linker = "emcc"; ar = "emar"; isEmcc = true; } @@ -1014,6 +1015,7 @@ void Target::loadTarget(BuildSetup& setup, PackageManager* packages) isGcc = true; #endif + linker = ccpp; if (setup.ccache) { cc = "ccache " + cc; diff --git a/CPPBuild/Target.h b/CPPBuild/Target.h index db4caeb..e044ff9 100644 --- a/CPPBuild/Target.h +++ b/CPPBuild/Target.h @@ -62,7 +62,7 @@ class Target bool isMsvc = false; bool isEmcc = false; - std::string cc, ccpp; + std::string cc, ccpp, linker; std::string ar; std::string cflags, cxxflags; std::string linkFlags;