Jacob Young
a3b0c242b0
x86_64: rewrite @splat
2025-05-17 18:00:17 -04:00
Jacob Young
6d68a494c8
x86_64: rewrite vector +|
2025-05-17 02:08:41 -04:00
wooster0
56fad6a195
make error messages prettier
...
Error messages never contain periods or grave accents.
Get rid of the periods and use apostrophes instead in
probably the only two error messages that had them.
2025-05-15 16:39:15 +01:00
Alex Rønne Petersen
bc3c50c21e
Merge pull request #23700 from sorairolake/rename-trims
...
chore(std.mem): Rename `trimLeft` and `trimRight` to `trimStart` and `trimEnd`
2025-05-12 17:11:52 +02:00
Alex Rønne Petersen
833d4c9ce4
Merge pull request #23835 from alexrp/freebsd-libc
...
Support dynamically-linked FreeBSD libc when cross-compiling
2025-05-12 01:19:23 +02:00
Alex Rønne Petersen
eeaa1b17c6
std.zig.target: Add FreeBSD libc support.
2025-05-10 12:19:26 +02:00
Alex Rønne Petersen
01390cc533
std.zig.LibCDirs: Add FreeBSD libc support.
2025-05-10 12:19:26 +02:00
Alex Rønne Petersen
35f30558ad
std.Build: Rename --glibc-runtimes to --libc-runtimes and enable it for musl.
2025-05-06 01:52:47 +02:00
Andrew Kelley
7bd3207921
make @memcpy and @memmove share panic handlers
2025-04-27 23:30:00 -07:00
Andrew Kelley
1b76d4c53a
Merge pull request #22605 from dweiller/memmove
...
add `@memmove` builtin
2025-04-27 14:39:21 -04:00
Shun Sakai
5fc4448e45
chore(std.mem): Rename trimLeft and trimRight
...
Rename `trimLeft` to `trimStart`, and `trimRight` to `trimEnd`.
`trimLeft` and `trimRight` functions remain as deprecated aliases for
these new names.
2025-04-27 18:03:59 +09:00
Alex Rønne Petersen
23440fbb99
std.Target: Remove Abi.gnuilp32.
...
* This has not seen meaningful development for about a decade.
* The Linux kernel port was never upstreamed.
* The glibc port was never upstreamed.
* GCC 15.1 recently deprecated support it.
It may still make sense to support an ILP32 ABI on AArch64 more broadly (which
we already have the Abi.ilp32 tag for), but, to the extent that it even existed
in any "official" sense, the *GNU* ILP32 ABI is certainly dead.
2025-04-26 22:12:31 +02:00
dweiller
898ca82458
compiler: add @memmove builtin
2025-04-26 13:34:16 +10:00
Chris Boesch
206bd1ced8
Merge pull request #23268 from chrboesch/i19875
...
std.posix: Added 'error.ProcessNotFound' where necessary
2025-04-14 22:20:44 +02:00
Alex Rønne Petersen
9352f379e8
Merge pull request #23529 from alexrp/2879-groundwork
...
Introduce libzigc for libc function implementations in Zig
2025-04-12 18:14:17 +02:00
Alex Rønne Petersen
ed9aa8f259
compiler: Move int size/alignment functions to std.Target and std.zig.target.
...
This allows using them in e.g. compiler-rt.
2025-04-11 05:22:00 -04:00
Jacob Young
c82e1fe880
Merge pull request #23355 from jacobly0/x86_64-rewrite
...
x86_64: start rewriting overflow operations
2025-04-11 05:21:44 -04:00
Alex Rønne Petersen
0a5c088ecc
compiler: Add hexagon-linux-musl support.
...
Closes #21588 .
2025-04-11 02:28:35 +02:00
Alex Rønne Petersen
71a237e764
std.zig.system: Force soft_float feature on for MIPS soft float targets.
...
Workaround for: https://github.com/llvm/llvm-project/issues/135283
2025-04-11 02:08:18 +02:00
Jacob Young
06eebafadd
AstGen: redistribute inline asm limits
2025-04-10 06:04:09 -04:00
Meghan Denny
70437354c0
std: add nvidia as a known arm implementer
2025-04-09 10:14:42 +02:00
Alex Rønne Petersen
8954e9748a
std.Target: Add Abi.muslf32 and Abi.muslsf.
2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
e9220525e8
Merge pull request #23447 from alexrp/cpuid-updates
2025-04-03 12:26:27 +02:00
Alex Rønne Petersen
e87387ee0c
std.zig.system.arm: Update some of the CPU lists based on LLVM 19.
2025-04-03 04:00:32 +02:00
Alex Rønne Petersen
9909465c1c
std.zig.system.darwin.macos: Handle tahiti/tupai in detectNativeCpuAndFeatures().
2025-04-03 02:42:20 +02:00
Alex Rønne Petersen
7289a073e5
std.zig.system.x86: Synchronize CPUID/XGETBV checks with LLVM 19.
...
Also fix a bunch of cases where we didn't toggle features off if the relevant
leaf isn't available, and switch XCR0 checks to a packed struct.
Closes #23385 .
2025-04-03 02:29:26 +02:00
Alex Rønne Petersen
171cea74b6
std.zig.system: Make getExternalExecutor() allow Darling for driverkit.
2025-04-02 23:58:55 +02:00
Alex Rønne Petersen
c3f2222a59
std.zig.system: Make getExternalExecutor() less opinionated about Wasmtime.
...
Wasmtime supports both wasm32 and wasm64, and can run freestanding WASM binaries
just fine (although the usefulness of the latter is fairly limited).
2025-04-02 23:58:55 +02:00
Alex Rønne Petersen
11db7eaf4e
std.zig.system: Fix a check in getExternalExecutor() to use the host argument.
2025-04-02 23:58:54 +02:00
Alex Rønne Petersen
55ee88f9c0
std.zig.system: Fix wine executable name in getExternalExecutor().
...
I'm not actually aware of any distro where the name is wine64, so just use wine
in all cases. As part of this, I also fixed the architecture checks to match
reality.
Closes #23411 .
2025-04-02 23:58:52 +02:00
Андрей Краевский
aac800ec65
std.meta.FieldType -> @FieldType
2025-03-27 03:49:38 +00:00
Pratham
5bb9963bbb
abiAndDynamicLinkerFromFile: return an error when the file is not actually dynamic ( #19928 )
2025-03-26 19:54:10 +00:00
Alex Rønne Petersen
c94d926bba
Merge pull request #23007 from rootbeer/posix-eaccess-eperm
...
lib/std: Make usage of PermissionDenied & AccessDenied consistent
2025-03-25 11:21:05 +01:00
Chris Clark
525466b49d
std.zig.Ast: Fix error case memory leak in parse()
2025-03-24 20:14:01 +01:00
Pat Tullmann
14c046fc07
lib/std: PermissionDenied/AccessDenied cleanup and fallout
...
This PR consistently maps .ACCES into AccessDenied and .PERM into
PermissionDenied. AccessDenied is returned if the file mode bit
(user/group/other rwx bits) disallow access (errno was `EACCES`).
PermissionDenied is returned if something else denies access (errno was
`EPERM`) (immutable bit, SELinux, capabilities, etc). This somewhat
subtle distinction is a POSIX thing.
Most of the change is updating std.posix Error Sets to contain both
errors, and then propagating the pair up through caller Error Sets.
Fixes #16782
2025-03-24 16:20:45 +01:00
sdzx-1
adee3ee9a2
typo: block_two_semicolon -> block_two
2025-03-24 07:05:17 +01:00
Jacob Young
c5c1c8538d
x86_64: rewrite wrapping multiplication
2025-03-21 21:51:08 -04:00
Jonathan Gautheron
ea57fb55ea
std.zig.c_translation: fix function pointer casting
2025-03-15 16:21:55 +02:00
Matthew Lugg
d0911786c9
Merge pull request #22397 from Techatrix/type-safe-ast
...
improve type safety of std.zig.Ast
2025-03-12 02:22:41 +00:00
Linus Groh
f660675467
std: Add support for SerenityOS in various places
...
Not nearly the entire downstream patchset but these are completely
uncontroversial and known to work.
2025-03-11 14:59:42 +00:00
Meghan Denny
0f6056903b
std: Abi.default: only require an os tag
2025-03-09 09:44:11 +01:00
Techatrix
4129f7ff5a
std.zig.Ast: store lbrace and rbrace token in data of .error_set_decl
...
This makes the `.data` field the better choice over the `.main_token` for this tag.
2025-03-07 22:22:01 +01:00
Techatrix
d84055f9c6
std.zig.Ast: don't set the data field on .error_value and .enum_literal
...
The main_token already has the necessary information.
2025-03-07 22:22:01 +01:00
Techatrix
ba74af2ae8
std.zig.Ast: update doc comments of Node.Tag
...
The existing comment are incomplete, outdated and sometimes incorrect.
2025-03-07 22:22:01 +01:00
Techatrix
ca6fb30e99
std.zig.Ast: improve type safety
...
This commits adds the following distinct integer types to std.zig.Ast:
- OptionalTokenIndex
- TokenOffset
- OptionalTokenOffset
- Node.OptionalIndex
- Node.Offset
- Node.OptionalOffset
The `Node.Index` type has also been converted to a distinct type while
`TokenIndex` remains unchanged.
`Ast.Node.Data` has also been changed to a (untagged) union to provide
safety checks.
2025-03-07 22:22:01 +01:00
Techatrix
6dcd8f4f75
std.zig.Ast: add blockStatements and builtinCallParams
2025-03-07 22:20:35 +01:00
Techatrix
c19f4c4402
fix ZonGen error message when encountering an array access
2025-03-07 22:20:35 +01:00
Techatrix
ad38af77fa
remove unreachable code paths from std.zig.Ast.lastToken
...
This function checks for various possibilities that are never produced
by the parser.
Given that lastToken is unsafe to call on an Ast with errors, I also
removed code paths that would be reachable on an Ast with errors.
2025-03-07 22:20:34 +01:00
Linus Groh
79460d4a3e
Remove uses of deprecated callconv aliases
2025-03-05 03:01:43 +00:00
Alex Rønne Petersen
3c924abb69
std.zig.llvm.bitcode_writer: Fix word byte order on big endian systems.
...
The bitcode format always uses little endian words. Prior to this commit, a
bitcode file produced on e.g. aarch64_be or s390x would fail to be loaded by
LLVM.
2025-03-04 17:28:03 -05:00