aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2025-04-10x86_64: add avx512 registersJacob Young
2025-04-10x86_64: support rip-relative addressing to labels in inline asmJacob Young
2025-04-10x86_64: remove broken const value trackingJacob Young
2025-04-09x86_64: fix switch on big intsJacob Young
2025-04-09x86_64: rewrite scalar `@mulWithOverflow`Jacob Young
Closes #19607
2025-04-09x86_64: rewrite scalar `@subWithOverflow`Jacob Young
2025-04-09x86_64: rewrite scalar `@addWithOverflow`Jacob Young
2025-04-09compiler: Allow using LLVM's SPIR-V backend.Alex Rønne Petersen
2025-04-09Sema/arith.zig: Fixing more typos from #23177.Mun Maks
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-09zig_clang: Fix ZigClangAPValue being underaligned vs clang::APValue.Alex Rønne Petersen
Also add a static_assert to catch future alignment mismatches on this type, and reflect recent layout changes in the Zig bindings.
2025-04-09Compilation: Fix logic in addCCArgs() for various file types and flags.Techatrix
Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
2025-04-09Merge pull request #23501 from imreallybadatnames/masterimreallybadatnames™️
Step.Compile: use LtoMode enum for lto option
2025-04-09Fix mach-o naming for sancov sectionsSuperAuguste
2025-04-07Make translate-c more robust in handling macro functions.Matthew Roush
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-07compiler: Switch default code model for loongarch64 to medium.Alex Rønne Petersen
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#23177, maintainter 'mlugg' wanted to fix that typo, 4 weeks without ↵Maksat
changes, might be forgotten
2025-04-07zig_clang: Fix size of ZigClangAPValue for Clang 20.Alex Rønne Petersen
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-07Remove overzealous LLVM anti-instrumentation attributesSuperAuguste
2025-04-05Dwarf: handle undefined type valuesJacob Young
Closes #23461
2025-04-05x86_64: fix incorrect handling of unreusable operandsJacob Young
Closes #23448
2025-04-05std.Build: update build-id flag descriptionJan200101
it now denotes: - all supported styles - what a given style outputs - what formats a given style supports
2025-04-05Merge pull request #22780 from ziglang/llvm20Andrew Kelley
LLVM 20
2025-04-03update compiler usage of DoublyLinkedList APIAndrew Kelley
2025-04-04compiler: Recognize -fno-sanitize=<...> in addition to -fsanitize=<...>.Alex Rønne Petersen
2025-04-04Revert "compiler: Don't consider powerpc to have red zone support yet."Alex Rønne Petersen
This reverts commit 4fad60fd3a70d0b059ce92ce825faabc1d2ac2e8. Closes #23056.
2025-04-04Compilation: Remove the PowerPC soft float preprocessor workaround.Alex Rønne Petersen
Closes #21411.
2025-04-04zig cc: Avoid passing any "CPU" features related to float ABI to Clang.Alex Rønne Petersen
2025-04-04llvm: Remove workaround for zero-length memset/memcpy on wasm.Alex Rønne Petersen
Closes #16360.
2025-04-04llvm: Use muslabin32/muslabi64 environments in the target triple.Alex Rønne Petersen
Closes #2909.
2025-04-04llvm: Allow FastISel on mips again.Alex Rønne Petersen
Closes #21215.
2025-04-04llvm: never_tail implies never_inline, so set noinline in this case too.Alex Rønne Petersen
2025-04-04Sema: Prevent tail calls of std.builtin.returnError().Alex Rønne Petersen
LLVM 20 started tail-calling it in some of our test cases, resulting in: error: AndMyCarIsOutOfGas /home/alexrp/Source/ziglang/zig-llvm20/repro.zig:2:5: 0x103ef9d in main (repro) return error.TheSkyIsFalling; ^ /home/alexrp/Source/ziglang/zig-llvm20/repro.zig:6:5: 0x103efa5 in main (repro) return error.AndMyCarIsOutOfGas; ^ /home/alexrp/Source/ziglang/zig-llvm20/lib/std/start.zig:656:37: 0x103ee83 in posixCallMainAndExit (repro) const result = root.main() catch |err| { ^ instead of the expected: error: AndMyCarIsOutOfGas /home/alexrp/Source/ziglang/zig-llvm20/repro.zig:2:5: 0x103f00d in main (repro) return error.TheSkyIsFalling; ^ /home/alexrp/Source/ziglang/zig-llvm20/repro.zig:6:5: 0x103f015 in main (repro) return error.AndMyCarIsOutOfGas; ^ /home/alexrp/Source/ziglang/zig-llvm20/repro.zig:11:9: 0x103f01d in main (repro) try bar(); ^
2025-04-04llvm: Update the list of targets that use native f16/f128.Alex Rønne Petersen
Closes #22003. Closes #22013.
2025-04-04compiler: Update max int alignments for some targets.Alex Rønne Petersen
2025-04-04llvm: Fix i128 alignment for various targets.Alex Rønne Petersen
This ABI bug was fixed in LLVM 20.
2025-04-04llvm: Set target-abi module flag.Alex Rønne Petersen
LLVM is increasingly making use of this module flag when present.
2025-04-04libtsan: Update to LLVM 20.Alex Rønne Petersen
2025-04-04zig cc: Update options data to Clang 20.Alex Rønne Petersen
2025-04-04std.Target: Add Abi.muslf32 and Abi.muslsf.Alex Rønne Petersen
2025-04-04std.Target: Update CPU models/features for LLVM 20.Alex Rønne Petersen
Closes #21818.
2025-04-04compiler: Updates for LLVM/Clang 20 API changes.Alex Rønne Petersen
2025-04-04libcxx: Update to Clang 20.Alex Rønne Petersen
See: * https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc/77319 * https://discourse.llvm.org/t/rfc-project-hand-in-hand-llvm-libc-libc-code-sharing/77701 We're dropping support for C++03 for Zig due to the first change; it would be insane to ship 1018 duplicate header files just for this outdated use case. As a result of the second change, I had to bring in a subset of the headers from llvm-libc since libc++ now depends on these. Hopefully we can continue to get away with not copying the entirety of llvm-libc.
2025-04-04zig cc: Update driver files to Clang 20.Alex Rønne Petersen
2025-04-02translate-c: fix function prototype decalared inside a functionParker Liu
* If a function prototype is declarated inside a function, do not translate it to a top-level extern function declaration. Similar to extern local variable, just wrapped it into a block-local struct. * Add a new extern_local_fn tag of aro_translate_c node for present extern local function declaration. * When a function body has a C function prototype declaration, it adds an extern local function declaration. Subsequent function references will look for this function declaration.
2025-04-02Zcu: fix ZOIR cache bugsMason Remaley
* 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-02compiler: allow `@import` of ZON without a result typeMason Remaley
In particular, this allows importing `build.zig.zon` at comptime.
2025-04-02Sema: increment extra index even if return type is genericDavid Rubin
2025-03-31Elf: fix incrementally reallocating the last atom in a sectionJacob Young
2025-03-31Sema: allow `@ptrCast` slice of zero-bit type to slice of non-zero-bit typemlugg
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-31translate-c: fix referencing extern locals from nested blocksParker Liu