0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/src-self-hosted
Andrew Kelley 49817c6add
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
History 2020-03-06 19:47:03 -05:00
..
c.zig self-hosted libc detection 2020-02-16 13:25:30 -05:00
c_int.zig introduce operating system version ranges as part of the target 2020-02-28 14:51:53 -05:00
clang.zig introduce operating system version ranges as part of the target 2020-02-28 14:51:53 -05:00
codegen.zig Add InstallRawStep to Zig build system that does a similar job to llvm-objcopy. To use it, do 'exe.installRaw("kernel.bin");' where exe is a LibExeObjStep 2020-02-03 15:07:34 -05:00
compilation.zig Update callers of fs.makePath 2020-03-03 13:25:43 -05:00
decl.zig fixes and cleanup in self hosted 2019-11-26 11:52:12 +02:00
dep_tokenizer.zig std.fmt.format: comptime output parameter 2020-02-05 16:52:18 -05:00
errmsg.zig update self-hosted compiler to new format API 2019-12-08 23:17:03 -05:00
introspect.zig update self-hosted zig targets to print correct glibc availability 2020-03-04 01:05:42 -05:00
ir.zig add test for @intToEnum 2020-02-26 11:19:40 -05:00
libc_installation.zig update std lib to new Target API 2020-02-28 14:51:54 -05:00
link.zig introduce operating system version ranges as part of the target 2020-02-28 14:51:53 -05:00
llvm.zig fix stage2 build 2019-12-29 11:04:58 +02:00
main.zig Remove unused std.Buffer imports 2020-03-06 18:49:13 -05:00
package.zig changing occurrences of HashMap with []const u8 as keys for StringHashMap 2019-09-03 23:53:05 +02:00
print_targets.zig update self-hosted zig targets to print correct glibc availability 2020-03-04 01:05:42 -05:00
scope.zig self hosted compiler: use enum literals 2019-11-07 10:30:56 +02:00
stage2.zig cleanup CPU model & feature detection 2020-03-06 19:47:03 -05:00
test.zig Update callers of fs.makePath 2020-03-03 13:25:43 -05:00
translate_c.zig translate-c more macro ops 2020-03-06 17:34:37 -05:00
type.zig remove uses of @ArgType and @IntType 2020-02-24 23:39:03 +02:00
util.zig introduce operating system version ranges as part of the target 2020-02-28 14:51:53 -05:00
value.zig update self-hosted compiler to new format API 2019-12-08 23:17:03 -05:00
visib.zig New Zig formal grammar (#1685) 2018-11-13 05:08:37 -08:00
windows_sdk.zig self-hosted libc detection 2020-02-16 13:25:30 -05:00