build(x): stop printing a clang warning on every build
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 <noreply@anthropic.com>
This commit is contained in:
parent
4b81b55849
commit
60a1547124
3 changed files with 15 additions and 3 deletions
8
changes/quiet-builds.md
Normal file
8
changes/quiet-builds.md
Normal file
|
|
@ -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.)
|
||||||
|
|
@ -157,8 +157,9 @@ entry {
|
||||||
|
|
||||||
# clang twice: assemble the IR, then link. A windowed build adds the macOS
|
# clang twice: assemble the IR, then link. A windowed build adds the macOS
|
||||||
# platform layer and the Cocoa framework.
|
# platform layer and the Cocoa framework.
|
||||||
# -Wno-override-module: our IR carries an explicit target triple, which clang
|
# -Wno-override-module: the emitted IR carries no target triple, so clang
|
||||||
# would otherwise warn about on every build.
|
# 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}`
|
var cmd = `{cc} -O2 -Wno-override-module {ll}`
|
||||||
if g_windowed {
|
if g_windowed {
|
||||||
let cocoa = join_path(home, "runtime/native/cocoa.ll")
|
let cocoa = join_path(home, "runtime/native/cocoa.ll")
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,10 @@
|
||||||
# now lives here once, in selfhost_frags().
|
# now lives here once, in selfhost_frags().
|
||||||
|
|
||||||
# the C toolchain driver (clang) that assembles and links the emitted IR
|
# 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 self-host compiler's source fragments, in link order. This is THE list;
|
||||||
# the old scripts each carried their own copy.
|
# the old scripts each carried their own copy.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue