File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -177,6 +177,24 @@ perf-build-m3:
177177 fi
178178 ./ scripts/ prune_perf_build_target.sh ./ target/ release/ codex
179179
180+ # Build an Apple M3-tuned codex binary with faster release rebuild settings for
181+ # local iteration. This writes the same `./target/release/codex` path as
182+ # `perf-build-m3`, but trades some final optimization for faster compile/link.
183+ perf-build-m3-fast :
184+ #!/usr/bin/env bash
185+ set -euo pipefail
186+ export CARGO_PROFILE_RELEASE_PANIC=abort
187+ export CARGO_PROFILE_RELEASE_LTO=thin
188+ export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=16
189+ EXTRA_FLAGS=" ${CODEX_PERF_EXTRA_FLAGS:-}"
190+ export RUSTFLAGS=" ${RUSTFLAGS:+$RUSTFLAGS }-C target-cpu=apple-m3${EXTRA_FLAGS:+ $EXTRA_FLAGS}"
191+ if [ -n " ${CODEX_PERF_FEATURES:-}" ]; then
192+ cargo build -p codex-cli --release --locked --features " $CODEX_PERF_FEATURES"
193+ else
194+ cargo build -p codex-cli --release --locked
195+ fi
196+ ./ scripts/ prune_perf_build_target.sh ./ target/ release/ codex
197+
180198# Build an Apple M3-tuned codex binary using profile-guided optimization.
181199perf-build-m3-pgo :
182200 #!/usr/bin/env bash
You can’t perform that action at this time.
0 commit comments