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 /src/Compilation.zig | |
| 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 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index caa572e29d..6eef76cf14 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -722,10 +722,11 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { // Once they are capable this condition could be removed. When removing this condition, // also test the use case of `build-obj -fcompiler-rt` with the native backends // and make sure the compiler-rt symbols are emitted. - const capable_of_building_compiler_rt = build_options.have_llvm and options.target.os.tag != .plan9; - - const capable_of_building_zig_libc = build_options.have_llvm and options.target.os.tag != .plan9; - const capable_of_building_ssp = build_options.have_llvm and options.target.os.tag != .plan9; + const is_p9 = options.target.os.tag == .plan9; + const is_spv = options.target.cpu.arch.isSpirV(); + const capable_of_building_compiler_rt = build_options.have_llvm and !is_p9 and !is_spv; + const capable_of_building_zig_libc = build_options.have_llvm and !is_p9 and !is_spv; + const capable_of_building_ssp = build_options.have_llvm and !is_p9 and !is_spv; const comp: *Compilation = comp: { // For allocations that have the same lifetime as Compilation. This arena is used only during this |
