Skip to content

Commit 594b519

Browse files
committed
chore: 删掉 main 上的 binDir —— 一个 shell 重定向留下的空文件
dc6eb34(#436)误提交,在 main 上待了一周。名字读起来像一个本该被展开而没有展开 的变量(`> $binDir`),内容是空的。 顺手写进 .gitignore,让同样的手滑下次被挡住而不是再被 review 一遍。
1 parent 9a5b9ec commit 594b519

3 files changed

Lines changed: 22 additions & 1 deletion

File tree

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,9 @@ bench/bench-report.json
4343
# --project mode writes the measured build's stdout/stderr next to the project
4444
bench-child.log
4545
.mcpp.toml.bench-backup
46+
47+
# ⚠️ An empty file a shell redirection left behind. It was committed in #436
48+
# and lived on `main` for a week; the name reads like a variable that was meant
49+
# to be expanded (`> $binDir`) and was not. Listed so the same slip is caught
50+
# next time rather than reviewed again.
51+
binDir

binDir

Whitespace-only changes.

src/build/flags.cppm

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1328,7 +1328,22 @@ CompileFlags compute_flags(const BuildPlan& plan) {
13281328
//
13291329
// Native cl.exe (isMsvcDialect, returned above) keeps link.exe: there
13301330
// the response file is ours, and 2026.8.5.3 already fixed it.
1331-
f.ld = std::format(" -fuse-ld=lld{}{}{}", link_intent_ld,
1331+
// ⚠️ `full_static` IS ON THIS LINE, AND IT WAS NOT.
1332+
//
1333+
// The two branches below both carry it; this one did not, and nothing
1334+
// showed because a Windows host's `-static` for an ELF target was
1335+
// arriving from the C++ runtime contract instead — which had chosen the
1336+
// PE cell, because the FORMAT question above was being answered by
1337+
// asking which machine was building. Correcting that answer removed the
1338+
// flag, and the artefact this job asserts about changed shape:
1339+
//
1340+
// mcpp-linux-musl: ELF 64-bit LSB executable, x86-64, …
1341+
// dynamically linked, interpreter /lib/ld-musl-x86_64.so.1
1342+
//
1343+
// where every other host produces a static one. ⇒ Whole-program static
1344+
// linkage is a property of the TARGET (`target_supports_full_static`
1345+
// plus the manifest's `linkage`), so it belongs on every host's line.
1346+
f.ld = std::format("{} -fuse-ld=lld{}{}{}", full_static, link_intent_ld,
13321347
user_ldflags, link_extra);
13331348
f.ldC = f.ld; // no C++ runtime token on this line
13341349
} else if constexpr (mcpp::platform::needs_explicit_libcxx) {

0 commit comments

Comments
 (0)