mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-24 18:51:13 +08:00
chore: 构建提速——sccache 编译缓存、mold 并行链接与快速 release profile
This commit is contained in:
@@ -1,2 +1,11 @@
|
||||
[build]
|
||||
rustflags = ["-D", "warnings"]
|
||||
# sccache 编译缓存:重复构建(切分支、profile 变动、clean 后重编)命中缓存直接
|
||||
# 复用产物,跳过 rustc。缓存目录默认 ~/.cache/sccache(上限 10G)。
|
||||
rustc-wrapper = "sccache"
|
||||
|
||||
[target.x86_64-unknown-linux-gnu]
|
||||
# mold 链接器:并行链接,比 GNU ld 快 5 至 10 倍(98M 二进制链接 4.4s 降到
|
||||
# 亚秒级)。走 cc 驱动的 -fuse-ld=mold(不能直接 linker="mold":rustc 会把
|
||||
# cc 驱动参数 -m64/-Wl, 原样传给 mold,mold 不认)。对 dev 与 release 全 profile 生效。
|
||||
rustflags = ["-C", "link-arg=-fuse-ld=mold"]
|
||||
|
||||
Reference in New Issue
Block a user