Commit 3ed52e5453

Andrew Kelley <andrew@ziglang.org>
2020-01-28 20:54:34
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
1 parent 504ce86
Changed files (1)
lib
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)) {