Commit e898705
authored
[BRE-2024] Fix x86_64 macOS NAPI build producing ARM64 binaries (#1531)
## ποΈ Tracking
https://bitwarden.atlassian.net/browse/BRE-2024
## π Objective
When [BRE-1302](https://bitwarden.atlassian.net/browse/BRE-1302)
upgraded the macOS runner from `macos-13` (Intel) to `macos-15` (ARM64),
the `x86_64` build job began running on ARM64 hardware. The build
command `npm run build` uses the `--platform` flag, which auto-detects
the host architecture rather than respecting the target triple. This
caused the `x86_64` job to build `ARM64` binaries instead.
Changes:
- Add `build-x64` script to `package.json` that explicitly targets
`x86_64-apple-darwin`, mirroring the existing `build-arm64` pattern
- Update `build-napi.yml` to use `npm run build-x64` for the `x86_64`
job
This ensures the `x86_64 job` produces `sdk-napi.darwin-x64.node`
(Intel) instead of incorrectly producing `sdk-napi.darwin-arm64.node`
(ARM).
## π¨ Breaking Changes
<!-- If this PR introduces a breaking change for any downstream
consumer, call it out clearly.
For breaking changes:
1. Describe what changed in the public interface
2. Explain why the change was necessary
3. Provide migration steps for consumers
4. Link to any paired consumer PRs if needed
Otherwise, you can remove this section. -->
[BRE-1302]:
https://bitwarden.atlassian.net/browse/BRE-1302?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ1 parent 2f2c866 commit e898705
2 files changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
0 commit comments