Commit Graph
34717 Commits
Author SHA1 Message Date
Alex Rønne Petersen b4ddff396d llvm: Fix C ABI integer promotion for s390x. 2024-10-03 06:19:23 +02:00
Alex Rønne Petersen 60f55b2bd2 std.c: Fix Stat struct layout for mips/mipsel with glibc.
std.os.linux.dev_t for mips32 is u64, but glibc uses u32.

Closes #21276.
2024-10-03 05:51:16 +02:00
Alex Rønne Petersen 530edea1ca test: Rewrite the target triple list for llvm_targets.
This removes some triples that didn't really make sense (e.g. msp430-linux) and
adds more exhaustive coverage of supported triples.
2024-10-03 05:01:24 +02:00
Alex Rønne Petersen 3f322c49bc std.Target: Remove Os.Tag.shadermodel.
This was a leftover from the Cpu.Arch.dxil removal.
2024-10-03 05:01:24 +02:00
Alex Rønne Petersen c2ba6127c0 std.Target: Fix getVersionRangeTag() for bridgeos.
Until we actually figure out a version range for this, we shouldn't classify
this as using semver. Doing so results in a panic when trying to access the
version range since it's not in fact a semver value.
2024-10-03 05:01:24 +02:00
Alex Rønne Petersen 7d71e794dd std.Target: Fix Cpu.Model.generic() for arc, csky, and xtensa.
Only targets for which we don't source CPU models/features from LLVM should use
the fallback prong in this switch. Also make it exhaustive to catch similar
mistakes in the future.
2024-10-03 05:01:24 +02:00
Alex Rønne Petersen cb1ac0bb2f update_cpu_features: Don't delete the output file if there are no CPU features.
At bare minimum, the compiler expects std.Target.<arch>.cpu.generic to work for
any given architecture when generating the builtin module. So rather than try to
hack that into working when the affected modules are omitted, just actually keep
them.

This affected lanai and xcore.
2024-10-03 05:01:14 +02:00
Alex Rønne Petersen 4cc1b060eb glibc: Update abilists file for loongarch64-linux-gnusf support.
Also a 269 KB -> 240 KB size reduction due to the new format version.
2024-10-03 04:39:39 +02:00
Alex Rønne Petersen 0be22b1e41 glibc: Update abilists parsing to the new format version. 2024-10-03 04:39:39 +02:00
Alex Rønne Petersen c38dd72ca7 std.zig.target: Add loongarch64-linux-gnusf. 2024-10-03 04:39:39 +02:00
Alex Rønne Petersen 6635d02143 glibc: Add loongarch64-linux-gnusf headers. 2024-10-03 04:39:39 +02:00
Alex Rønne Petersen f03142cfe9 process_headers: Add loongarch64-linux-gnusf. 2024-10-03 04:39:39 +02:00
Alex Rønne Petersen 1e838eba75 std.math: Re-enable isSignalNan test on most targets.
This remains disabled on arm, aarch64, and powerpc, as well as for the C
backend, as it still fails for these targets.

See: https://github.com/ziglang/zig/issues/14366
2024-10-03 04:38:53 +02:00
Alex Rønne Petersen f99097e68f Merge pull request #20805 from xdBronch/lang-flag
handle -x language flag without spaces
2024-10-03 03:58:16 +02:00
Chris Boesch e22d79dacb std.posix: Added error message 'ProcessNotFound' for reading and writing in a Linux process (#21430)
* Added error message 'ProcessNotFound' for reading and writing in a Linux
process.
This error occurs if the process to be read from or written to no longer exists.
Fixes #19875

* Added error message "ProcessNotFound" for error forwarding.

* Add error messgae for forwarding.

* Added message for forwarding.

* Error set completed.

* Fixed format error.

* Changed comments to doc comments.
2024-10-03 01:54:30 +00:00
Alex Rønne Petersen 85bf1e2b1f llvm: Implement sub-architecture translation in targetTriple(). 2024-10-03 02:39:12 +02:00
Alex Rønne Petersen 710a3b37e2 link.MachO: Add exhaustive handling for all Apple target triples. 2024-10-03 00:57:36 +02:00
Alex Rønne Petersen 125c043abc link.Elf: Set EI_OSABI value correctly depending on target arch/OS. 2024-10-03 00:57:34 +02:00
Alex Rønne Petersen 8ee52f99ce Merge pull request #21505 from alexrp/cpu-features-exts
`update_cpu_features`: Add support for parsing `DefaultExts` as used for aarch64.
2024-10-03 00:41:48 +02:00
Alex Rønne Petersen 0548a61f53 Merge pull request #21469 from alexrp/riscv32-tests
`test`: Add `riscv32-linux-(none,musl,gnu)` triples for module tests.
2024-10-03 00:16:43 +02:00
Alex Rønne Petersen e0ac776749 Merge pull request #21504 from alexrp/android-softfp
`std.Target`: Introduce `Abi.androideabi` to distinguish the soft float case.
2024-10-03 00:15:35 +02:00
Alex Rønne Petersen 26d35cc112 Merge pull request #21524 from alexrp/fix-reader-test
`std.io.Reader`: Fix test erroneously using `undefined`.
2024-10-02 23:54:23 +02:00
Alex Rønne Petersen 038e002b1c Merge pull request #21527 from alexrp/elf-emulations
`link.Elf`: Make `getLDMOption()` exhaustive with regards to LLD's `parseEmulation()`.
2024-10-02 23:22:44 +02:00
xdBronch 6319805ad1 handle -x language flag without spaces 2024-10-02 23:19:26 +02:00
Alex Rønne Petersen e652318c13 Merge pull request #21513 from pseudocc/rtattr
std.os.linux: extend rtattr.type to support IFA_*
2024-10-02 22:59:57 +02:00
Alex Rønne Petersen c13713dd02 std.math: Re-enable snan() test.
This now passes on all targets that we test in CI.

See: https://github.com/ziglang/zig/issues/14366
2024-10-02 04:08:24 +02:00
Alex Rønne Petersen 354ea625e5 test: Re-enable "bitcast nan float does not modify signaling bit" for LLVM + arm.
This now passes on all targets that we test in CI.

See: https://github.com/ziglang/zig/issues/14366
2024-10-02 04:08:24 +02:00
Alex Rønne Petersen b569ead29e std.elf: Make int() and int32() functions private.
These have no callers outside std.elf. Even if the standard library should
provide functions like these, std.elf is probably not the place, given how
general they are.
2024-10-01 04:35:14 +02:00
Alex Rønne Petersen 9bbfc864af std.elf: Parse and make available some extra fields on Header.
Closes #19830.
2024-10-01 03:54:42 +02:00
Alex Rønne Petersen 604ff131dd std.elf: Add OSABI enum sourced from binutils. 2024-10-01 03:54:22 +02:00
Alex Rønne Petersen 5db04e0595 std.elf: Define EI_(OSABI,ABIVERSION,PAD) constants. 2024-10-01 03:53:58 +02:00
Alex Rønne Petersen 496a067d3f std.elf: Define ET.(LOOS,HIOS) constants. 2024-10-01 03:53:27 +02:00
Michael Ortmann 3b465ebec5 std.start: dont query stack limit for wanted stack size 0 (#21533) 2024-09-28 23:06:28 -07:00
Andrew Kelley 0cdec976e4 Merge pull request #21520 from ziglang/no-formatted-panics
formalize the panic interface

closes #17969
closes #20240
2024-09-28 15:58:41 -07:00
Alex Rønne Petersen 537a873b17 Initial port work for *-windows-itanium support.
https://llvm.org/docs/HowToBuildWindowsItaniumPrograms.html

This is a weird middle ground between `*-windows-gnu` and `*-windows-msvc`. It
uses the C++ ABI of the former while using the system libraries of the latter.
2024-09-28 21:43:52 +02:00
Andrew Kelley 2857ca1edc revert safety test cases to rely on deprecated old API
in case someone wants to pursue the idea of making the panic interface a
struct, this will reduce churn.
2024-09-28 12:16:41 -07:00
Jakub Konka 777e722b06 macho: increase pre-allocated vmsize for __TEXT_ZIG segment 2024-09-28 11:59:51 -07:00
Jonathan Marler e0fdbfb705 build: make dependency cache hash map unmanaged
Allows Build.Graph to initialize dependency_cache with a default value.
2024-09-27 09:44:44 -06:00
Jonathan Marler 28189b0fa5 build: move dependency cache into Graph
The dependency cache is shared amongst all Build objects. This is currently
done by allocating a single instance and storing a reference to it in each
Build object.  However, the Graph object already exists to host shared
state so by moving it there we reuse the same pattern for shared state
and avoid an extra object on the heap.
2024-09-27 09:38:59 -06:00
Andrew Kelley 737b581681 disable plan9 test
This experimental target has no recent active maintainer. It's the only
linker backend complaining about this branch and I can't make sense of
the stack trace.

This can be fixed asynchronously by anyone who wants to maintain plan9
support. It does not need to block this branch.
2024-09-26 21:02:14 -07:00
Andrew Kelley 2e14cbe9cd Sema: better utility function semantics
better names, return error instead of panicking, better diagnostics, use
the standard APIs for resolving values
2024-09-26 20:53:26 -07:00
Andrew Kelley 5b1a9fbb45 update crash report to the new panic interface 2024-09-26 20:25:09 -07:00
Andrew Kelley 37d1da5bed I think it's better to put the imports at the top 2024-09-26 20:24:46 -07:00
Andrew Kelley 7f4c0e010d update safety test cases to new panic API
although they would also pass simply reverted to master branch because
I made the deprecated API still work for now (to be removed after 0.14.0
is tagged)
2024-09-26 17:14:17 -07:00
Andrew Kelley db8c074476 fix still calling std.builtin.panic sometimes 2024-09-26 16:46:02 -07:00
Andrew Kelley 1b491e640d fixes and make sema report errors when std.builtin wrong
instead of panicking
2024-09-26 16:06:05 -07:00
Andrew Kelley c9c080a187 embrace panic helpers
Introduces `std.builtin.Panic` which is a complete interface for
panicking. Provide `std.debug.FormattedPanic` and
`std.debug.SimplePanic` and let the user choose, or make their own.
2024-09-26 16:06:05 -07:00
Andrew Kelley fcfbedc2f0 work around riscv64 backend deficiencies 2024-09-26 16:06:05 -07:00
Alex Rønne Petersen 67f5d4f78c link.Elf: Make getLDMOption() exhaustive with regards to LLD's parseEmulation(). 2024-09-26 21:49:58 +02:00
Alex Rønne Petersen 59ae51199e std.Target: Return EM_ARC_COMPACT instead of EM_ARC_COMPACT2 for arc.
Also fix an incorrect related comment in start.zig.
2024-09-26 21:45:49 +02:00