mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
fix: print targets
This commit is contained in:
parent
bd3e248c7e
commit
23ac4dd87b
@ -99,8 +99,9 @@ pub fn cmdTargets(
|
||||
for (arch.allCpuModels()) |model| {
|
||||
try jws.objectField(model.name);
|
||||
try jws.beginArray();
|
||||
for (arch.allFeaturesList(), 0..) |feature, i| {
|
||||
if (model.features.isEnabled(@intCast(u8, i))) {
|
||||
for (arch.allFeaturesList(), 0..) |feature, i_usize| {
|
||||
const index = @intCast(Target.Cpu.Feature.Set.Index, i_usize);
|
||||
if (model.features.isEnabled(index)) {
|
||||
try jws.arrayElem();
|
||||
try jws.emitString(feature.name);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user