[turbopack] Improve regressed build speed on cross-compiled MUSL#91477
Draft
[turbopack] Improve regressed build speed on cross-compiled MUSL#91477
Conversation
- Add clang-static/clang-dev/llvm-dev for plugin feature's clang-sys dependency - Remove conflicting llvm16 before installing newer llvm-dev - Extract TURBO_ARGS env var for turbo CLI flags (removes -vvv spam)
Remove llvm meta-package before llvm16 to resolve file ownership conflicts when installing llvm-dev (22).
- Add codegen-units=256: thin LTO recovers cross-CGU opts at link time - Set CARGO_INCREMENTAL=0 in docker: no wasted I/O on incremental artifacts - Remove CARGO_PROFILE_RELEASE_LTO passthrough: Cargo.toml is source of truth - Unset RUSTFLAGS in all docker builds: napi-rs images set it, which overrides .cargo/config.toml (caused missing tokio_unstable cfg)
Collaborator
Failing test suitesCommit: 6f7e695 | About building and testing Next.js
Expand output● after() in static pages › runs after during build |
Merging this PR will degrade performance by 3.08%
Performance Changes
Comparing Footnotes
|
Collaborator
Stats from current PR✅ No significant changes detected📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles
Server Middleware
Build DetailsBuild Manifests
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
📎 Tarball URL |
…USTFLAGS - Keep opt-level="s" for lightningcss, swc_ecma_compat_es2015, swc_ecma_transforms_proposal, wast (saves ~1.5 MiB combined) - Remove all other per-package opt-level overrides (no-ops or negligible) - Also unset CARGO_ENCODED_RUSTFLAGS in docker builds — napi-rs images may set this, which overrides .cargo/config.toml even after unsetting RUSTFLAGS
The napi CLI unconditionally sets RUSTFLAGS on cargo subprocesses, overriding .cargo/config.toml. Instead of exporting RUSTFLAGS inside each docker build command, set it via $GITHUB_ENV before the docker step and pass it through with -e RUSTFLAGS. The generated rustflags.yml moves from .cargo/ to .github/. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove 36 per-package opt-level overrides that were missed in the initial cleanup (only lightningcss, swc_ecma_compat_es2015, swc_ecma_transforms_proposal, wast are kept) - Remove stale "--env-mode loose" comments (args now live in TURBO_ARGS) - Anchor grep pattern with ^ to prevent substring matches Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Restore cross-linker (aarch64-linux-musl-gcc) for aarch64-musl target: self-contained LLD resolves to host (x86_64) sysroot during cross-compile - Remove 36 leftover per-package opt-level overrides from Cargo.toml - Add comment that opt-level="s" entries should come from cargo bloat stats - Remove stale --env-mode loose comments, anchor grep in RUSTFLAGS step Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.