| author | |
| committer | |
| log | 40e1fca34b2c0d2cde130fd17331a2935c473644 |
| tree | 3cd58ce78e853209a78e7d3a08b70aab37d9d909 |
| parent | 3cd19dd89743ae55329f7f5573db4750f902e830 |
main: consume --debug-log argument even when logging is disabled2 files changed, 2 insertions(+), 1 deletions(-)
src/Compilation.zig+1-1| ... | ... | @@ -780,7 +780,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { |
| 780 | 780 | // compiler state, the second clause here can be removed so that incremental |
| 781 | 781 | // cache mode is used for LLVM backend too. We need some fuzz testing before |
| 782 | 782 | // that can be enabled. |
| 783 | const cache_mode = if (use_llvm and !options.disable_lld_caching) | |
| 783 | const cache_mode = if ((use_llvm or options.main_pkg == null) and !options.disable_lld_caching) | |
| 784 | 784 | CacheMode.whole |
| 785 | 785 | else |
| 786 | 786 | options.cache_mode; |
src/main.zig+1| ... | ... | @@ -1161,6 +1161,7 @@ fn buildOutputType( |
| 1161 | 1161 | } else if (mem.eql(u8, arg, "--debug-log")) { |
| 1162 | 1162 | if (!build_options.enable_logging) { |
| 1163 | 1163 | std.log.warn("Zig was compiled without logging enabled (-Dlog). --debug-log has no effect.", .{}); |
| 1164 | _ = args_iter.nextOrFatal(); | |
| 1164 | 1165 | } else { |
| 1165 | 1166 | try log_scopes.append(gpa, args_iter.nextOrFatal()); |
| 1166 | 1167 | } |