mirror of
https://github.com/ziglang/zig.git
synced 2025-12-28 00:53:18 +00:00
compilation: fix non-zig compilations not using CacheMode.whole
main: consume --debug-log argument even when logging is disabled
This commit is contained in:
parent
3cd19dd897
commit
40e1fca34b
@ -780,7 +780,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
|
||||
// compiler state, the second clause here can be removed so that incremental
|
||||
// cache mode is used for LLVM backend too. We need some fuzz testing before
|
||||
// that can be enabled.
|
||||
const cache_mode = if (use_llvm and !options.disable_lld_caching)
|
||||
const cache_mode = if ((use_llvm or options.main_pkg == null) and !options.disable_lld_caching)
|
||||
CacheMode.whole
|
||||
else
|
||||
options.cache_mode;
|
||||
|
||||
@ -1161,6 +1161,7 @@ fn buildOutputType(
|
||||
} else if (mem.eql(u8, arg, "--debug-log")) {
|
||||
if (!build_options.enable_logging) {
|
||||
std.log.warn("Zig was compiled without logging enabled (-Dlog). --debug-log has no effect.", .{});
|
||||
_ = args_iter.nextOrFatal();
|
||||
} else {
|
||||
try log_scopes.append(gpa, args_iter.nextOrFatal());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user