Commit Graph

36606 Commits

Author SHA1 Message Date
Jacob Young f4a31bed98 x86_64: remove broken const value tracking 2025-04-10 02:04:52 -04:00
Jacob Young 1eb5d70d12 x86_64: fix switch on big ints 2025-04-09 20:14:12 -04:00
Jacob Young bc10131db1 x86_64: rewrite scalar @mulWithOverflow
Closes #19607
2025-04-09 20:14:12 -04:00
Jacob Young 55ce756868 x86_64: rewrite scalar @subWithOverflow 2025-04-09 20:14:12 -04:00
Jacob Young 80068b6e59 x86_64: rewrite scalar @addWithOverflow 2025-04-09 20:14:12 -04:00
Jacob Young 426684b2f8 behavior: fix issues with x86_64 backend tests
* Oops, I accidentally disabled most of them.
 * Cleanup some workarounds for now closed issues.
 * Test binary operations with more scalar integer types.
2025-04-09 20:14:12 -04:00
Alex Rønne Petersen ddcf6fcdf3 compiler: Allow using LLVM's SPIR-V backend. 2025-04-09 19:32:57 +02:00
Pat Tullmann 991560fb49 linux.zig: epoll_wait: pass kernel sigset size
Linux kernel syscalls expect to be given the number of bits of sigset that
they're built for, not the full 1024-bit sigsets that glibc supports.

I audited the other syscalls in here that use `sigset_t` and they're all
using `NSIG / 8`.

Fixes #12715
2025-04-09 16:37:58 +02:00
Manlio Perillo f4e3631655 std.zon.parse: Fix typo in test "std.zon parse bool"
Replace "Correct floats" with "Correct bools".
2025-04-09 14:43:12 +02:00
Mun Maks 4fc783670a Sema/arith.zig: Fixing more typos from #23177.
This is a complementary PR to #23487 (I had only found one typo before).

Now I've looked at the whole `arith.zig` file, trying to find other potential problems.

Discussion about these changes:
https://github.com/ziglang/zig/pull/23177#discussion_r1997957095
2025-04-09 12:53:11 +01:00
Alex Rønne Petersen 79a620d617 zig_clang: Fix ZigClangAPValue being underaligned vs clang::APValue.
Also add a static_assert to catch future alignment mismatches on this type, and
reflect recent layout changes in the Zig bindings.
2025-04-09 11:53:24 +02:00
Meghan Denny 70437354c0 std: add nvidia as a known arm implementer 2025-04-09 10:14:42 +02:00
Techatrix 3830fc041b Compilation: Fix logic in addCCArgs() for various file types and flags.
Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
2025-04-09 10:12:42 +02:00
Alex Rønne Petersen 1bfc71d4da build: Set LLVM_BUILD_STATIC/CLANG_BUILD_STATIC when linking statically.
This is needed since LLVM 20, particularly for Windows.
2025-04-09 10:11:52 +02:00
imreallybadatnames™️ 7733b5dbe6 Merge pull request #23501 from imreallybadatnames/master
Step.Compile: use LtoMode enum for lto option
2025-04-09 05:16:36 +00:00
SuperAuguste 227788e6d5 Fix mach-o naming for sancov sections 2025-04-09 04:48:39 +02:00
Alex Rønne Petersen 9bbac42886 Merge pull request #23478 from alexrp/bsd-versions
`std.Target`: Bump some minimum OS versions for BSDs
2025-04-08 18:27:39 +02:00
Alex Rønne Petersen 2d33cc2e42 Merge pull request #23376 from sweiglbosker/m68k-archbits 2025-04-08 06:04:16 +02:00
Alex Rønne Petersen d8153fa74a Merge pull request #23495 from alexrp/loongarch
Some `loongarch64-linux` porting work
2025-04-08 01:02:24 +02:00
Matthew Roush fb1d4990cb Make translate-c more robust in handling macro functions.
Translate-c didn't properly account for C macro functions having parameter names that are C keywords. So something like `#define FOO(float) ((float) + 10)` would've been interpreted as casting `+10` to a `float` type, instead of adding `10` to the parameter `float`.

An example of a real-world macro function like this is SDL3's `SDL_DEFINE_AUDIO_FORMAT` from `SDL_audio.h`, which uses `signed` as a parameter.
2025-04-07 20:53:38 +00:00
Alex Rønne Petersen f2f36c49c8 compiler: Switch default code model for loongarch64 to medium.
LLVM 21 will change the default, but we're making the change now to make
building Zig for loongarch64 less painful.

https://github.com/llvm/llvm-project/pull/132173
2025-04-07 21:36:56 +02:00
Maksat 4995509028 #23177, maintainter 'mlugg' wanted to fix that typo, 4 weeks without changes, might be forgotten 2025-04-07 16:50:28 +01:00
Alex Rønne Petersen f13292abbc zig_clang: Fix size of ZigClangAPValue for Clang 20.
Fixes failing tarball builds for x86-linux and x86-windows.

The MSVC special case here is very sus, but that's a problem for another day.
2025-04-07 17:41:06 +02:00
Alex Rønne Petersen f8439805d7 test: Add loongarch64-linux-(none,musl,gnu) to the test matrix.
Currently skips std tests which have many issues.
2025-04-07 16:03:22 +02:00
Alex Rønne Petersen 1cab57f361 std.os.linux: Add some missing arch bits for loongarch64. 2025-04-07 16:03:22 +02:00
Alex Rønne Petersen 9423712519 std: Disable usage of fstat() and friends on loongarch.
Like riscv32, loongarch exclusively uses statx().
2025-04-07 16:03:22 +02:00
Alex Rønne Petersen 6880d2c4a3 test: Disable @prefetch behavior test for loongarch.
https://github.com/llvm/llvm-project/issues/134624
2025-04-07 16:03:22 +02:00
Stefan Weigl-Bosker bcb4ba9afd std.os.linux: use heap.pageSize() instead of MMAP2_UNIT 2025-04-07 13:37:01 +02:00
Stefan Weigl-Bosker 6fd358d287 std.os.linux: add arch bits for m68k
fixup
2025-04-07 13:36:45 +02:00
Alex Rønne Petersen 4b5941c54b start: Reduce stack alignment for hexagon.
The ABI requires 8-byte alignment, not 16.
2025-04-07 13:09:10 +02:00
Alex Rønne Petersen d3bf6c518f start: Align the stack on m68k. 2025-04-07 13:09:10 +02:00
Stefan Weigl-Bosker 8fea9f68e8 start: fix pc register syntax for m68k 2025-04-07 13:09:10 +02:00
SuperAuguste 36b9e56753 Remove overzealous LLVM anti-instrumentation attributes 2025-04-07 07:53:42 +02:00
Alex Rønne Petersen 45a54ef4fa libcxx: Backport llvm/llvm-project#134278. 2025-04-06 16:53:10 +02:00
Alex Rønne Petersen c2f5515fb0 glibc: Add missing stubs-lp64s.h for loongarch64-linux-gnusf.
https://sourceware.org/bugzilla/show_bug.cgi?id=32776
2025-04-06 14:24:49 +02:00
Ziyi Yan 61b87ebae2 Add lld path of linuxbrew installation (#23466)
Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
2025-04-06 06:25:39 +00:00
Alex Rønne Petersen c8631ec523 std.Target: Bump minimum Dragonfly BSD version to 6.0.0. 2025-04-06 08:05:07 +02:00
Alex Rønne Petersen af19161817 std.Target: Bump minimum OpenBSD version to 7.5.
Per: https://www.openbsd.org/faq/faq5.html#Flavors
2025-04-06 08:05:07 +02:00
Alex Rønne Petersen a88db11c2a std.Target: Bump minimum NetBSD version to 9.4.
Per: https://www.netbsd.org/releases
2025-04-06 08:05:07 +02:00
Alex Rønne Petersen b22d53a5e7 test: Remove some dead FreeBSD targets from llvm_targets.
These were dropped in FreeBSD 12.x, and we now require 13.4+.
2025-04-06 08:05:07 +02:00
Alex Rønne Petersen 88e8e9fb91 std: Remove some FreeBSD version checks and resulting dead code.
We now require FreeBSD 13.4+.
2025-04-06 08:05:04 +02:00
Alex Rønne Petersen ae98d79c87 std.Target: Bump minimum FreeBSD version to 13.4.
Per: https://www.freebsd.org/releases
2025-04-06 07:44:38 +02:00
Jacob Young 470e2b63d9 Dwarf: handle undefined type values
Closes #23461
2025-04-05 21:42:33 -04:00
Dacheng Gao 596e0bd47b std.os.linux: add constants for ETH 2025-04-06 02:52:20 +02:00
Jacob Young 9827ffe1de x86_64: fix incorrect handling of unreusable operands
Closes #23448
2025-04-05 20:49:56 -04:00
Jan200101 1a5dcff8e4 std.Build: update build-id flag description
it now denotes:
- all supported styles
- what a given style outputs
- what formats a given style supports
2025-04-05 22:11:07 +02:00
homersimpsons 95fdbc579f pow: fix typo 0 instead of inf 2025-04-05 21:20:10 +02:00
Andrew Kelley 0cd31fc7ff Merge pull request #22780 from ziglang/llvm20
LLVM 20
2025-04-05 01:46:13 -04:00
Andrew Kelley cefe65c1b8 ci: update tarballs to 0.15.0-dev.203+53270f008
these have assertions enabled
2025-04-04 15:28:18 -07:00
Andrew Kelley 8acedfd5ba Merge pull request #23459 from ziglang/linked-lists
de-genericify linked lists
2025-04-04 17:48:06 -04:00