Add macOS and Windows release scripts#3
Draft
mondain wants to merge 6 commits into
Draft
Conversation
Mirrors the bash script's flag surface (-All/-Mingw/-Msvc) and target handling so the Windows MSVC artifact can be built from a native Developer PowerShell without needing MSYS2/Git Bash. MinGW path shells out to make (or mingw32-make); MSVC path invokes cl/lib directly over the same 8 sources, then packages with Compress-Archive + Get-FileHash to produce the same zip + .sha256 + BUILD_INFO layout. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds scripts/build-windows-arm64.ps1, a focused PowerShell driver that builds Windows-on-ARM64 release artifacts via either MinGW (cross compile through aarch64-w64-mingw32-gcc) or MSVC (native ARM64 from a VS ARM64 developer shell). Mirrors the package layout of build-windows.ps1. The MSVC path used to ship scalar-only because the NEON kernels and arch detection were gated on __aarch64__, which MSVC does not define. Widen the guards to (__aarch64__ || _M_ARM64) across internal.h, detect.c, the SDR and HDR dispatchers, the three NEON kernel files, and tonemap.c. detect.c gains a Windows branch alongside __APPLE__ that just sets has_neon = 1 since NEON is architecturally mandatory on Windows on ARM. The NEON kernels also relied on GCC-only constructs that MSVC rejects. Add FUSED_HOT and FUSED_PREFETCH portability macros in internal.h with MSVC ARM64 fallbacks (FUSED_PREFETCH uses __prefetch from <intrin.h>); replace per-variable __attribute__((aligned(N))) with the C11 _Alignas(N) keyword; drop the now-redundant local FUSED_HOT in tonemap.c. INSTALL.md documents the new script and the build-windows.ps1 variants alongside the existing bash flow. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
kdkd
reviewed
Apr 28, 2026
| } | ||
|
|
||
| function Invoke-MsvcBuild { | ||
| $commonSources = @( |
Owner
There was a problem hiding this comment.
Again, I'm really stupid about windows, but do we need to explicitly include the AVX src files here so that it doesn't just fall back to the scalar functions every time?
fused_hdr_init's tonemap_1x and "no valid steps" error paths called fused_hdr_free(ctx) while ctx->_internal was still NULL, which skipped the cleanup of state->sdr_temp[i] buffers populated by SDR-only steps in the per-step loop. Init now attaches state to ctx->_internal immediately after allocation so any subsequent error path goes through fused_hdr_free and releases everything. Drive-by fixes uncovered by the same review: - Internal-state OOM previously returned the misleading FUSED_ERR_NO_STEPS; added FUSED_ERR_OUT_OF_MEMORY (-5) and used it in both inits. - The "no SIMD support detected" notice bypassed log_warnings and wrote to stderr directly; it now routes through fused_log so callers using FUSED_LOG_SUPPRESS / FUSED_LOG_CALLBACK actually control it. - The misaligned-source warning used a process-wide static "warned" flag; the first context to hit it silenced every other context. Moved the flag onto fused_internal_t / fused_hdr_internal_t. - Restored the "tone map LUTs generated" diagnostic at the new FUSED_LOG_INFO (2) level (it was previously WARN, which polluted warning channels) and documented that info is routed via log_warnings so callbacks can filter on level. - fused_*_free now also resets effective_width/height for consistency. - Added trailing newline to the misalignment warning format strings. Docs updated: docs/API.md tables for log levels and error codes, README's "Platform support" wording, and a new CHANGELOG.md tracking all of the above under [Unreleased]. Verified: make lib + make funnelcake_test build clean under -Wall -Wextra -Werror; full test suite 83/83 on Apple Silicon. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I added windows and mac, just in-case as well as the std ubuntu20 docker builds for arm64 and amd64.