Skip to content

fix: Make target architecture configurable, target westmere in GA.#2660

Merged
kevaundray merged 1 commit into
masterfrom
cl/bb_target_arch
Oct 4, 2023
Merged

fix: Make target architecture configurable, target westmere in GA.#2660
kevaundray merged 1 commit into
masterfrom
cl/bb_target_arch

Conversation

@charlielye

@charlielye charlielye commented Oct 3, 2023

Copy link
Copy Markdown
Contributor

As title.
I'm assuming(!) that westmere is old enough to not cause issues, but havent actually fired up some old intel machine to test this works where the old one didn't.

While it's good we can now do this, I'm not totally sure why we should need a backend to be present.
Maybe nargo can have a no backend mode where it makes some assumptions about what's available (printing a warning that its assuming), but still allows one to produce acir.

Because in theory, none of our sandbox users should really need a backend to be present.

@charlielye charlielye requested a review from kevaundray October 3, 2023 19:27
@charlielye charlielye changed the title Make target architecture configurable, target westmere in GA. fix: Make target architecture configurable, target westmere in GA. Oct 3, 2023
@kevaundray kevaundray merged commit 3cb9639 into master Oct 4, 2023
@kevaundray kevaundray deleted the cl/bb_target_arch branch October 4, 2023 12:16
spalladino pushed a commit that referenced this pull request Oct 4, 2023
🤖 I have created a release *beep* *boop*
---


<details><summary>aztec-packages: 0.8.2</summary>

##
[0.8.2](aztec-packages-v0.8.1...aztec-packages-v0.8.2)
(2023-10-04)


### Features

* Constrain return notes from oracle call.
([#2639](#2639))
([248be1b](248be1b))
* Multiple pixies 1 Sandbox
([#2492](#2492))
([572d572](572d572))
* Take an optional owner to create the initialization nullifier
([#2647](#2647))
([fefc443](fefc443))


### Bug Fixes

* Add missing properties to deployed packages
([#2678](#2678))
([343df30](343df30))
* Include ignition data in package or save after 1st download
([#2591](#2591))
([d5e9f8b](d5e9f8b)),
closes
[#2445](#2445)
* Make target architecture configurable, target westmere in GA.
([#2660](#2660))
([3cb9639](3cb9639))
* Removal of setting private data root in kernel prover
([#2671](#2671))
([6a2cc28](6a2cc28)),
closes
[#778](#778)


### Miscellaneous

* 1 deploy_dockerhub CI task
([#2670](#2670))
([dff396c](dff396c))
* Check that portal address is saved
([#2641](#2641))
([9ebef6e](9ebef6e))
* Fixes in deploy scripts
([#2659](#2659))
([f44568b](f44568b))
* Measure circuit simulation times and input/output sizes
([#2663](#2663))
([027f7ec](027f7ec))
* Remove sandbox base image and force_deploy_build. Generalise in
check_rebuild.
([#2645](#2645))
([805fe18](805fe18))
</details>

<details><summary>barretenberg.js: 0.8.2</summary>

##
[0.8.2](barretenberg.js-v0.8.1...barretenberg.js-v0.8.2)
(2023-10-04)


### Miscellaneous

* **barretenberg.js:** Synchronize aztec-packages versions
</details>

<details><summary>barretenberg: 0.8.2</summary>

##
[0.8.2](barretenberg-v0.8.1...barretenberg-v0.8.2)
(2023-10-04)


### Bug Fixes

* Include ignition data in package or save after 1st download
([#2591](#2591))
([d5e9f8b](d5e9f8b)),
closes
[#2445](#2445)
* Make target architecture configurable, target westmere in GA.
([#2660](#2660))
([3cb9639](3cb9639))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
AztecBot added a commit to AztecProtocol/barretenberg that referenced this pull request Oct 5, 2023
🤖 I have created a release *beep* *boop*
---


<details><summary>aztec-packages: 0.8.2</summary>

##
[0.8.2](AztecProtocol/aztec-packages@aztec-packages-v0.8.1...aztec-packages-v0.8.2)
(2023-10-04)


### Features

* Constrain return notes from oracle call.
([#2639](AztecProtocol/aztec-packages#2639))
([248be1b](AztecProtocol/aztec-packages@248be1b))
* Multiple pixies 1 Sandbox
([#2492](AztecProtocol/aztec-packages#2492))
([572d572](AztecProtocol/aztec-packages@572d572))
* Take an optional owner to create the initialization nullifier
([#2647](AztecProtocol/aztec-packages#2647))
([fefc443](AztecProtocol/aztec-packages@fefc443))


### Bug Fixes

* Add missing properties to deployed packages
([#2678](AztecProtocol/aztec-packages#2678))
([343df30](AztecProtocol/aztec-packages@343df30))
* Include ignition data in package or save after 1st download
([#2591](AztecProtocol/aztec-packages#2591))
([d5e9f8b](AztecProtocol/aztec-packages@d5e9f8b)),
closes
[#2445](AztecProtocol/aztec-packages#2445)
* Make target architecture configurable, target westmere in GA.
([#2660](AztecProtocol/aztec-packages#2660))
([3cb9639](AztecProtocol/aztec-packages@3cb9639))
* Removal of setting private data root in kernel prover
([#2671](AztecProtocol/aztec-packages#2671))
([6a2cc28](AztecProtocol/aztec-packages@6a2cc28)),
closes
[#778](AztecProtocol/aztec-packages#778)


### Miscellaneous

* 1 deploy_dockerhub CI task
([#2670](AztecProtocol/aztec-packages#2670))
([dff396c](AztecProtocol/aztec-packages@dff396c))
* Check that portal address is saved
([#2641](AztecProtocol/aztec-packages#2641))
([9ebef6e](AztecProtocol/aztec-packages@9ebef6e))
* Fixes in deploy scripts
([#2659](AztecProtocol/aztec-packages#2659))
([f44568b](AztecProtocol/aztec-packages@f44568b))
* Measure circuit simulation times and input/output sizes
([#2663](AztecProtocol/aztec-packages#2663))
([027f7ec](AztecProtocol/aztec-packages@027f7ec))
* Remove sandbox base image and force_deploy_build. Generalise in
check_rebuild.
([#2645](AztecProtocol/aztec-packages#2645))
([805fe18](AztecProtocol/aztec-packages@805fe18))
</details>

<details><summary>barretenberg.js: 0.8.2</summary>

##
[0.8.2](AztecProtocol/aztec-packages@barretenberg.js-v0.8.1...barretenberg.js-v0.8.2)
(2023-10-04)


### Miscellaneous

* **barretenberg.js:** Synchronize aztec-packages versions
</details>

<details><summary>barretenberg: 0.8.2</summary>

##
[0.8.2](AztecProtocol/aztec-packages@barretenberg-v0.8.1...barretenberg-v0.8.2)
(2023-10-04)


### Bug Fixes

* Include ignition data in package or save after 1st download
([#2591](AztecProtocol/aztec-packages#2591))
([d5e9f8b](AztecProtocol/aztec-packages@d5e9f8b)),
closes
[#2445](AztecProtocol/aztec-packages#2445)
* Make target architecture configurable, target westmere in GA.
([#2660](AztecProtocol/aztec-packages#2660))
([3cb9639](AztecProtocol/aztec-packages@3cb9639))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Maddiaa0 pushed a commit that referenced this pull request Oct 6, 2023
…2660)

As title.
I'm assuming(!) that westmere is old enough to not cause issues, but
havent actually fired up some old intel machine to test this works where
the old one didn't.

While it's good we can now do this, I'm not totally sure why we should
*need* a backend to be present.
Maybe nargo can have a no backend mode where it makes some assumptions
about what's available (printing a warning that its assuming), but still
allows one to produce acir.

Because in theory, none of our sandbox users should really *need* a
backend to be present.
Maddiaa0 pushed a commit that referenced this pull request Oct 6, 2023
🤖 I have created a release *beep* *boop*
---


<details><summary>aztec-packages: 0.8.2</summary>

##
[0.8.2](aztec-packages-v0.8.1...aztec-packages-v0.8.2)
(2023-10-04)


### Features

* Constrain return notes from oracle call.
([#2639](#2639))
([248be1b](248be1b))
* Multiple pixies 1 Sandbox
([#2492](#2492))
([572d572](572d572))
* Take an optional owner to create the initialization nullifier
([#2647](#2647))
([fefc443](fefc443))


### Bug Fixes

* Add missing properties to deployed packages
([#2678](#2678))
([343df30](343df30))
* Include ignition data in package or save after 1st download
([#2591](#2591))
([d5e9f8b](d5e9f8b)),
closes
[#2445](#2445)
* Make target architecture configurable, target westmere in GA.
([#2660](#2660))
([3cb9639](3cb9639))
* Removal of setting private data root in kernel prover
([#2671](#2671))
([6a2cc28](6a2cc28)),
closes
[#778](#778)


### Miscellaneous

* 1 deploy_dockerhub CI task
([#2670](#2670))
([dff396c](dff396c))
* Check that portal address is saved
([#2641](#2641))
([9ebef6e](9ebef6e))
* Fixes in deploy scripts
([#2659](#2659))
([f44568b](f44568b))
* Measure circuit simulation times and input/output sizes
([#2663](#2663))
([027f7ec](027f7ec))
* Remove sandbox base image and force_deploy_build. Generalise in
check_rebuild.
([#2645](#2645))
([805fe18](805fe18))
</details>

<details><summary>barretenberg.js: 0.8.2</summary>

##
[0.8.2](barretenberg.js-v0.8.1...barretenberg.js-v0.8.2)
(2023-10-04)


### Miscellaneous

* **barretenberg.js:** Synchronize aztec-packages versions
</details>

<details><summary>barretenberg: 0.8.2</summary>

##
[0.8.2](barretenberg-v0.8.1...barretenberg-v0.8.2)
(2023-10-04)


### Bug Fixes

* Include ignition data in package or save after 1st download
([#2591](#2591))
([d5e9f8b](d5e9f8b)),
closes
[#2445](#2445)
* Make target architecture configurable, target westmere in GA.
([#2660](#2660))
([3cb9639](3cb9639))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
AztecBot pushed a commit that referenced this pull request Apr 24, 2026
## Summary

Supersedes #21685. Fixes SIGILL crashes on ARM64 Mac devcontainers caused by zig's `-target native` detecting host CPU features (SVE on Graviton) and emitting instructions Apple Silicon can't execute.

#21611 tried to fix this with `-march=generic` from cmake, but that's not a valid AArch64 flag — zig silently ignored it. #21685 fixed ARM only; this PR also fixes x86 and simplifies the architecture targeting:

- **zig wrappers**: Replace `-target native` with explicit `aarch64`/`x86_64` targets on both architectures, preventing host-specific CPU feature detection (SVE, AVX-512, etc.). Error on unsupported architectures.
- **arch.cmake**: Hardcode `-march=skylake` on x86, skip on ARM. Remove `TARGET_ARCH` variable and auto-detection logic entirely.
- **CMakePresets.json**: Remove all `TARGET_ARCH` entries from cross-compile presets (invalid `generic` on arm64-linux, redundant `skylake` on amd64-linux/windows).

## Note on TARGET_ARCH removal

`TARGET_ARCH` was originally introduced in #2660 (Oct 2023) so the `publish-bb.yml` GitHub Actions workflow could target `westmere` for broader x86 compatibility when shipping standalone bb binaries. That workflow was deleted in #12347 (Feb 2025), so there are no remaining consumers of configurable arch targeting.

If bb binaries are ever distributed to end users on pre-skylake x86 hardware again, this would need to be reintroduced (e.g. via `-DCMAKE_CXX_FLAGS=-march=westmere` or a new variable). For now, all consumers are assumed to be on modern hardware where skylake is the minimum.

## Test plan
- [ ] CI barretenberg build passes on ARM and x86
- [ ] M3 devcontainer: `NO_CACHE=1` rebuild produces working binaries (no SIGILL)
chrismarino pushed a commit to chrismarino/aztec-packages that referenced this pull request May 5, 2026
…1682)

## Summary

Supersedes AztecProtocol#21685. Fixes SIGILL crashes on ARM64 Mac devcontainers
caused by zig's `-target native` detecting host CPU features (SVE on
Graviton) and emitting instructions Apple Silicon can't execute.

AztecProtocol#21611 tried to fix this with `-march=generic` from cmake, but that's
not a valid AArch64 flag — zig silently ignored it. AztecProtocol#21685 fixed ARM
only; this PR also fixes x86 and simplifies the architecture targeting:

- **zig wrappers**: Replace `-target native` with explicit
`aarch64`/`x86_64` targets on both architectures, preventing
host-specific CPU feature detection (SVE, AVX-512, etc.). Error on
unsupported architectures.
- **arch.cmake**: Hardcode `-march=skylake` on x86, skip on ARM. Remove
`TARGET_ARCH` variable and auto-detection logic entirely.
- **CMakePresets.json**: Remove all `TARGET_ARCH` entries from
cross-compile presets (invalid `generic` on arm64-linux, redundant
`skylake` on amd64-linux/windows).

## Note on TARGET_ARCH removal

`TARGET_ARCH` was originally introduced in AztecProtocol#2660 (Oct 2023) so the
`publish-bb.yml` GitHub Actions workflow could target `westmere` for
broader x86 compatibility when shipping standalone bb binaries. That
workflow was deleted in AztecProtocol#12347 (Feb 2025), so there are no remaining
consumers of configurable arch targeting.

If bb binaries are ever distributed to end users on pre-skylake x86
hardware again, this would need to be reintroduced (e.g. via
`-DCMAKE_CXX_FLAGS=-march=westmere` or a new variable). For now, all
consumers are assumed to be on modern hardware where skylake is the
minimum.

## Test plan
- [ ] CI barretenberg build passes on ARM and x86
- [ ] M3 devcontainer: `NO_CACHE=1` rebuild produces working binaries
(no SIGILL)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants