motiejus/zig

fork of https://codeberg.org/ziglang/zig
git clone https://git.jakstys.lt/motiejus/zig.git
Log | Tree | Refs | README | LICENSE

commit 3ed52e5453a6971c6a3db0846f503478922d4ea5 (tree)
parent 504ce86ac991938fcd0544d771c7743833060dda
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Tue, 28 Jan 2020 14:54:34 -0500

fix build.zig logic for -target-cpu and -target-feature

fix a false negative for detecting the ability to emit these flags.
it matters for stage0/stage1 on aarch64

Diffstat:
Mlib/std/build.zig | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/lib/std/build.zig b/lib/std/build.zig @@ -1978,6 +1978,9 @@ pub const LibExeObjStep = struct { const all_features = self.target.getArch().allFeaturesList(); var populated_cpu_features = cross.cpu_features.cpu.features; + if (self.target.getArch().subArchFeature()) |sub_arch_index| { + populated_cpu_features.addFeature(sub_arch_index); + } populated_cpu_features.populateDependencies(all_features); if (populated_cpu_features.eql(cross.cpu_features.features)) {