mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
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 https://github.com/ziglang/zig/issues/25873.
This commit is contained in:
parent
6d280dc1b0
commit
13993c4f62
@ -3360,6 +3360,10 @@ fn buildOutputType(
|
||||
fatal("--debug-incremental requires -fincremental", .{});
|
||||
}
|
||||
|
||||
if (incremental and create_module.resolved_options.use_llvm) {
|
||||
warn("-fincremental is currently unsupported by the LLVM backend; crashes or miscompilations are likely", .{});
|
||||
}
|
||||
|
||||
const cache_mode: Compilation.CacheMode = b: {
|
||||
// Once incremental compilation is the default, we'll want some smarter logic here,
|
||||
// considering things like the backend in use and whether there's a ZCU.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user