From 33c3604b87cd70f879496494abda75f9f2ba03ad Mon Sep 17 00:00:00 2001 From: Kim Morrison <477956+kim-em@users.noreply.github.com> Date: Wed, 1 Apr 2026 03:33:58 +1100 Subject: [PATCH] fix: use correct shared library directory for Lake plugin on Windows (#13128) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR fixes the Windows dev build by using `CMAKE_RELATIVE_LIBRARY_OUTPUT_DIRECTORY` instead of the hardcoded `lib/lean` path for the Lake plugin. On Windows, DLLs must be placed next to executables in `bin/`, but the plugin path was hardcoded to `lib/lean`, causing stage0 DLLs to not be found. The `CMAKE_RELATIVE_LIBRARY_OUTPUT_DIRECTORY` variable was introduced precisely for this purpose — it resolves to `bin` on Windows and `lib/lean` elsewhere. Closes #13126 🤖 Prepared with Claude Code Co-authored-by: Claude Opus 4.6 (1M context) Co-authored-by: Sebastian Ullrich --- src/lakefile.toml.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lakefile.toml.in b/src/lakefile.toml.in index 7b71ae641e..ab3b6651e3 100644 --- a/src/lakefile.toml.in +++ b/src/lakefile.toml.in @@ -77,7 +77,7 @@ globs = ["Lake.*"] defaultFacets = ["static", "static.export"] # Load the previous stage's lake native code into lake's build process in order to prevent ABI # breakages from affecting bootstrapping. -moreLeanArgs = ["--plugin", "${PREV_STAGE}/lib/lean/libLake_shared${CMAKE_SHARED_LIBRARY_SUFFIX}"] +moreLeanArgs = ["--plugin", "${PREV_STAGE}/${CMAKE_RELATIVE_LIBRARY_OUTPUT_DIRECTORY}/libLake_shared${CMAKE_SHARED_LIBRARY_SUFFIX}"] [[lean_lib]] name = "LakeMain"