Commit 98253bc0ee

Andrew Kelley <andrew@ziglang.org>
2025-09-26 02:14:26
Compilation: --debug-rt always Debug
--debug-rt previously would make rt libs match the root module. Now they are always debug when --debug-rt is passed. This includes compiler-rt, fuzzer lib, and others.
1 parent 9bb0b43
Changed files (1)
src/Compilation.zig
@@ -8116,7 +8116,7 @@ pub fn addLinkLib(comp: *Compilation, lib_name: []const u8) !void {
 /// compiler-rt, libcxx, libc, libunwind, etc.
 pub fn compilerRtOptMode(comp: Compilation) std.builtin.OptimizeMode {
     if (comp.debug_compiler_runtime_libs) {
-        return comp.root_mod.optimize_mode;
+        return .Debug;
     }
     const target = &comp.root_mod.resolved_target.result;
     switch (comp.root_mod.optimize_mode) {