| ... | @@ -841,7 +841,11 @@ fn buildOutputType( | ... | @@ -841,7 +841,11 @@ fn buildOutputType( |
| 841 | } else if (mem.eql(u8, arg, "--debug-log")) { | 841 | } else if (mem.eql(u8, arg, "--debug-log")) { |
| 842 | if (i + 1 >= args.len) fatal("expected parameter after {s}", .{arg}); | 842 | if (i + 1 >= args.len) fatal("expected parameter after {s}", .{arg}); |
| 843 | i += 1; | 843 | i += 1; |
| 844 | try log_scopes.append(gpa, args[i]); | 844 | if (!build_options.enable_logging) { |
| | 845 | std.log.warn("Zig was compiled without logging enabled (-Dlog). --debug-log has no effect.", .{}); |
| | 846 | } else { |
| | 847 | try log_scopes.append(gpa, args[i]); |
| | 848 | } |
| 845 | } else if (mem.eql(u8, arg, "-fcompiler-rt")) { | 849 | } else if (mem.eql(u8, arg, "-fcompiler-rt")) { |
| 846 | want_compiler_rt = true; | 850 | want_compiler_rt = true; |
| 847 | } else if (mem.eql(u8, arg, "-fno-compiler-rt")) { | 851 | } else if (mem.eql(u8, arg, "-fno-compiler-rt")) { |