mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-08-03 15:33:12 +00:00
## Summary
Refines the release workflow so `-d:disableMarchNative` is applied only
where needed: Linux amd64 release builds.
## Details
The previous workflow change passed `-d:disableMarchNative`
unconditionally to all `libstorage` builds, including macOS and Windows.
That is broader than necessary because the observed failure is specific
to secp256k1's x86_64 inline assembly when `-march=native` expands
against certain Linux amd64 CPUs.
This change:
- Computes platform-specific Nim flags once via a GitHub Actions step
output.
- Adds `-d:disableMarchNative` only for `matrix.os == linux` and
`matrix.cpu == amd64`.
- Reuses that platform flag for both the main release binary and
`libstorage`.
- Preserves `NIMFLAGS` exported by the Nimbus setup action, such as
Linux stack-usage flags and macOS OpenMP-related flags.
- Keeps `${{ env.nim_flags }}` scoped to the main binary build so
binary-specific flags do not leak into `libstorage`.
- Preserves the existing macOS `STORAGE_LIB_PARAMS` linker flag for
`libstorage`.