Commit graph

17331 commits

Author SHA1 Message Date
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 6b6e336e07 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 b4fd57a9c1.

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
Alex Rønne Petersen
5cb8cdef10
Merge pull request #25045 from kada49/libc/common-impl-ceil
libc: delete some superfluous libc c implementations
2025-08-29 00:25:23 +02:00
David Senoner
70e22d79a4 libc: delete superfluous c and assembly trunc implementations 2025-08-28 20:09:07 +02:00
David Rubin
73a0b5441b
AstGen: forward result type through unary float builtins
Uses a new `float_op_result_ty` ZIR instruction tag.
2025-08-28 15:46:12 +01:00
David Senoner
f707de15a1 libc: delete superfluous c and assembly ceil implementation 2025-08-28 07:33:50 +02:00
Jacob Young
733008ec6b x86_64: fix multiplication overflow detection with adx
Closes #24965
2025-08-27 20:00:46 -07:00
Andrew Kelley
ca2e17e0a1 delete some vestigal dead code 2025-08-27 17:09:07 -07:00
Andrew Kelley
0339c5793a fetch: update xz API usage 2025-08-26 21:00:58 -07:00
David Senoner
9399fcddce libc: use zig isnan and derivates for mingw 2025-08-27 03:58:32 +02:00
Yefeng Li
aae5560712 Remove memcmp and memset from bundled musl and wasi 2025-08-27 03:35:18 +02:00