Skip to content
Closed
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
2 changes: 2 additions & 0 deletions scripts/build/rust.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,8 @@ export function emitRust(n: Ninja, cfg: Config, inputs: RustBuildInputs): string
: // armv8-a+crc isn't a CPU name — closest LLVM model with CRC baseline:
"cortex-a72";
rustflags.push(`-Ctarget-cpu=${cpuTarget}`);
// Parallelize the otherwise single-threaded rustc frontend (nightly-only).
rustflags.push("-Zthreads=8");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it should check os.availableParallelism() and only use if 8+ to avoid overloading on less powerful builds

// `bun_core::build_options::ENABLE_ASAN = cfg!(bun_asan)` — must agree with
// the C++ `ASAN_ENABLED` macro so Global::exit() picks the same libc exit
// path (`exit` vs `quick_exit`) that c-bindings.cpp registered Bun__onExit on.
Expand Down
Loading