What changed, and why it matters
This commit adds a new automated build job for Windows (x86_64-w64-mingw32) to the project's GitHub Actions workflow. It also adjusts the build script to use a specific 'posix' variant of the Windows cross-compiler. There is no indication of a security vulnerability or malicious change in the diff itself.
No security action required. Review the build script and workflow for correctness and reproducibility as part of normal CI maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit introduces a new build-x86_64-w64-mingw32 job in .github/workflows/build-monero-c.yml that builds monero_c for Windows, uploads the resulting DLLs (monero_libwallet2_api_c.dll, libwinpthread-1.dll, libssp-0.dll), and places them into the windows/ directory during the release job. In scripts/build-moneroc.sh, two update-alternatives commands are added to select the POSIX-threaded MinGW GCC/G++ variants. This is a build-system/infrastructure change with no direct code modifications to wallet logic or security-sensitive behavior.
Changed components
.github/workflows/build-monero-c.ymlscripts/build-moneroc.shInspect captured patch +45 / −0
diff --git a/.github/workflows/build-monero-c.yml b/.github/workflows/build-monero-c.yml
index 924589a..2d8ec36 100644
--- a/.github/workflows/build-monero-c.yml
+++ b/.github/workflows/build-monero-c.yml
@@ -108,6 +108,33 @@ jobs:
name: armv7a-linux-androideabi
path: artifacts/libmonero_libwallet2_api_c.so
+ build-x86_64-w64-mingw32:
+ name: Build x86_64-w64-mingw32
+ runs-on: ubuntu-latest
+ container:
+ image: debian:bookworm
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+
+ - name: Build monero_c
+ env:
+ TARGET_ARCH: x86_64-w64-mingw32
+ run: scripts/build-moneroc.sh
+
+ - name: Copy built libraries
+ run: |
+ mkdir -p artifacts
+ cp monero_c/monero_libwallet2_api_c/build/x86_64-w64-mingw32/libwallet2_api_c.dll artifacts/monero_libwallet2_api_c.dll
+ cp monero_c/release/monero/x86_64-w64-mingw32_libwinpthread-1.dll artifacts/libwinpthread-1.dll
+ cp monero_c/release/monero/x86_64-w64-mingw32_libssp-0.dll artifacts/libssp-0.dll
+
+ - name: Upload artifact
+ uses: actions/upload-artifact@v4
+ with:
+ name: x86_64-w64-mingw32
+ path: artifacts/
+
build-ios-targets:
name: Build ${{ matrix.target }}
runs-on: macos-15
@@ -232,6 +259,7 @@ jobs:
- build-x86_64-linux-android
- build-aarch64-linux-android
- build-armv7a-linux-androideabi
+ - build-x86_64-w64-mingw32
- create-ios-xcframework
steps:
- name: Checkout repository
@@ -267,6 +295,12 @@ jobs:
name: MoneroWallet-xcframework
path: artifacts/MoneroWallet.xcframework
+ - name: Download x86_64-w64-mingw32 artifact
+ uses: actions/download-artifact@v4
+ with:
+ name: x86_64-w64-mingw32
+ path: artifacts/x86_64-w64-mingw32
+
- name: Place libraries in correct locations
run: |
# Linux x86_64
@@ -285,6 +319,11 @@ jobs:
rm -rf ios/Frameworks/MoneroWallet.xcframework
cp -R artifacts/MoneroWallet.xcframework ios/Frameworks/MoneroWallet.xcframework
+ # Windows x86_64
+ cp artifacts/x86_64-w64-mingw32/monero_libwallet2_api_c.dll windows/monero_libwallet2_api_c.dll
+ cp artifacts/x86_64-w64-mingw32/libwinpthread-1.dll windows/libwinpthread-1.dll
+ cp artifacts/x86_64-w64-mingw32/libssp-0.dll windows/libssp-0.dll
+
- name: Fix Linux library executable stack
run: scripts/fix-linux-moneroc-execstack.sh
@@ -309,6 +348,9 @@ jobs:
- `android/app/src/main/jniLibs/x86_64/libmonero_libwallet2_api_c.so` (x86_64-linux-android)
- `android/app/src/main/jniLibs/arm64-v8a/libmonero_libwallet2_api_c.so` (aarch64-linux-android)
- `android/app/src/main/jniLibs/armeabi-v7a/libmonero_libwallet2_api_c.so` (armv7a-linux-androideabi)
+ - `windows/monero_libwallet2_api_c.dll` (x86_64-w64-mingw32)
+ - `windows/libwinpthread-1.dll` (x86_64-w64-mingw32)
+ - `windows/libssp-0.dll` (x86_64-w64-mingw32)
- `ios/Frameworks/MoneroWallet.xcframework` (aarch64-apple-ios + aarch64-apple-iossimulator)
Built from [monero_c](https://github.com/vtnerd/monero_c) branch `lwsf`.
diff --git a/scripts/build-moneroc.sh b/scripts/build-moneroc.sh
index c2850a9..d6504e2 100755
--- a/scripts/build-moneroc.sh
+++ b/scripts/build-moneroc.sh
@@ -6,6 +6,9 @@ apt upgrade -y
apt install -y build-essential pkg-config autoconf libtool ccache make cmake gcc g++ git curl \
lbzip2 libtinfo5 gperf unzip python-is-python3 llvm gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64
+update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
+update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
+
git config --global --add safe.directory '*'
git config --global user.email "info@magicgrants.org"
git config --global user.name "MAGIC Grants"
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.