diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-01-28 14:54:34 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-01-28 14:54:34 -0500 |
| commit | 3ed52e5453a6971c6a3db0846f503478922d4ea5 (patch) | |
| tree | 9f1ee884f49d85c227369d7513c748058a0c7091 /lib/std/build.zig | |
| parent | 504ce86ac991938fcd0544d771c7743833060dda (diff) | |
| download | zig-3ed52e5453a6971c6a3db0846f503478922d4ea5.tar.gz zig-3ed52e5453a6971c6a3db0846f503478922d4ea5.zip | |
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 (limited to 'lib/std/build.zig')
| -rw-r--r-- | lib/std/build.zig | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/std/build.zig b/lib/std/build.zig index 560f82961c..d310f53c06 100644 --- 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)) { |
