diff options
| author | Robin Voetter <robin@voetter.nl> | 2023-04-09 01:50:43 +0200 |
|---|---|---|
| committer | Robin Voetter <robin@voetter.nl> | 2023-04-09 01:51:48 +0200 |
| commit | ba60d456b45bd391ec25195c800d61ab14de7985 (patch) | |
| tree | cda4a72fce1d9f66c94f4b483c3aca8dbba79e47 /lib | |
| parent | 12ff36265448850add6917c20a49a7f56a95dfe4 (diff) | |
| download | zig-ba60d456b45bd391ec25195c800d61ab14de7985.tar.gz zig-ba60d456b45bd391ec25195c800d61ab14de7985.zip | |
spirv: cannot build libc
SPIR-V cannot build libc, ssp, compiler-rt, etc at the time of this commit, so
prevent trying to build them.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/std/target.zig | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/std/target.zig b/lib/std/target.zig index 18e1f28f4a..fba399f02c 100644 --- a/lib/std/target.zig +++ b/lib/std/target.zig @@ -944,7 +944,7 @@ pub const Target = struct { }; } - pub fn isSPIRV(arch: Arch) bool { + pub fn isSpirV(arch: Arch) bool { return switch (arch) { .spirv32, .spirv64 => true, else => false, @@ -1534,6 +1534,10 @@ pub const Target = struct { return !self.cpu.arch.isWasm(); } + pub fn isSpirV(self: Target) bool { + return self.cpu.arch.isSpirV(); + } + pub const FloatAbi = enum { hard, soft, |
