[Perf]: Investigate restoring opt-level=3 for aarch64 cross-compilation
#682 aperta il 28 gen 2026
Metriche repository
- Star
- (675 star)
- Metriche merge PR
- (Metriche PR in attesa)
Descrizione
Title: Investigate restoring opt-level=3 for aarch64 cross-compilation
Description
We currently override the optimization level for the aarch64-unknown-linux-gnu target to 2 in our cargo configuration:
[target.aarch64-unknown-linux-gnu]
rustflags = ["-Copt-level=2", "-Ctarget-feature=+fp16,+fhm"]
This workaround was introduced to bypass a compiler segfault (SIGSEGV) in LLVM's BranchProbabilityInfo pass when compiling the faer dependency with opt-level=3.
Downgrading to opt-level=2 potentially leaves performance on the table for our ARM builds (e.g., Jetson devices), which is critical for this project.
Goal
Determine if this workaround is still necessary with the latest stable rustc version.
Task
- Attempt to remove the
-Copt-level=2flag (reverting to the default or explicit3). - Cross-compile the project for
aarch64-unknown-linux-gnu. - If the build succeeds without crashing, benchmark the artifacts to verify performance gains and ensure runtime stability.
- If it still crashes, document the current
rustcversion and the specific LLVM error trace for upstream reporting.