6957 Commits

Author SHA1 Message Date
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
John Schmidt
7cb227ab67 Polish a few tests in switch.zig
- Return `error.TestFailed` instead of panicing
- Use `comptime assert` for type checks so that errors surface at
  compile time
2024-02-08 23:49:03 +01:00
John Schmidt
0d1baf0c61 Improvements after code review 2024-02-08 23:49:03 +01:00
John Schmidt
dbcd53def0 Preserve field alignment in union pointer captures 2024-02-08 23:49:03 +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
Veikka Tuominen
f93a36c091 llvm: revert bad array access optimization
Closes #18723
2024-01-29 08:43:27 -08:00
Veikka Tuominen
78e982f7c3 llvm: fix alignment of array ptr when bitcasting vector
Closes #17996
2024-01-29 13:51:57 +02:00
Veikka Tuominen
281b2695c4 Value: expand canMutateComptimeVarState
Closes #17761
2024-01-29 13:48:45 +02:00
Veikka Tuominen
f782202910 Sema: do not emit @errorCast safety check when dest is adhoc inferred error set
Closes #17354
2024-01-29 13:48:45 +02:00
Pavel Verigo
96a5f7c8ed Sema: fix casting runtime value to enum with comptime int tag type 2024-01-29 01:43:19 +02:00
MrDmitry
3e6f07e617 Add escaped character processing 2024-01-26 13:33:17 -05:00
MrDmitry
0307f87715 Remove unused test file 2024-01-26 13:33:17 -05:00
MrDmitry
2ce32e4497 Extend standalone tests for cmakedefine 2024-01-26 13:33:17 -05:00