Skip to content

Commit 2d5381e

Browse files
committed
docs: declared-floor-implies-static-runtime semantics
1 parent 84d11d1 commit 2d5381e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

docs/05-mcpp-toml.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@ cargo/rustc、cc 等同样尊重该变量)> 本字段(项目默认,类似 SwiftP
101101
`platforms:`)> 工具链/SDK 默认。该值会进入 BMI 指纹——切换 target 会
102102
自动重建模块缓存。
103103

104+
**声明 floor 即静态运行时**:显式设置了 deployment target(env 或本
105+
字段)且 `static_stdlib = true`(默认)时,macOS 链接会静态链入 LLVM
106+
自带的 libc++/libc++abi —— 系统 libc++ 会把实际可运行版本钉死在构建机
107+
的 OS(老系统缺新符号,如 `std::print` 的支撑符号),静态化才能真正
108+
兑现声明的 floor。注意 LLVM 官方静态库自身的下限是 **14.0**。未声明
109+
floor 时保持动态系统 libc++(产物只保证在构建机同版本及以上运行)。
110+
104111
C++ 标准不要通过 `build.cxxflags = ["-std=..."]` 配置。请使用:
105112

106113
```toml

0 commit comments

Comments
 (0)