Commit f1be1c7
committed
fix(std-module): 一个字符串承载了两个事实,于是第二条命令收到十九个用不上的 flag
clang++: warning: argument unused during compilation: '-nostdinc++'
clang++: warning: argument unused during compilation: '-isystem …'
(共十九条,每个 include 目录一条)
stdModuleFlags 同时携带「给哪台机器」和「头文件在哪」。构建这个模块有两步,只有
第一步两样都要:第二步编译的是 BMI,而 BMI 已经包含头文件贡献的一切。
把前半单独记为 stdModuleTargetFlags,第二步只用它。
⭐ 核验方式是产物而不是「编过了」:同一个 codegen 步骤,用拆分后的 flag 和用完整
flag 各跑一次,std.o **逐字节相同**(sha256 a6d837241e7f02b2,736 字节),而后者
产生十九条警告。⇒ 被丢掉的 flag 确实无用。
1 parent ae9d18b commit f1be1c7
3 files changed
Lines changed: 36 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5659 | 5659 | | |
5660 | 5660 | | |
5661 | 5661 | | |
| 5662 | + | |
| 5663 | + | |
| 5664 | + | |
| 5665 | + | |
5662 | 5666 | | |
5663 | 5667 | | |
5664 | 5668 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
207 | 211 | | |
208 | 212 | | |
209 | 213 | | |
| |||
252 | 256 | | |
253 | 257 | | |
254 | 258 | | |
255 | | - | |
| 259 | + | |
256 | 260 | | |
257 | 261 | | |
258 | 262 | | |
| |||
277 | 281 | | |
278 | 282 | | |
279 | 283 | | |
280 | | - | |
| 284 | + | |
281 | 285 | | |
282 | 286 | | |
283 | 287 | | |
| |||
338 | 342 | | |
339 | 343 | | |
340 | 344 | | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
341 | 348 | | |
342 | 349 | | |
343 | 350 | | |
| |||
384 | 391 | | |
385 | 392 | | |
386 | 393 | | |
387 | | - | |
| 394 | + | |
388 | 395 | | |
389 | 396 | | |
390 | 397 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
96 | 118 | | |
97 | 119 | | |
98 | 120 | | |
| |||
0 commit comments