Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #635 +/- ##
=======================================
Coverage 73.26% 73.26%
=======================================
Files 69 69
Lines 3217 3217
=======================================
Hits 2357 2357
Misses 637 637
Partials 223 223
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds native Windows GNU Make support for ABE payload and executable builds.
Changes:
- Adds
cmd.exe-compatible environment setup. - Adds platform-specific directory creation and payload size reporting.
- Preserves POSIX build commands on Linux and macOS.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
Makefile |
Adds a native Windows build-windows recipe. |
crypto/windows/abe_native/Makefile.frag |
Adds Windows-compatible payload build commands. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
moonD4rk
left a comment
There was a problem hiding this comment.
Thanks — nice work, and it does work. I reproduced it on a Windows 10 VM (GNU Make 4.4.1 + Zig 0.16.0, no POSIX shell) and both targets build correctly. The %%I form is right too — native Make runs recipes through a temp batch file.
One problem: ifeq ($(OS),Windows_NT) checks the OS, but what changed is the shell. MSYS2 and Git Bash also set OS=Windows_NT while using sh, so they hit the cmd branch too — make payload fails outright, and make build-windows silently builds for the host (set "GOOS=..." in sh doesn't set the environment).
Checking the shell instead works:
# cmd echoes the quotes back, POSIX sh strips them
ifeq ($(shell echo "x"),"x")
WIN_CMD_SHELL := 1
endifTwo things that would shrink the diff:
build-windowsneeds no branch at all —build-windows: export GOOS := windows(plusGOARCH,CGO_ENABLED) lets Make set the environment directly. Verified on Make 3.81 and 4.4.1.ABE_MKDIR_CMDcan go —crypto/windows/payload/is tracked in git, so it always exists.
Also built ... - 75776 bytes vs POSIX (75776 bytes) — worth matching.
|
Superseded by #642, which applies the review feedback here:
|
|
Fixed in #642 |
What changed
cmd.exe-compatible directory creation and payload size reporting onWindows_NTGOOS,GOARCH, andCGO_ENABLEDwith Windowssetsyntax forbuild-windowscmd.exeWhy
Native Windows GNU Make falls back to
cmd.exewhen no POSIX shell is available. The existing recipes usemkdir -p, backslash shell continuations, andGOOS=windows ...environment prefixes, which fail with command syntax errors. This fixes bothmake payloadandmake build-windowsin that environment without changing the POSIX path.Validation
make build-windowssuccessfully on Windows with GNU Make 4.4.1 and Zig 0.16.0abe_extractor_amd64.binsuccessfully (75,776 bytes)