Skip to content

Commit 13993c4

Browse files
committed
compiler: warn when using -fincremental with LLVM backend
This configuration hasn't had much work put into it yet, so is all but guaranteed to miscompile or crash. Since users are starting to try out `-fincremental`, and LLVM is still the default backend in many cases, it's worth having this warning to avoid bug reports like #25873.
1 parent 6d280dc commit 13993c4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main.zig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3360,6 +3360,10 @@ fn buildOutputType(
33603360
fatal("--debug-incremental requires -fincremental", .{});
33613361
}
33623362

3363+
if (incremental and create_module.resolved_options.use_llvm) {
3364+
warn("-fincremental is currently unsupported by the LLVM backend; crashes or miscompilations are likely", .{});
3365+
}
3366+
33633367
const cache_mode: Compilation.CacheMode = b: {
33643368
// Once incremental compilation is the default, we'll want some smarter logic here,
33653369
// considering things like the backend in use and whether there's a ZCU.

0 commit comments

Comments
 (0)