mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
fix not respecting sub-arch feature
This commit is contained in:
parent
48c7e6c48b
commit
3227aec848
@ -181,7 +181,7 @@ pub const Target = union(enum) {
|
||||
};
|
||||
}
|
||||
|
||||
pub fn subArchFeature(arch: Arch) ?u8 {
|
||||
pub fn subArchFeature(arch: Arch) ?Cpu.Feature.Set.Index {
|
||||
return switch (arch) {
|
||||
.arm, .armeb, .thumb, .thumbeb => |arm32| switch (arm32) {
|
||||
.v8_5a => @enumToInt(arm.Feature.armv8_5_a),
|
||||
@ -295,8 +295,6 @@ pub const Target = union(enum) {
|
||||
return error.UnknownCpuFeature;
|
||||
}
|
||||
}
|
||||
|
||||
set.populateDependencies(all_features);
|
||||
return set;
|
||||
}
|
||||
|
||||
|
||||
@ -790,7 +790,11 @@ fn stage2ParseCpuFeatures(
|
||||
};
|
||||
} else cpu.features;
|
||||
|
||||
if (arch.subArchFeature()) |index| {
|
||||
set.addFeature(index);
|
||||
}
|
||||
set.populateDependencies(arch.allFeaturesList());
|
||||
|
||||
return Stage2CpuFeatures.createFromCpuFeatures(std.heap.c_allocator, arch, .{
|
||||
.cpu = cpu,
|
||||
.features = set,
|
||||
|
||||
@ -10679,6 +10679,7 @@ CodeGen *create_child_codegen(CodeGen *parent_gen, Buf *root_src_path, OutType o
|
||||
child_gen->verbose_llvm_ir = parent_gen->verbose_llvm_ir;
|
||||
child_gen->verbose_cimport = parent_gen->verbose_cimport;
|
||||
child_gen->verbose_cc = parent_gen->verbose_cc;
|
||||
child_gen->verbose_llvm_cpu_features = parent_gen->verbose_llvm_cpu_features;
|
||||
child_gen->llvm_argv = parent_gen->llvm_argv;
|
||||
child_gen->dynamic_linker_path = parent_gen->dynamic_linker_path;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user