Commit Graph
34717 Commits
Author SHA1 Message Date
Pavel Verigo 4b9d327f12 stage2-wasm: sign extend strategy 2024-07-02 15:02:59 +02:00
David Rubin e4447c54ea add ppc64 reloc definitions 2024-07-02 08:59:10 +02:00
Andrew Kelley da7c48324b CI: update macOS runner to 12
Apple has already dropped support for macOS 11.
GitHub Actions is dropping macOS 11 support now.
The Zig project is also dropping macOS 11 support now.
2024-07-02 02:04:10 -04:00
Andrew Kelley fed8d9054c Merge pull request #19267 from PanSashko/compile-dup-mod
Fix adding module arguments for Step.Compile
2024-07-02 01:10:34 -04:00
Sashko 8ef24461a0 DynLib: fix a typo in DynLib.openZ 2024-07-01 19:44:20 -04:00
Andrew Kelley 8db1490b8a update test build script to latest API 2024-07-01 16:38:02 -07:00
Sashko a717ac0340 Add a standalone test to cover the duplicate module bug 2024-07-01 16:36:39 -07:00
Sashko 604a332e21 Extract getZigArgs function in std.Build.Step.Compile 2024-07-01 16:36:13 -07:00
Wayne Wu cb308ba3ac langref: correct test runner path 2024-06-27 19:37:44 +00:00
Jakub Konka 1e3fb48256 Merge pull request #20428 from ziglang/macho-tsan
macho: support TSAN
2024-06-27 06:35:53 +02:00
Matthew Lugg a016ca6170 Merge pull request #20424 from mlugg/the-great-decl-split
Dismantle Decl a little bit more
2024-06-27 00:14:03 +01:00
Jakub Konka 766e281a72 macho: set allow_shlib_undefined to true when TSAN was requested 2024-06-26 22:01:00 +02:00
Jakub Konka e9309036b2 macho: print libtsan ref when dumping argv 2024-06-26 08:43:46 +02:00
Jakub Konka 6e78642d51 macho: link in TSAN if requested 2024-06-26 07:38:36 +02:00
mlugg 4cb5318088 InternPool: rename Depender to AnalSubject
This is essentially just a rename. I also changed the representation of
`AnalSubject` to use a `packed struct` rather than a non-exhaustive
enum, but that change is relatively trivial.
2024-06-26 05:28:04 +01:00
mlugg 5b523d0469 Zir: make src_line absolute for declaration instructions
We need special logic for updating line numbers anyway, so it's fine to
just use absolute numbers here. This eliminates a field from `Decl`.
2024-06-26 05:28:03 +01:00
Pavel Verigo 3e9ab6aa7b stage2-wasm: abs 128 bit 2024-06-24 20:50:39 +02:00
Bogdan Romanyuk ab4c461b76 std.mem.zeroes: explicit compile error for @Type(.EnumLiteral) 2024-06-24 00:43:09 +00:00
Alex Rønne Petersen 1ede3af9f6 std.zig.target: Remove armeb-windows-gnu and aarch64_be-windows-gnu.
This doesn't actually exist; Windows on Arm only runs on little endian. MinGW
also doesn't work for these targets at all.
2024-06-23 19:53:52 -04:00
David Rubin e73ae94b36 riscv: remove deprecated Module usages 2024-06-23 15:26:14 +01:00
Frank Denis f3655fd07d std.crypto.chacha: fix typo in XChaChaIETF.stream() (#20399)
Thanks to @r4gus for reporting this.

Fixes #20398
2024-06-23 13:20:18 +00:00
Bram 5f58956264 std: Extended type checks for Thread startFn return type 2024-06-23 04:35:00 +01:00
Sean f1b6f1aeb3 std.meta.hasUniqueRepresentation: Handle optional pointers correctly (#20366)
std.meta.hasUniqueRepresentation should now return true for non-slice optional pointers. Additional checks were added to the test to reflect this.
2024-06-23 03:33:45 +00:00
Michael Bradshaw 642093e04b Rename *[UI]LEB128 functions to *[UI]leb128 2024-06-23 04:30:12 +01:00
Andrew Kelley 0fcd59eada rename src/Module.zig to src/Zcu.zig
This patch is a pure rename plus only changing the file path in
`@import` sites, so it is expected to not create version control
conflicts, even when rebasing.
2024-06-22 22:59:56 -04:00
Pavel Verigo 6026bbd0ad stage2-wasm: fix div and rem 2024-06-22 21:35:36 +02:00
Alex Rønne Petersen 9be9b8ca90 std.Build.findProgram(): Try with and without the Windows executable extensions.
I renamed std.process.Child.CreateProcessSupportedExtension to WindowsExtension
and made it public to avoid duplicating the list of extensions.

While here, I also improved it to not misreport OOM from std.fs.realpathAlloc()
as a generic failure to find the program, but instead panic like the rest of the
build system does for OOM.

Closes #20314.
2024-06-21 15:41:03 -04:00
Felix "xq" Queißner 451550e86a Closes #20355: Enables dynamic linking for .os_tag == .other again 2024-06-21 00:12:44 -04:00
kcbanner 0d12caee29 - Fix ypedef -> typedef 2024-06-21 00:12:13 -04:00
Ryan G b6fd34aa46 std.static_string_map: Cast length of input for runtime initialization 2024-06-20 23:22:39 +00:00
Igor Anić b8890f8ee1 io_uring: don't assume completions order (2)
In my first [try](https://github.com/ziglang/zig/pull/20224) to fix
20212 I didn't reproduce bug on required kernel (6.9.2) and wrongly
concluded that first two completions have different order on newer
kernel.
On my current kernel (6.5.0) order of completions is: send1, recv,
send2. On 6.9.2 order is send1, send2, recv. This fix allows second two
completions to arrive in any order.
Tested on both kernels.

Fixes: #20212
2024-06-20 18:03:28 -04:00
Alex Kladov e03026507f std: fuzz test sort stability (#20284)
Stability of std sort was undertested before this change. Add a fuzz
test for more confidence.

Specifically, we used to have a single example test that used an array
of eight elements. That ends up exercising only a tiny fraction of
sorting logic, as it hits a hard-coded sorting network due to small
size.
2024-06-20 12:38:54 -07:00
Alex Kladov 5afd774db3 std: mark Build.args as const
I don't think these are intended to be mutated!
2024-06-20 15:17:31 -04:00
snoire f7d72ce881 build runner: add missing 'new' option to --summary error hint 2024-06-20 14:54:12 +03:00
Matthew Lugg f73be120f4 Merge pull request #20299 from mlugg/the-great-decl-split
The Great Decl Split (preliminary work): refactor source locations and eliminate `Sema.Block.src_decl`.
2024-06-20 11:07:17 +01:00
mlugg 2b677d1660 Sema: fix performance regression
LLVM fails to notice that in release builds, `logFn` ignores its
arguments, so their computation can be elided. So, LLVM fails to elide
this hashmap lookup. Its cost isn't too significant, but doing it in the
hottest loop in Sema adds up!

Technically, we could do the lookup a single time, before the loop, but
it was cleanest (and a little faster) to just disable this log call at
comptime when debug logging is disabled.
2024-06-20 08:41:07 +01:00
Alex Ambrose ccd3cc3266 Parse WASM linker flags as base 10, like clang
Resolves #19536
2024-06-20 07:34:24 +02:00
David Rubin e5a3a10a5a add error message for -fno-llvm -flld
We plan to remove all dependency on LLD either way, so this will not be a supported usecase.
2024-06-19 20:13:21 +02:00
Jakub Konka a154d8da8e Merge pull request #20070 from Rexicon226/riscv
more RISC-V backend progress
2024-06-19 17:42:08 +02:00
mlugg 1fdf13a148 AstGen: error for redundant @inComptime() 2024-06-19 03:43:13 +01:00
Isaac Freund 5f2bdafa39 std.posix: remove unchecked std.os.linux usage
Using std.os.linux directly in e.g. std.posix.timerfd_create() causes
the function to compile but silently fail at runtime when targeting any
OS other than Linux.

To catch errors like this at compile time, std.os.linux must only be
directly accessed within std.posix where there has been a comptime check
that the target os is in fact Linux.
2024-06-18 22:35:28 +02:00
Veikka Tuominen 7dc52a367a Merge pull request #20343 from rohlem/std-fix-recursive-union-eql
fix `std.testing.expectEqual`, `std.meta.eql` for `comptime`-only unions
2024-06-18 23:07:01 +03:00
rohlem 0ffeec4b4d fix std.meta.eql for comptime-only union
switch from `inline for` with `std.mem.eql`
to `inline else` and tag comparison.

add previously-failing test code.
2024-06-18 19:04:16 +02:00
rohlem 17ce3e5a17 fix std.testing.expectEqual for comptime-only union
switch from `inline for` with `std.mem.eql`
to `inline else` and tag comparison;
expectEqualDeep(Inner) was already doing this.

add a previously-failing test case.
2024-06-18 19:01:05 +02:00
mlugg 6a8cf25a8a cases: un-regress some notes
Since we now have source locations for reified types again, some error
notes have returned which were previously regressed by this branch.
2024-06-18 04:55:39 +01:00
mlugg 75395c99c5 Zir: track reifications across updates
This was always necessary, it was just missing logic. It is necessary
due to type equivalence rules.
2024-06-18 04:48:24 +01:00
mlugg 0486aa5081 Zir: provide absolute node for reify
Since we track `reify` instructions across incremental updates, it is
acceptable to treat it as the baseline for a relative source location.
This turns out to be a good idea, since it makes it easy to define the
source location for a reified type.
2024-06-18 04:48:24 +01:00
mlugg edf14777ba link.Wasm: correctly fetch source location when decl is a type
The comment explains the situation here. This is a bit of a hack, and
should be reworked when `Decl` is properly split up.
2024-06-18 04:30:06 +01:00
Andrew Kelley 04e08ea883 Merge pull request #20304 from ifreund/std-abi-fixes
std: fix a few ABI issues in the OS layer
2024-06-17 19:41:57 -04:00
Isaac Freund a1777cb5cb std: fix pthread_{get,set}name_np return type ABI
I believe this was accidentally broken when the E enum for errno values
was introduces. These functions are quite the special case in that they
return the error value directly rather than returning -1 and passing the
error value through the errno variable.

In any case, using a u16 as the return type at the ABI boundary where a
c_int is expected is asking for trouble.
2024-06-17 23:26:53 +02:00