Matthew Lugg
4303b43519
Merge pull request #22907 from MasonRemaley/import-zon-anon-type
...
Allow importing ZON without a result type (you can import build.zig.zon now)
2025-04-02 13:17:34 +01:00
Auguste Rame
bfab9582c7
DebugAllocator: Fix bucket removal logic causing segfault/leak ( #23390 )
...
Make buckets doubly linked
2025-04-02 12:15:04 +00:00
Matthew Lugg
896ffe6658
Merge pull request #22973 from MasonRemaley/zon-stop-on-node
...
Allow parsing into `Zoir.Node.Index` (it's easier to parse build.zig.zon at runtime now)
2025-04-02 12:00:23 +01:00
Misaki Kasumi
aa832d6a6d
std.os.linux: block all signals in raise
2025-04-02 18:50:14 +08:00
Mason Remaley
fa1695a8b0
std.zon.parse: make ast and zoir fields of Diagnostics non-optional
2025-04-02 06:09:21 +01:00
Mason Remaley
65649576db
std.zon.parse: rename Status to Diagnostics
...
This name is more appropriate and in line with the rest of `std`.
2025-04-02 06:08:55 +01:00
Mason Remaley
3b2fec17a4
std.zon: populate Zoir.Node.Index values with corresponding ZOIR node
...
This allows using `std.zon` to parse schemas which are not directly
representable in the Zig type system; for instance, `build.zig.zon`.
2025-04-02 06:08:04 +01:00
mlugg
dd3f01eadf
incremental: add test for ZON file without result type
2025-04-02 05:58:29 +01:00
mlugg
d8ac37fcc8
stage1: fix wasi_snapshot_preview1_fd_seek on cache files
...
`wasm2c` uses an interesting mechanism to "fake" the existence of cache
directories. However, `wasi_snapshot_preview1_fd_seek` was not correctly
integrated with this system, so previously crashed when run on a file in
a cache directory due to trying to call `fseek` on a `FILE *` which was
`NULL`.
2025-04-02 05:57:50 +01:00
Mason Remaley
87209954a7
Zcu: fix ZOIR cache bugs
...
* When saving bigint limbs, we gave the iovec the wrong length, meaning
bigint data (and the following string and compile error data) was corrupted.
* When updating a stale ZOIR cache, we failed to truncate the file, so
just wrote more bytes onto the end of the stale cache.
2025-04-02 05:54:04 +01:00
Mason Remaley
06ee383da9
compiler: allow @import of ZON without a result type
...
In particular, this allows importing `build.zig.zon` at comptime.
2025-04-02 05:53:22 +01:00
David Rubin
1b62a22268
Sema: increment extra index even if return type is generic
2025-04-02 01:34:17 +02:00
Carmen
9720bade7a
std.start: allow return uefi error union in main ( #23425 )
2025-04-01 17:10:10 +00:00
Carmen
fa86e09fb3
std.os.uefi.protocol: ziggify function signatures ( #23214 )
2025-04-01 10:47:51 +00:00
Ali Cheraghi
b636d56d6a
zon: normalize negative zeroes
2025-03-31 19:07:34 -04:00
Jacob Young
b431e9af97
Elf: fix incrementally reallocating the last atom in a section
2025-03-31 19:06:25 -04:00
mlugg
d53cc5e5b2
Sema: allow @ptrCast slice of zero-bit type to slice of non-zero-bit type
...
This is actually completely well-defined. The resulting slice always has
0 elements. The only disallowed case is casting *to* a slice of a
zero-bit type, because in that case, you cna't figure out how many
destination elements to use (and there's *no* valid destination length
if the source slice corresponds to more than 0 bits).
2025-03-31 19:03:08 -04:00
Parker Liu
0bdc0bb534
translate-c: fix referencing extern locals from nested blocks
2025-03-31 20:22:03 +03:00
Alex Rønne Petersen
0753af792a
Merge pull request #23371 from alexrp/ci-redundancy
...
Remove some `aarch64-linux` CI steps that are already covered by `x86_64-linux`
2025-03-31 17:51:25 +02:00
Alex Rønne Petersen
c118cd6406
Merge pull request #23417 from dweiller/zstd-fixes
...
Zstd fixes
2025-03-31 17:50:32 +02:00
Simon Brown
43ad87555e
Add quota for comptime sort, add test
2025-03-31 17:47:46 +02:00
dweiller
d034f2a87b
std.compress.zstd: ensure window size fits into usize
2025-03-31 17:22:44 +11:00
dweiller
7a7d6a02a5
std.compress.zstd: fix OOB access in literal decode
...
When decoding the literals section of a compressed block, the length of
the regenerated size of the literals must be checked against the buffer
literals are decoded into.
2025-03-31 17:22:44 +11:00
David Rubin
acfdad8581
Sema: convert slice sentinel to single pointer correctly
2025-03-30 03:41:00 +01:00
mlugg
f296eec294
Zcu: resolve layout of analyzed declaration type
...
Resolves : #19888
2025-03-29 22:46:31 +00:00
mlugg
eee752ea5a
compiler: "illegal behavior", not "undefined behavior", in errors
2025-03-29 18:40:23 -04:00
Frank Denis
ca1fc3827e
crypto.ecdsa: fix EcdsaP384Sha3_384 constant name ( #23403 )
...
Spotted by @deatil -- Thanks!
2025-03-29 14:52:34 +00:00
Sean Stasiak
6e8493daa3
check result of mmap() call to handle a large base_addr value correctly
2025-03-27 20:34:41 +01:00
Alex Rønne Petersen
c85534a5c6
stage1: Update zig1.wasm.
...
Signed-off-by: Alex Rønne Petersen <alex@alexrp.com>
2025-03-27 17:43:05 +01:00
Alex Rønne Petersen
2b57f6b717
Merge pull request #23378 from alexrp/build-zig-cleanup
2025-03-27 17:12:17 +01:00
Alex Rønne Petersen
cc9634a2d3
Merge pull request #23373 from alexrp/get-base-address
...
`std.process`: Some minor fixes for `getBaseAddress()`
2025-03-27 15:39:24 +01:00
GalaxyShard
b5a5260546
std.Build: implement addEmbedPath for adding C #embed search directories
2025-03-27 09:47:42 +01:00
blurrycat
fb188c3d18
std.posix: add getuid()/geteuid()
2025-03-27 07:58:27 +00:00
Alex Rønne Petersen
dc66f4384f
build: increase test-std max rss
2025-03-27 04:36:27 +00:00
Андрей Краевский
aac800ec65
std.meta.FieldType -> @FieldType
2025-03-27 03:49:38 +00:00
Alex Rønne Petersen
f71590d4c4
build.zig: Statically link LLVM libraries for experimental targets if requested.
2025-03-27 00:31:11 +01:00
Alex Rønne Petersen
09783b8544
ci: Build stage4 and run behavior tests with it on aarch64-linux-debug.
...
This ensures that we at least have some relatively lightweight coverage of
building and using stage4 from a newly built stage3.
2025-03-27 00:22:54 +01:00
Alex Rønne Petersen
db7db48028
Merge pull request #23339 from Iced-Sun/master
...
std.posix: update LFS64 interfaces for android bionic C
2025-03-26 23:25:08 +01:00
Alex Rønne Petersen
2489b5fd74
build.zig: Stop setting _WIN32_WINNT=0x601 (Windows 7) when targeting MinGW.
...
Our default minimum version for Windows has been Windows 10 for a while.
2025-03-26 23:12:55 +01:00
Felix "xq" Queißner
0ed905b9c6
Enables parsing for '-Wl,-rpath,' in pkg-config output, allows better support for NixOS linking.
2025-03-26 22:55:18 +01:00
Alex Rønne Petersen
ccffc7f108
build.zig: Don't disable LTO when targeting MinGW.
...
We stopped building mingw32.lib with LTO recently, so this is no longer needed.
2025-03-26 22:46:27 +01: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
b9efdbb412
std.process: Fix getBaseAddress() to handle all Darwin OSs.
2025-03-26 20:39:07 +01:00
Alex Rønne Petersen
d56a99442b
std.process: Don't use _mh_execute_header in getBaseAddress() on BSDs.
...
Only the Mach-O format has this symbol.
2025-03-26 20:39:07 +01:00
Alex Rønne Petersen
0cf5f0d0b0
std.process: Fix getBaseAddress() for linux + libc.
...
In this case we should use the getauxval() from libc, not our own.
2025-03-26 20:39:07 +01:00
wooster0
263ba34619
linux: don't export getauxval when not required
2025-03-26 20:37:35 +01:00
Eric Joldasov
27c1f2b3a0
zig build: allow to choose "lazy mode" for fetching process
...
`--fetch` flag now has additional optional parameter, which specifies
how lazy dependencies should be fetched:
* `needed` — lazy dependencies are fetched only if they are required
for current build configuration to work. Default and works same
as old `--fetch` flag.
* `all` — lazy dependencies are always fetched. If `--system` flag
is used after that, it's guaranteed that **any** build configuration
will not require additional download of dependencies during build.
Helpful for distro packagers and CI systems:
https://www.github.com/ziglang/zig/issues/14597#issuecomment-1426827495
If none is passed, behaviour is same as if `needed` was passed.
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net>
2025-03-26 19:00:33 +01:00
Kendall Condon
b4b1daf001
Allocator.create: properly handle alignment for zero-sized types ( #21864 )
2025-03-26 15:31:57 +00:00
Alex Rønne Petersen
27108cc99e
ci: Don't do the update-zig1 test steps on aarch64-linux.
...
We already do these on the x86_64-linux machines. They're fairly costly, and it
seems very unlikely to me that they'll uncover issues that wouldn't be uncovered
on x86_64-linux.
2025-03-26 16:30:21 +01:00
Alex Rønne Petersen
628092c8c7
ci: Don't build the compiler for arm-linux-musleabihf on aarch64-linux.
...
We already do this smoke test on the x86_64-linux machines, so I don't see a
point in duplicating this effort here.
2025-03-26 16:30:02 +01:00