mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
Merge pull request #25889 from mlugg/incremental-llvm-warn
compiler: warn when using -fincremental with LLVM backend
This commit is contained in:
commit
cbfa87cbea
1 changed files with 6 additions and 5 deletions
11
src/main.zig
11
src/main.zig
|
|
@ -155,11 +155,8 @@ pub fn log(
|
|||
} else return;
|
||||
}
|
||||
|
||||
const prefix1 = comptime level.asText();
|
||||
const prefix2 = if (scope == .default) ": " else "(" ++ @tagName(scope) ++ "): ";
|
||||
|
||||
// Print the message to stderr, silently ignoring any errors
|
||||
std.debug.print(prefix1 ++ prefix2 ++ format ++ "\n", args);
|
||||
// Otherwise, use the default implementation.
|
||||
std.log.defaultLog(level, scope, format, args);
|
||||
}
|
||||
|
||||
var debug_allocator: std.heap.DebugAllocator(.{
|
||||
|
|
@ -3363,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…
Add table
Reference in a new issue