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
6 changes: 6 additions & 0 deletions scripts/codegen-witness.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ EXPECT="${1:?expect: avx512|avx2|neon}"
TRIPLE="${2:-$(rustc -vV | sed -n 's/^host: //p')}"
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
TD="${CARGO_TARGET_DIR:-$ROOT/target}"
# Cargo runs from ROOT (the `cd` below), so a relative CARGO_TARGET_DIR
# resolves against ROOT, while rustc resolves `--emit=asm=<path>` against the
# package directory. An absolute TD keeps the .s path, the mkdir and the build
# output on one base wherever the script is started from.
case "$TD" in /*) ;; *) TD="$ROOT/$TD" ;; esac
export CARGO_TARGET_DIR="$TD"
# rustc writes the assembly to this exact path (`--emit=asm=<path>`). Cargo's
# build directory layout is not a stable interface: from Rust 1.100 an `.s`
# emitted without a path lands under `<profile>/build/<pkg>/<hash>/out/`
Expand Down
5 changes: 5 additions & 0 deletions scripts/neon-asm-rung3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
MANIFEST="$ROOT/crates/neon-simd-parity/Cargo.toml"
TARGET="aarch64-unknown-linux-gnu"
TD="${CARGO_TARGET_DIR:-$ROOT/target-aarch64}"
# Cargo resolves a relative CARGO_TARGET_DIR against the directory it is run
# from (here, the caller's), while rustc resolves `--emit=asm=<path>` against
# the package directory. An absolute TD keeps the .s path, the mkdir and the
# build output on one base.
case "$TD" in /*) ;; *) TD="$PWD/$TD" ;; esac

echo "==> emitting aarch64 assembly of neon-simd-parity (link step skipped)"
# Stale-assembly guard: remove any previous .s FIRST and let a build failure
Expand Down
Loading