DoxigAlpha

parseCpuModel

Function parameters

Parameters

#
cpu_name:[]const u8

Type definitions in this namespace

Types

#

Functions in this namespace

Functions

#
requiresLibC
Does this target require linking libc? This may be the case if the target has an unstable
cCharSignedness
Default signedness of `char` for the native C compiler for this target

Source

Implementation

#
pub fn parseCpuModel(arch: Arch, cpu_name: []const u8) !*const Cpu.Model {
    for (arch.allCpuModels()) |cpu| {
        if (std.mem.eql(u8, cpu_name, cpu.name)) {
            return cpu;
        }
    }
    return error.UnknownCpuModel;
}