diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-01-26 09:57:25 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-26 09:57:25 -0500 |
| commit | 96e5f476c3f7f44d0b299bc6043f3fd88769bd8b (patch) | |
| tree | 5aadd86ef359eb847bf842f9594690737f0e67c4 /test/compile_errors.zig | |
| parent | 4e9b1f5479e3b7ce47d059e0e6f3d62cd4ee7254 (diff) | |
| parent | 3839ea89785856bbed0624a6a18eb6e5acfb46c3 (diff) | |
| download | zig-96e5f476c3f7f44d0b299bc6043f3fd88769bd8b.tar.gz zig-96e5f476c3f7f44d0b299bc6043f3fd88769bd8b.zip | |
Merge pull request #4264 from ziglang/layneson-cpus_and_features
Add support for target details (CPUs and their supported features)
Diffstat (limited to 'test/compile_errors.zig')
| -rw-r--r-- | test/compile_errors.zig | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/compile_errors.zig b/test/compile_errors.zig index be2a40d74d..a4ed8549a7 100644 --- a/test/compile_errors.zig +++ b/test/compile_errors.zig @@ -1,5 +1,6 @@ const tests = @import("tests.zig"); const builtin = @import("builtin"); +const Target = @import("std").Target; pub fn addCases(cases: *tests.CompileErrorContext) void { cases.addTest("non-exhaustive enums", @@ -272,9 +273,10 @@ pub fn addCases(cases: *tests.CompileErrorContext) void { , &[_][]const u8{ "tmp.zig:3:5: error: target arch 'wasm32' does not support calling with a new stack", }); - tc.target = tests.Target{ - .Cross = tests.CrossTarget{ + tc.target = Target{ + .Cross = .{ .arch = .wasm32, + .cpu_features = Target.Arch.wasm32.getBaselineCpuFeatures(), .os = .wasi, .abi = .none, }, @@ -673,9 +675,10 @@ pub fn addCases(cases: *tests.CompileErrorContext) void { , &[_][]const u8{ "tmp.zig:2:14: error: could not find 'foo' in the inputs or outputs", }); - tc.target = tests.Target{ - .Cross = tests.CrossTarget{ + tc.target = Target{ + .Cross = .{ .arch = .x86_64, + .cpu_features = Target.Arch.x86_64.getBaselineCpuFeatures(), .os = .linux, .abi = .gnu, }, |
