Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions barretenberg/cpp/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ else
export native_preset=${NATIVE_PRESET:-clang20-no-avm}
fi
export hash=$(hash_str $(../../avm-transpiler/bootstrap.sh hash) $(cache_content_hash .rebuild_patterns))
export native_build_dir=$(scripts/preset-build-dir $native_preset)

# Injects version number into a given bb binary.
# Means we don't actually need to rebuild bb to release a new version if code hasn't changed.
Expand Down
6 changes: 4 additions & 2 deletions barretenberg/cpp/cmake/arch.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ if(WASM)
add_compile_options(-fno-exceptions -fno-slp-vectorize)
endif()

# Auto-detect TARGET_ARCH if not explicitly set.
# Auto-detect TARGET_ARCH if not explicitly set (native builds only).
# Use 'skylake' on x86_64 (matches our cross-compile presets) and 'generic' on ARM
# to avoid emitting CPU-specific instructions (e.g. SVE on Graviton) that break on
# other ARM machines like Apple Silicon.
if(NOT WASM AND NOT TARGET_ARCH)
# Skip auto-detection when cross-compiling — the toolchain (e.g. Zig -mcpu) handles
# architecture targeting, and injecting -march here conflicts with it.
if(NOT WASM AND NOT TARGET_ARCH AND NOT CMAKE_CROSSCOMPILING)
if(ARM)
set(TARGET_ARCH "generic")
else()
Expand Down
Loading