Silver
65a6bf1267
fix handling of comptime-only union fields in Type.getUnionLayout ( #25182 )
...
Fixes #25180
2025-09-17 21:39:47 -07:00
Jacob Young
09bc118c9f
Elf: implement linksection
...
Closes #24330
2025-09-17 21:16:23 -07:00
Andrew Kelley
8e9f2f02d2
Merge pull request #25201 from jacobly0/x86_64-addsat
...
x86_64: fix strictness edge cases in `+|`
2025-09-17 21:15:03 -07:00
mlugg
580b6d1fad
llvm: fix tagged union payload size in debug info
...
Resolves : #24415
2025-09-16 18:55:19 +01:00
mlugg
8744865425
frontend: fix reference tracking through coerced function bodies
...
This bug was manifesting for user as a nasty link error because they
were calling their application's main entry point as a coerced function,
which essentially broke reference tracking for the entire ZCU, causing
exported symbols to silently not get exported.
I've been a little unsure about how coerced functions should interact
with the unit graph before, but the solution is actually really obvious
now: they shouldn't! `Sema` is now responsible for unwrapping
possibly-coerced functions *before* queuing analysis or marking unit
references. This makes the reference graph optimal (there are no
redundant edges representing coerced versions of the same function) and
simplifies logic elsewhere at the expense of just a few lines in Sema.
2025-09-15 11:29:31 +01:00
Jacob Young
a2ba7dd1c2
x86_64: fix @splat typo
2025-09-10 23:14:10 -04:00
Jacob Young
e313b387a0
x86_64: delete usages of avx2 vpack?s??
...
This instruction actually has fairly useless semantics, and even the
cases that were semantically correct could save 1 cycle of latency by
using a different sequnce involving the avx version instead.
Closes #25174
2025-09-10 22:40:26 -04:00
Jacob Young
1a0a9d7d59
x86_64: fix strictness edge cases in +|
...
Closes #25145
2025-09-10 21:01:13 -04:00
Andrew Kelley
bfda12efcf
Merge pull request #24968 from ifreund/deque
...
std: add a Deque data structure
2025-09-10 14:28:13 -07:00
Andrew Kelley
877d6df8f7
fix linker code writing undefined memory to the output file
...
missing `extern` on a struct.
but also all these instances that call pwriteAll with a `@ptrCast` are
endianness bugs.
this should be changed to use File.Writer and call writeSliceEndian
instead.
this commit fixes one immediate problem but does not fix everything.
2025-09-08 18:23:01 -07:00
Andrew Kelley
6673b47685
frontend: vectors and arrays no longer support in-memory coercion
...
closes #25172
2025-09-07 17:29:36 -07:00
Andrew Kelley
426d65d700
Compilation: fix buildGlibcSharedObjects error handling
...
Oops, this was supposed to be only a temporary troubleshooting patch.
2025-09-06 19:32:27 -07:00
Andrew Kelley
52c6d7a929
Sema: forbid packed unions with mismatched field bit sizes
2025-09-05 18:45:24 -07:00
Alex Rønne Petersen
210b764c03
link.Elf: truncate st_other to u3 before converting to std.elf.STV
...
See 6b6e336e07308fd23f3061b5be11407956b2a460 for context, but note that in
gABI 4.3, 3 bits are reserved for the visibility, up from the previous 2.
2025-09-04 01:16:27 +02:00
Ryan Liptak
bc7955306e
Fix -M and --dep splitting on every = instead of just the first
...
Before this commit, -Mfoo=bar=baz would be incorrectly split into mod_name: `foo` and root_src_orig: `bar`
After this commit, -Mfoo=bar=baz will be correctly split into mod_name: `foo` and root_src_orig: `bar=baz`
Closes #25059
2025-08-31 19:32:07 -07:00
Andrew Kelley
150169f1e0
std.fmt: delete deprecated APIs
...
std.fmt.Formatter -> std.fmt.Alt
std.fmt.format -> std.Io.Writer.print
2025-08-31 12:49:18 -07:00
Alex Rønne Petersen
ab99dd9c5d
zig_clang: fix ZigClangAPValueLValueBase struct layout to match Clang 21
...
Fixes the compiler build for various targets, especially 32-bit.
2025-08-31 20:18:57 +02:00
Andrew Kelley
b7104231af
Merge pull request #25077 from ziglang/GenericReader
...
std.Io: delete GenericReader, AnyReader, FixedBufferStream; and related API breakage
2025-08-30 12:43:52 -07:00
Andrew Kelley
fadd268a60
upgrade more old API uses
2025-08-30 00:48:50 -07:00
Andrew Kelley
9a0970a12b
rework std.Io.Writer.Allocating to support runtime-known alignment
...
Also, breaking API changes to:
* std.fs.Dir.readFileAlloc
* std.fs.Dir.readFileAllocOptions
2025-08-30 00:48:50 -07:00
Alex Rønne Petersen
e351ee3b7f
Revert "llvm: workaround crashes in llvm loop optimizations"
...
This reverts commit b4fd57a9c114748afb9ba0a04bede61089a02ddf.
https://github.com/llvm/llvm-project/pull/149743
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen
907b5b73b4
compiler: remove medium code model workaround for loongarch64
...
The default was changed in LLVM 21.
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen
e4f38a611f
llvm: switch to native f16 IR type for all hexagon targets
...
This was fixed in LLVM 21, in particular for targets older than v68.
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen
1c858ba7e3
llvm: remove f16 special case for soft float aarch64
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen
d4882d10f8
llvm: switch to native f128 IR type for nvptx
...
LLVM 21 added support for this.
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen
53c53a2697
llvm: switch to native f16 IR type for s390x
...
LLVM 21 added support for this.
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen
2b84eb85ee
llvm: update data layout strings for LLVM 21
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen
c44f631c72
zig cc: pass -mthumb to the assembler as necessary
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen
8c47dda7df
zig cc: pass CPU features to Clang using the new -Xclangas when assembling
...
Unfortunately, we cannot yet remove the special-casing for RISC-V CPU features,
so that code stays.
Closes #10411 .
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen
c0cfe571f9
zig cc: update options data to LLVM 21
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen
fdd32a2257
std.Target: add managarm OS tag
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen
7e6cb7c7a5
compiler: respond to API changes in LLVM 21
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen
ac20506090
libtsan: update to LLVM 21
2025-08-30 06:36:41 +02:00
Alex Rønne Petersen
b7a8c045ef
zig cc: update driver files to LLVM 21
2025-08-30 06:36:40 +02:00
Andrew Kelley
79f267f6b9
std.Io: delete GenericReader
...
and delete deprecated alias std.io
2025-08-29 17:14:26 -07:00
Andrew Kelley
558bea2a76
std.Io: delete CountingReader
2025-08-29 11:11:59 -07:00
Andrew Kelley
4b948e8556
Merge pull request #25036 from ziglang/GenericWriter
...
std.Io: delete GenericWriter, AnyWriter, and null_writer
2025-08-29 03:48:45 -07:00
Andrew Kelley
640c11171b
LLVM backend:fix align 1 sret parameter load returned
...
closes #25067
2025-08-29 03:37:18 -07:00
Andrew Kelley
8023f3dceb
fix not discarding delimiter
...
perhaps these APIs have the defaults backwards, eh?
2025-08-28 18:30:57 -07:00
Andrew Kelley
e418197247
link.MachO: code sig size grows when emitting it
2025-08-28 18:30:57 -07:00
Andrew Kelley
5be9df710c
32-bit fixes
2025-08-28 18:30:57 -07:00
Andrew Kelley
f7884961c2
update more to avoid GenericWriter
2025-08-28 18:30:57 -07:00
Andrew Kelley
8f4cb4614f
compiler: update not to use GenericWriter
2025-08-28 18:30:57 -07:00
Andrew Kelley
5d7507214d
aro: update to not use GenericWriter
2025-08-28 18:30:57 -07:00
Andrew Kelley
2151b10a41
more updates to not use GenericWriter
2025-08-28 18:30:57 -07:00
Andrew Kelley
379d7bc9f6
compiler: update to not use GenericWriter
2025-08-28 18:30:57 -07:00
Andrew Kelley
6713745ec4
link.Elf: update to not use GenericWriter
2025-08-28 18:30:57 -07:00
Andrew Kelley
cc931660eb
link.MachO: update to not use GenericWriter
2025-08-28 18:30:57 -07:00
Andrew Kelley
c8b983c59a
link.Wasm: update for new writer API
2025-08-28 18:30:57 -07:00
Andrew Kelley
57dbc9e74a
std.Io: delete GenericWriter
2025-08-28 18:30:57 -07:00