Commit graph

36907 commits

Author SHA1 Message Date
Andrew Kelley
a6067c3821 compiler: delete dependency on LLVM ParseCommandLineOptions 2026-01-28 16:41:08 -08:00
lzm-build
757ec185f0 Add f16, f80 and f128 support for acos and asin (#30997)
The software impl of `acos` and `asin` depends on the `sqrt` op. Since support for `sqrt` in `f16`, `f80`, and `f128` has been added, the impl of `acos` and `asin` for `f16`, `f80`, and `f128` is now being supplemented.

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/30997
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
Co-authored-by: lzm-build <3575188313@qq.com>
Co-committed-by: lzm-build <3575188313@qq.com>
2026-01-28 23:33:35 +01:00
Andrew Kelley
3b10383114 std.meta: delete declList
dubious. if people want this logic they should take responsibility for
it in their own code.
2026-01-28 00:43:20 -08:00
Krzysztof Wolicki
204fa8959a Make functions on EnumMap always take a pointer to avoid copies of big EnumMaps 2026-01-28 03:13:37 +01:00
llogick
11c3b4bd41 Fix std.process.run leaking memory if child.wait returned an error 2026-01-28 03:12:00 +01:00
Alex Rønne Petersen
0f51f663f0
musl: update some hexagon headers from the quic fork 2026-01-27 23:24:57 +01:00
just_some_entity
06cf86abeb Fix BootServices.locateHandleLen() (#30877)
Fixes https://codeberg.org/ziglang/zig/issues/30876

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/30877
Reviewed-by: linus <mail@linusgroh.de>
Co-authored-by: just_some_entity <entity@jsentity.dev>
Co-committed-by: just_some_entity <entity@jsentity.dev>
2026-01-27 23:09:51 +01:00
Ryan Liptak
1655a666d5 windows_resources standalone test: Load a resource and check its data
Just a potential way to catch regressions and to ensure the resources actually make it into the binary correctly.
2026-01-27 20:48:59 +01:00
Ryan Liptak
29b7214027 Disentangle from error.CurrentWorkingDirectoryUnlinked
This error is actually only ever directly returned from `std.posix.getcwd` (and only on POSIX systems, so never on Windows). Its inclusion in almost all of the error sets its currently found in is a leftover from when `std.fs.path.resolve` called `std.process.getCwdAlloc` (https://github.com/ziglang/zig/issues/13613).
2026-01-27 20:48:25 +01:00
Andrew Kelley
3729a53eec Merge pull request 'libc: use common implementations for linux syscalls' (#30993) from GasInfinity/zig:libc-musl-syscalls into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/30993
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-01-27 07:48:58 +01:00
Alex Rønne Petersen
5652288e5d
zig fmt
oops
2026-01-27 07:05:14 +01:00
Alex Rønne Petersen
f7df723a91
Merge branch 'prefer-io-futex' 2026-01-27 05:37:40 +01:00
Alex Rønne Petersen
2c7d3c8007
std.debug: use debug_io for the futex in waitForOtherThreadToFinishPanicking 2026-01-27 05:37:01 +01:00
Alex Rønne Petersen
d4d210fb37
std.Build.WebServer: use Io futex operations instead of std.Thread.Futex 2026-01-27 05:37:01 +01:00
Robert Ancell
0af79e7b8c std.mem.readVarInt: Fix type name in doc comment (#31007)
Code used `ReturnType`, comment used `T` (which is what is used in similar functions).

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31007
Co-authored-by: Robert Ancell <robert.ancell@gmail.com>
Co-committed-by: Robert Ancell <robert.ancell@gmail.com>
2026-01-27 05:29:51 +01:00
Pablo Alessandro Santos Hugen
951ab1b18b std.Build.Step.Compile: pass target by pointer to isLibC*LibName 2026-01-27 05:29:04 +01:00
Alex Rønne Petersen
519f1eb361
musl: zero fp/lr registers in _start() and clone() on hexagon 2026-01-27 05:23:31 +01:00
Brian Orora
4e3fadd90e std.heap.DebugAllocator: fix account total_requested_bytes on resizeSmall 2026-01-27 00:09:48 +01:00
GasInfinity
73ed351022 fix(libzigc): export mincore 2026-01-27 00:06:18 +01:00
Carmen
5e9c484745 std.Io.Reader.takeStruct: dont assert buffer capacity is sizeOf(T) 2026-01-27 00:05:42 +01:00
Jay Petacat
97986184ca langref: Add table of largest integer types that can coerce to floats
Add vertical margin to the `.table-wrapper` class so that there's space
between the table and the test figures. It does not affect any of the
existing tables because the margin collapses with the adjacent `<p>`.
2026-01-26 23:52:30 +01:00
Andrew Kelley
1b235540c1 Revert "Io.Threaded: remove WSA_FLAG_OVERLAPPED from socket call"
The stated reason for this commit was cancelation didn't work. On
further review, we know why cancelation didn't work, and recent
enhancements on master branch make it easy to make it work.

Meanwhile, not using overlapped means that multiple threads cannot use
the same open socket handle. I also added line comments to explain the
choice in this revert commit.

This reverts commit fd3657bf8c.

closes #31011
reopens #30865
2026-01-26 14:16:28 -08:00
Andrew Kelley
5eb55ba866 Merge pull request 'compiler: use Io.MemoryMap' (#30961) from use-mmap into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/30961
2026-01-26 22:58:01 +01:00
Alex Rønne Petersen
8d4b8ab6a5 Merge pull request 'glibc 2.43' (#31005) from alexrp/zig:glibc-2.43 into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31005
2026-01-26 18:42:37 +01:00
jsentity
b4c86c850d Fix std.uefi.protocol.DevicePath.next() and add utility function isEnd() (#30887)
Fix for https://codeberg.org/ziglang/zig/issues/30884 and https://codeberg.org/ziglang/zig/issues/30885

Co-authored-by: jsentity <jsentity@noreply.codeberg.org>
Co-committed-by: jsentity <jsentity@noreply.codeberg.org>
2026-01-26 11:41:22 +01:00
Alex Rønne Petersen
ff8dbd010f
libc: update glibc crt0 code to 2.43 2026-01-26 05:56:54 +01:00
Alex Rønne Petersen
e4058f2c27
libc: update glibc abilists to 2.43 2026-01-26 05:56:54 +01:00
Alex Rønne Petersen
49afd7eee0
libc: update glibc headers to 2.43 2026-01-26 05:56:54 +01:00
Alex Rønne Petersen
f6ed859cb0
std.zig.target: update glibc triples for loongarch64 targets 2026-01-26 05:56:53 +01:00
Michael Dusan
f186809caf
std: impl process.totalSystemMemory for netbsd 2026-01-25 13:03:22 -05:00
Frank Denis
8709f53d44 crypto.ff: allow seamless chaining regardless of representation (#30913)
Finite field elements can be in regular or Montgomery form, and
chaining different operations use to require manual and error-prone
conversions.

Now:

- `add`, `sub` and `mul` convert the second operand to match the
first operand's form
- `sq` and `pow` preserve the input's Montgomery form
- `toPrimitive` and `toBytes` return `UnexpectedRepresentation` if
the element is in Montgomery form, preventing incorrect serialization

This is fully backwards compatible and allows seamless chaining of
operations regardless of their representation.
2026-01-25 17:42:01 +01:00
Alex Rønne Petersen
99ec1ee353
ci: temporarily disable x86_64-netbsd while I investigate failures 2026-01-24 21:08:20 +01:00
GasInfinity
9cf34a8d81
feat(libzigc): move over some linux syscalls
* does not move all of them, only those which map almost 1:1
* also removes their musl implementation
2026-01-24 20:41:15 +01:00
GasInfinity
b430cd62e4
feat(std.os.linux): add some missing syscalls 2026-01-24 20:41:15 +01:00
GasInfinity
d5c3bf25dc
feat(std.c): add _Exit 2026-01-24 20:41:15 +01:00
Andrew Kelley
a2ea36a517 zig libc: modify errno helper to eliminate @intCast
The vast majority of libc functions return `c_int` for the return value,
when setting errno. This utility function is for those cases.

Other cases can hand-roll the logic, or additional helpers can be added.
2026-01-24 20:18:18 +01:00
Alex Rønne Petersen
9d63dfaa81
link.Lld: give better exit status information for the lld child process
It's not nice to just throw away useful information.
2026-01-24 18:30:55 +01:00
Alex Rønne Petersen
cf48041b55 std.Thread.Condition: use pthread_cond_t impl when OS has no futex primitive
Same principle as #30835.
2026-01-24 16:44:55 +01:00
Lukas Lalinsky
5f950884a1 std.c: add IPPROTO_RAW for Darwin platforms
IPPROTO_RAW (255) was missing from the Darwin/macOS IPPROTO struct,
even though it is defined in system headers and supported by the platform.
This is a commonly used protocol for raw IP sockets.
2026-01-24 12:26:00 +01:00
Alex Rønne Petersen
1b544f447a Merge pull request 'enable thumb-windows-gnu module tests' (#30968) from alexrp/zig:windows-pic into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/30968
2026-01-24 02:09:41 +01:00
Andrew Kelley
5c42193b17 std.Io.Threaded: rework cancelation
Now it can handle sync cancelation and alertable cancelation on Windows.

Also fix the API of NtCancelIoFileEx
2026-01-23 12:59:36 -08:00
Alex Rønne Petersen
e437efd601
test: enable thumb-windows-gnu module tests
We use long calls for these just like thumb*-linux-* to prevent range issues as
the binaries grow larger over time.

We also need function and data sections due to the many __stack_chk_guard
references within the std test binary; without these options, the linker is not
able to insert range thunks in between functions because the std binary just has
one giant .text section that's opaque to the linker.

closes https://codeberg.org/ziglang/zig/issues/30923
2026-01-23 21:16:03 +01:00
Alex Rønne Petersen
c699bb8134
zig cc: don't bother passing -fPIC to Clang for Windows and UEFI targets
It's completely ignored anyway, by design, for compatibility reasons.
2026-01-23 21:16:03 +01:00
Alex Rønne Petersen
909159ad8e
compiler: don't enforce PIC for x86-windows and thumb-windows
Only x86_64-windows and aarch64-windows actually require PIC.
2026-01-23 21:16:01 +01:00
Alex Rønne Petersen
20fae334ac
compiler: UEFI does not support dynamic linking 2026-01-23 19:50:51 +01:00
Alex Rønne Petersen
2774436a83
ci: bump riscv64-linux-debug timeout by 1 hour 2026-01-23 16:17:47 +01:00
Andrew Kelley
499ba5d55c compiler: use Io.MemoryMap
Also make setLength return error.OperationUnsupported when it cannot be
done atomically.
2026-01-22 21:25:53 -08:00
Andrew Kelley
193c747b03 link.MappedFile: refactor std.Io -> Io 2026-01-22 21:25:53 -08:00
Andrew Kelley
1badb2a840 std.Io.Threaded: dirCreateFileWindows uses NtCreateFile directly 2026-01-22 18:08:13 -08:00
InKryption
305fd06756 Build: check if dynamic lib installed for symlinks
If the library isn't actually installed, `generated_bin` will be null,
causing this to panic about a missing dependency for itself; checking
for this state avoids this.
2026-01-22 22:28:28 +01:00