diff --git a/lib/std/Build/Step/Compile.zig b/lib/std/Build/Step/Compile.zig index d0a2d69bfebf..3be40434cb10 100644 --- a/lib/std/Build/Step/Compile.zig +++ b/lib/std/Build/Step/Compile.zig @@ -691,7 +691,7 @@ pub fn isStaticLibrary(self: *Compile) bool { pub fn producesPdbFile(self: *Compile) bool { if (!self.target.isWindows() and !self.target.isUefi()) return false; if (self.target.getObjectFormat() == .c) return false; - if (self.strip == true) return false; + if (self.strip == true or (self.strip == null and self.optimize == .ReleaseSmall)) return false; return self.isDynamicLibrary() or self.kind == .exe or self.kind == .@"test"; }