diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2025-06-13 04:46:30 -0400 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2025-06-19 11:45:06 -0400 |
| commit | 917640810e7f3e18daff9e75b5ecefe761a1896c (patch) | |
| tree | 579e627d695f898d411a3cb1fbc0578d1a763cc2 /lib/std/Target/Query.zig | |
| parent | 16d78bc0c024da307c7ab5f6b94622e6b4b37397 (diff) | |
| download | zig-917640810e7f3e18daff9e75b5ecefe761a1896c.tar.gz zig-917640810e7f3e18daff9e75b5ecefe761a1896c.zip | |
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.
Diffstat (limited to 'lib/std/Target/Query.zig')
| -rw-r--r-- | lib/std/Target/Query.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/Target/Query.zig b/lib/std/Target/Query.zig index 478c4758f9..e453b70e5c 100644 --- a/lib/std/Target/Query.zig +++ b/lib/std/Target/Query.zig @@ -94,7 +94,7 @@ pub const OsVersion = union(enum) { pub const SemanticVersion = std.SemanticVersion; -pub fn fromTarget(target: Target) Query { +pub fn fromTarget(target: *const Target) Query { var result: Query = .{ .cpu_arch = target.cpu.arch, .cpu_model = .{ .explicit = target.cpu.model }, |
