From 60a1547124d1587f8a40cd9b24b4adafd6355708 Mon Sep 17 00:00:00 2001 From: Orkuncakilkaya Date: Sat, 5 Sep 2026 01:48:09 +0300 Subject: [PATCH] build(x): stop printing a clang warning on every build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Each clang invocation the task runner makes emitted warning: overriding the module target triple with arm64-apple-macosx15.5.0 four times per `x build`, with nothing for anyone to act on. `cc()` now passes -Wno-override-module, the same flag ludicc already passes for its own link. The comment in selfhost/main.ludic explaining that flag had it backwards — it claimed "our IR carries an explicit target triple", when the emitted IR names no triple at all, which is precisely why clang substitutes the host's and warns. Corrected. No IR changes, so the seed is untouched. Also adds .claude/launch.json entry for previewing the generated docs locally. Co-Authored-By: Claude Opus 5 --- changes/quiet-builds.md | 8 ++++++++ selfhost/main.ludic | 5 +++-- tools/x/selfhost.ludic | 5 ++++- 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 changes/quiet-builds.md diff --git a/changes/quiet-builds.md b/changes/quiet-builds.md new file mode 100644 index 00000000..fc723fbc --- /dev/null +++ b/changes/quiet-builds.md @@ -0,0 +1,8 @@ +bump: patch +type: build +`x` no longer prints a clang warning on every build. Each `clang` invocation the +task runner makes now passes `-Wno-override-module`, the same flag `ludicc` +already passes for its own link step: the emitted IR names no target triple, so +clang substitutes the host's and says so — four times per `x build`, with +nothing to act on. (The comment in `selfhost/main.ludic` claimed the opposite, +that the IR *does* carry a triple; it does not.) diff --git a/selfhost/main.ludic b/selfhost/main.ludic index ea080d1e..b3911911 100644 --- a/selfhost/main.ludic +++ b/selfhost/main.ludic @@ -157,8 +157,9 @@ entry { # clang twice: assemble the IR, then link. A windowed build adds the macOS # platform layer and the Cocoa framework. - # -Wno-override-module: our IR carries an explicit target triple, which clang - # would otherwise warn about on every build. + # -Wno-override-module: the emitted IR carries no target triple, so clang + # substitutes the host's and warns about it on every single build. There is + # nothing to act on — the host default is exactly what we want — so it is off. var cmd = `{cc} -O2 -Wno-override-module {ll}` if g_windowed { let cocoa = join_path(home, "runtime/native/cocoa.ll") diff --git a/tools/x/selfhost.ludic b/tools/x/selfhost.ludic index 85d1c69e..a6dfc012 100644 --- a/tools/x/selfhost.ludic +++ b/tools/x/selfhost.ludic @@ -6,7 +6,10 @@ # now lives here once, in selfhost_frags(). # the C toolchain driver (clang) that assembles and links the emitted IR -function cc() -> pointer { return getenv_or("LUDIC_CC", "clang") } +# The C toolchain used to assemble and link IR. -Wno-override-module for the +# same reason the compiler itself passes it (see selfhost/main.ludic): the IR +# names no target triple, so clang substitutes the host's and warns every time. +function cc() -> pointer { return getenv_or("LUDIC_CC", "clang") + " -Wno-override-module" } # the self-host compiler's source fragments, in link order. This is THE list; # the old scripts each carried their own copy.