build: 移除无效的 release 指令集配置

This commit is contained in:
2026-10-10 15:33:05 +00:00
parent cf128b6fc2
commit 135f14ee40
3 changed files with 10 additions and 10 deletions
+7 -3
View File
@@ -5,7 +5,11 @@ rustflags = ["-D", "warnings"]
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 生效。
# mold 链接器:并行链接,比 GNU ld 快 5 至 10 倍。走 cc 驱动的 -fuse-ld=mold
# (不能直接 linker="mold":rustc 会把 cc 驱动参数 -m64/-Wl, 原样传给 mold,
# mold 不认)。对 dev 与 release 全 profile 生效。CI 由 setup-tools 从工作副本
# 剥掉此行(sccache 包装 rustc 时链接子进程定位不到 mold)。
#
# 不设 target-cpu 指令集档位:native 与 x86-64-v3 经同机交替 A/B 实测对本解释器
# 无收益(差异在 ±2% 噪声内),解释器为分支/指针密集,吃不到 SIMD 红利。
rustflags = ["-C", "link-arg=-fuse-ld=mold"]
+3 -4
View File
@@ -33,10 +33,9 @@ runs:
- name: Configure build cache
shell: bash
run: |
# CI 链接器统一走默认 lld:sccache 包装 rustc 时,链接子进程定位不到 mold、
# 回退默认 ld 报 cannot find ld。只删工作副本的 mold 行,本地提交的 config
# 保留 mold 提速。
sed -i '/link-arg=-fuse-ld=mold/d' .cargo/config.toml
# CI 链接器走默认 ld:sccache 包装 rustc 时链接子进程定位不到 mold,回退默认
# ld 报 cannot find ld。只改工作副本,本地提交的 config 保留 mold 提速。
sed -i '/^rustflags = .*fuse-ld=mold/d' .cargo/config.toml
- name: Verify tools in PATH
shell: bash
-3
View File
@@ -78,9 +78,6 @@ lto = false
codegen-units = 256
debug = 0
panic = "abort"
# 本机 CPU 指令集(AVX2 等):解释器热路径墙时间再挤 5 至 15%。产物绑定本机
# 微架构,不可跨机移植(本机开发机与 CI 各自源码构建,无影响)。
target-cpu = "native"
[profile.dev]
# 行表级调试信息:产物体积降 5 至 10 倍(单个 oxide CLI 约 160M 降到 30M 量级),