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.