File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -112,6 +112,24 @@ perf-build-local:
112112 fi
113113 ./ scripts/ prune_perf_build_target.sh ./ target/ release/ codex
114114
115+ # Build a machine-local codex binary with faster release rebuild settings for
116+ # local iteration. This writes the same `./target/release/codex` path as
117+ # `perf-build-local`, but trades some final optimization for faster compile/link.
118+ perf-build-local-fast :
119+ #!/usr/bin/env bash
120+ set -euo pipefail
121+ export CARGO_PROFILE_RELEASE_PANIC=abort
122+ export CARGO_PROFILE_RELEASE_LTO=thin
123+ export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=16
124+ EXTRA_FLAGS=" ${CODEX_PERF_EXTRA_FLAGS:-}"
125+ export RUSTFLAGS=" ${RUSTFLAGS:+$RUSTFLAGS }-C target-cpu=native${EXTRA_FLAGS:+ $EXTRA_FLAGS}"
126+ if [ -n " ${CODEX_PERF_FEATURES:-}" ]; then
127+ cargo build -p codex-cli --release --locked --features " $CODEX_PERF_FEATURES"
128+ else
129+ cargo build -p codex-cli --release --locked
130+ fi
131+ ./ scripts/ prune_perf_build_target.sh ./ target/ release/ codex
132+
115133# Build a machine-local codex binary using profile-guided optimization on top
116134# of the same local tuning as `perf-build-local`.
117135#
You can’t perform that action at this time.
0 commit comments