Skip to content

Commit 4ddb08d

Browse files
andycallclaude
andcommitted
fix: fix Windows MSYS2 DLL paths for cmake install
- Use MSYSTEM_PREFIX from environment instead of hardcoding C:/msys64/mingw64 - Make DLL install steps OPTIONAL since UCRT64 with clang/libc++ doesn't have libgcc or libstdc++ DLLs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9c3c5ec commit 4ddb08d

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

bridge/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ if(CMAKE_SYSTEM_NAME MATCHES "MSYS" OR MINGW)
2222

2323
# Install the DLL to the runtime binary directory
2424
# 'bin' is the standard destination for runtime executables and required DLLs
25-
install(FILES "${LIBPTHREAD_DLL_PATH}" DESTINATION bin)
26-
install(FILES "${LIBGCC_DLL_PATH}" DESTINATION bin)
27-
install(FILES "${LIBSTDCXX_DLL_PATH}" DESTINATION bin)
25+
# Use OPTIONAL since not all DLLs exist in every MSYS2 environment
26+
# (e.g., UCRT64 with clang/libc++ doesn't have libgcc or libstdc++)
27+
install(FILES "${LIBPTHREAD_DLL_PATH}" DESTINATION bin OPTIONAL)
28+
install(FILES "${LIBGCC_DLL_PATH}" DESTINATION bin OPTIONAL)
29+
install(FILES "${LIBSTDCXX_DLL_PATH}" DESTINATION bin OPTIONAL)
2830
endif()
2931

3032

scripts/tasks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ task('build-window-webf-lib', (done) => {
719719
...process.env,
720720
WEBF_JS_ENGINE: targetJSEngine,
721721
LIBRARY_OUTPUT_DIR: soBinaryDirectory,
722-
MSYSTEM_PREFIX: 'C:/msys64/mingw64'
722+
MSYSTEM_PREFIX: process.env.MSYSTEM_PREFIX || 'C:/msys64/mingw64'
723723
}
724724
});
725725

0 commit comments

Comments
 (0)