Commit Graph

6615 Commits

Author SHA1 Message Date
Veikka Tuominen
51d67c7c8f Sema: add declared here notes in fail
This ensures that the note is added in more places and that `errMsg` needs to be used in fewer places.
2024-02-12 12:54:32 -08:00
Jacob Young
a9f738e56b x86_64: implement c abi for bool vectors 2024-02-12 05:25:07 +01:00
Jacob Young
5a62f26579 x86_64: fix packed load 2024-02-12 05:25:07 +01:00
Jacob Young
f2a62d25fc x86_64: implement ret_safe 2024-02-12 05:25:07 +01:00
Jacob Young
6235762c09 x86_64: implement mul, div, and mod of large integers
This enables the last compiler-rt test disabled for the x86_64 backend.
2024-02-12 05:25:07 +01:00
Andrew Kelley
616f74ba20 add behavior test for recently fixed wasm backend bug
Adds the corresponding behavior test for the fix in
320c4d68f5.
2024-02-11 14:14:59 -07:00
Jakub Konka
d12c8db642 Merge pull request #18875 from ziglang/macho-zo-dwarf
macho: emit DWARF for ZigObject relocatable
2024-02-09 23:12:04 +01:00
Veikka Tuominen
731ff120d0 Sema: catch runtime stores to comptime variables through calls 2024-02-09 13:51:51 -08:00
Andrew Kelley
54bbc73f85 Merge pull request #18712 from Vexu/std.options
std: make options a struct instance instead of a namespace
2024-02-09 13:38:42 -08:00
Tristan Ross
2a3e601f77 test.link.macho: fix for non-x86 and arm architectures
This fix is requires to make the build runner even compile when building
Zig on architectures like RISC-V.
2024-02-09 17:49:53 +02:00
Ali Chraghi
37b0aa600a spirv: make rusticl the primary testing implementation 2024-02-09 09:27:08 +03:30
Jakub Konka
925273bcc8 macho: align memory size with file size when emitting relocatable 2024-02-09 00:20:11 +01:00
Jakub Konka
7388534590 test/link/macho: more self-hosted tests 2024-02-08 23:51:30 +01:00
Jakub Konka
7fb9df3fab test/link/macho: -fstrip is no longer needed for self-hosted 2024-02-08 22:15:00 +01:00
David Rubin
24fb6d1f30 Make @intFromEnum an error for empty enums 2024-02-06 21:04:09 +02:00
Jakub Konka
52066bf8e4 x86_64+macho: pass more behavior tests 2024-02-06 19:01:17 +01:00
Andrew Kelley
5cf138e512 delete bad behavior test
As pointed out in the issue this behavior test branches on an undefined
value. That's not valid Zig code.

Also behavior tests should not depend on the standard library in this
manner. They need to minimally isolate the specific language thing that
is being tested.

Closes #12681
2024-02-05 23:47:05 -07:00
Robin Voetter
2511106150 spirv: air vector_store_element 2024-02-04 19:09:34 +01:00
Robin Voetter
9fbba0e01a spirv: update tests 2024-02-04 19:09:33 +01:00
Robin Voetter
1d548aa2aa spirv: air splat 2024-02-04 19:09:33 +01:00
Robin Voetter
76d5696434 spirv: air abs 2024-02-04 19:09:32 +01:00
Robin Voetter
631d1b63a8 spirv: fix shuffle properly 2024-02-04 19:09:32 +01:00
Robin Voetter
9641d2ebdb spirv: vectorize max, min 2024-02-04 19:09:31 +01:00
Robin Voetter
9f0227a326 spirv: vectorize int_cast, trunc 2024-02-04 19:09:31 +01:00
Robin Voetter
408c117246 spirv: air is_(non_)null_ptr, optional_payload_ptr 2024-02-04 19:09:30 +01:00
Robin Voetter
7dfd403da1 spirv: air mul_add 2024-02-04 19:09:30 +01:00
Robin Voetter
345d6e280d spirv: air int_from_bool 2024-02-04 19:09:29 +01:00
Robin Voetter
b67d983abd spirv: vectorize add/sub overflow 2024-02-04 19:09:27 +01:00
Robin Voetter
761594e226 spirv: reduce, reduce_optimized 2024-02-04 19:09:27 +01:00
Robin Voetter
2f815853dc spirv: shlWithOverflow 2024-02-04 19:09:26 +01:00
Robin Voetter
15cf5f88c1 spirv: vectors for air not 2024-02-04 19:09:25 +01:00
Robin Voetter
cb9e20da00 spirv: element-wise operation helper 2024-02-04 19:09:00 +01:00
Robin Voetter
747f4ae3f5 spirv: sh[rl](_exact)? 2024-02-04 19:08:59 +01:00
Andrew Kelley
d3fc2648cc Merge pull request #18778 from ziglang/system-package-mode
Implement system package mode and lazy dependencies
2024-02-04 01:44:12 -08:00
Jakub Konka
9bf97b8494 Merge pull request #18793 from ziglang/macho-zig-object
macho: emit relocatable with self-hosted x86_64 backend
2024-02-04 09:12:59 +01:00
David Rubin
122387943b Fix OOB when enum field out of order in different file 2024-02-03 19:52:05 +00:00
David Rubin
eb4024036d Add error hint when looping over ErrorUnion 2024-02-03 19:16:27 +00:00
Jakub Konka
ca86dc61dd test/link/macho: test for signals only when running on the host 2024-02-03 19:36:52 +01:00
Jakub Konka
4ebd0036fd test/link/macho: add some smoke tests for self-hosted MachO 2024-02-03 17:57:35 +01:00
Andrew Kelley
105db13536 std.Build: implement --host-target, --host-cpu, --host-dynamic-linker
This also makes a long-overdue change of extracting common state from
Build into a shared Graph object.

Getting the semantics right for these flags turned out to be quite
tricky. In the end it works like this:
* The override only happens when the target is fully native, with no
  additional query parameters, such as versions or CPU features added.
* The override affects the resolved Target but leaves the original Query
  unmodified.
* The "is native?" detection logic operates on the original, unmodified
  query. This makes it possible to provide invalid host target
  information, causing confusing errors to occur. Don't do that.

There are some minor breaking changes to std.Build API such as the fact
that `b.zig_exe` is now moved to `b.graph.zig_exe`, as well as a handful
of other similar flags.
2024-02-02 20:43:01 -07:00
Jakub Konka
92deebcd66 cli+build: handle -ObjC flag and route it to MachO linker 2024-02-02 22:00:16 +01:00
Veikka Tuominen
07dbff4f44 std.start: remove event loop integration 2024-02-01 15:22:36 +02:00
Veikka Tuominen
220d3264c9 std: make options a struct instance instead of a namespace 2024-02-01 15:22:36 +02:00
danielsan901998
d7a27bf803 Use mem.zeroes for empty union initializer list 2024-01-31 06:38:44 +02:00
Jakub Konka
f63f4508d2 macho: fix parsing versions from TBDs if parsed as floats 2024-01-30 20:56:20 +01:00
Jakub Konka
b8490c05c1 macho: improve weak-ref symbols handling 2024-01-30 13:56:08 +01:00
Pavel Verigo
a2ad8517ee Sema: fix union init with zero size field 2024-01-30 12:20:23 +02:00
Veikka Tuominen
7d75c3d3b8 llvm: ensure returned undef is 0xaa bytes when runtime safety is enabled
Closes #13178
2024-01-29 17:35:07 -08:00
SuperAuguste
a479fd3132 Fix some comptime packed struct issues
Co-authored-by: Veikka Tuominen <git@vexu.eu>
2024-01-29 13:09:17 -08:00
Andrew Kelley
f4f8036ec0 Merge pull request #18729 from Vexu/fixes
Fix some generic{Reader,Writer} related issues
2024-01-29 13:07:37 -08:00