aboutsummaryrefslogtreecommitdiff
path: root/lib/std/buffer.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-03-06 19:41:44 -0500
committerAndrew Kelley <andrew@ziglang.org>2020-03-06 19:47:03 -0500
commit49817c6adde3e9e98282dcecd017ab076faa1d85 (patch)
treee4a9863a9cf0c8d3fbdb1e1745573e7e5b499587 /lib/std/buffer.zig
parentf19918256746ccc81b6ff11d17e98665b4853400 (diff)
downloadzig-49817c6adde3e9e98282dcecd017ab076faa1d85.tar.gz
zig-49817c6adde3e9e98282dcecd017ab076faa1d85.zip
cleanup CPU model & feature detection
Add std.Target.Cpu.Model.generic which is even more empty than baseline. CPU model and feature detection uses this rather than baseline. Rename cpu_detected to cpu_detection_unimplemented and flip the logic. It can be relied on by stage2.zig to decide whether the LLVM workaround is needed without also checking the CrossTarget. Move the CPU detection to after the OS detection, and use the detected OS for the CPU detection. This is relevant because operating systems sometimes emulate certain CPU features, so knowing the OS and version is relevant for determining CPU features. Prepare for #4592 by passing the CPU arch to the detection code, instead of having it rely on Target.current. The CPU model & feature detection logic is modified. Before: * Detect actual features * Use as hint when detecting CPU model * Populate dependencies of CPU model features * Merge that into the actual features set After: * Detect actual features * Use as hint when detecting CPU model * Add known CPU model features to actual features * Detect actual features again, overriding known CPU model features * Populate dependencies
Diffstat (limited to 'lib/std/buffer.zig')
0 files changed, 0 insertions, 0 deletions