Target: pass and use locals by pointer instead of by value

This struct is larger than 256 bytes and code that copies it
consistently shows up in profiles of the compiler.
This commit is contained in:
Jacob Young
2025-06-13 04:46:30 -04:00
parent 16d78bc0c0
commit 917640810e
96 changed files with 400 additions and 401 deletions

View File

@@ -759,7 +759,7 @@ fn addCmakeCfgOptionsToExe(
use_zig_libcxx: bool,
) !void {
const mod = exe.root_module;
const target = mod.resolved_target.?.result;
const target = &mod.resolved_target.?.result;
if (target.os.tag.isDarwin()) {
// useful for package maintainers