15573 Commits

Author SHA1 Message Date
Alex Rønne Petersen
25ee7b0ea8
compiler: Don't require PIC for aarch64-linux-ohos.
While Clang defaults to PIC for this target, it's not actually required.
2024-10-05 15:19:14 +02:00
Alex Rønne Petersen
09efa95f48
compiler: Don't link to nonexistent libc libraries for ohos. 2024-10-05 15:14:16 +02:00
Alex Rønne Petersen
84e192c88b
std.Target: Introduce Abi.ohoseabi to distinguish the soft float case.
For the same reason as #21504.
2024-10-05 15:13:37 +02:00
David Rubin
043b1adb8d
remove @fence (#21585)
closes #11650
2024-10-04 22:21:27 +00:00
Felix Queißner
7c74edec8d
Adds new cpu architectures propeller1 and propeller2. (#21563)
* Adds new cpu architectures propeller1 and propeller2.

These cpu architectures allow targeting the Parallax Propeller 1 and Propeller 2, which are both very special microcontrollers with 512 registers and 8 cpu cores.

Resolves #21559

* Adds std.elf.EM.PROPELLER and std.elf.EM.PROPELLER2
* Fixes missing switch prongs in src/codegen/llvm.zig
* Fixes order in std.Target.Arch

---------

Co-authored-by: Felix "xq" Queißner <git@random-projects.net>
2024-10-04 13:53:28 -07:00
Alex Rønne Petersen
eb363bf845
Merge pull request #21572 from alexrp/tests-llvm-targets
`test`: Rewrite the target triple list for `llvm_targets`.
2024-10-04 19:37:12 +02:00
Alex Rønne Petersen
b23a5b56c2
Merge pull request #21578 from alexrp/s390x-porting
Get module tests passing for `s390x-linux` and add it to CI
2024-10-04 14:40:32 +02:00
Alex Rønne Petersen
9b273f6b9a
Merge pull request #21570 from alexrp/windows-itanium
Initial port work for `*-windows-itanium` support.
2024-10-03 21:53:22 +02:00
Jakub Konka
69ce7f0e08
Merge pull request #21573 from alexrp/elf-header
Some additions to `std.elf` addressing #19830, plus some zld improvements
2024-10-03 15:19:58 +02:00
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
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
f99097e68f
Merge pull request #20805 from xdBronch/lang-flag
handle -x language flag without spaces
2024-10-03 03:58:16 +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
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
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
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
Jakub Konka
777e722b06 macho: increase pre-allocated vmsize for __TEXT_ZIG segment 2024-09-28 11:59:51 -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
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
Alex Rønne Petersen
67f5d4f78c
link.Elf: Make getLDMOption() exhaustive with regards to LLD's parseEmulation(). 2024-09-26 21:49:58 +02:00
Andrew Kelley
e8887829ca compile error instead of crash when root panic fn wrong 2024-09-26 12:35:14 -07:00
Andrew Kelley
61b20105e4 fix crash report not using mutexes correctly 2024-09-26 12:35:14 -07:00
Andrew Kelley
70746d580c better codegen for @panic with comptime-known operand 2024-09-26 12:35:14 -07:00
Andrew Kelley
b66cc5af41 reimplement integer overflow safety panic function calls
in the llvm backend.
2024-09-26 12:35:14 -07:00
Andrew Kelley
f2c8940aa6 reintroduce the std.builtin safety panic helpers
motivated by performance
2024-09-26 12:35:14 -07:00
Andrew Kelley
9ccf8d3332 fixes for this branch
I had to bring back some of the old API so that I could compile the new
compiler with an old compiler.
2024-09-26 12:35:14 -07:00
Andrew Kelley
4f8d244e7e remove formatted panics
implements #17969
2024-09-26 12:35:14 -07:00
Jakub Konka
50074a835a elf: remove unused code 2024-09-25 17:54:50 +02:00
Jakub Konka
10c68d05db elf: change how we create new program headers
We do not want to create additional ones per update that are duplicates
of existing ones.
2024-09-25 17:54:50 +02:00
Jakub Konka
992c6c3f68 elf: reset output symtab contexts before re-updating 2024-09-25 17:54:50 +02:00
Jakub Konka
82cf762b02 elf: reset (merge) sections sizes before updating 2024-09-25 17:54:50 +02:00
Jakub Konka
db3db1150e elf: do not re-create special program headers if already created 2024-09-25 17:54:50 +02:00
Jakub Konka
62c282ba46 elf: do not re-create synthetic sections if already created 2024-09-25 17:54:50 +02:00
Maciej 'vesim' Kuliński
4ceefca14b mips: use byval for all integer types 2024-09-25 07:37:03 -07:00
Andrew Kelley
efc98fcbeb disallow non-scalar sentinel types
see #17969
2024-09-25 03:02:05 -07:00
Alex Rønne Petersen
a40cdad18c tsan: Update to LLVM 19.1.0. 2024-09-24 23:58:21 -07:00
Krzysztof Wolicki
4d09fb491f
fetch: fix mutating unrelated fields when saving (#19816)
closes #19725
2024-09-24 13:38:13 -07:00
Alex Rønne Petersen
ebbc50d8be
std.Target: Introduce Abi.androideabi to distinguish the soft float case.
Abi.android on its own is not enough to know whether soft float or hard float
should be used. In the C world, androideabi is typically used for the soft float
case, so let's go with that.

Note that Android doesn't have a hard float ABI, so no androideabihf.

Closes #21488.
2024-09-24 09:23:24 +02:00
Alex Rønne Petersen
d1901c744c std.Target: Remove Cpu.Arch.dxil and ObjectFormat.dxcontainer.
See: https://devblogs.microsoft.com/directx/directx-adopting-spir-v

Since we never hooked up the (experimental) DirectX LLVM backend, we've never
actually supported targeting DXIL in Zig. With Microsoft moving away from DXIL,
that seems very unlikely to change.
2024-09-23 17:17:25 -07:00
Andrew Kelley
a08f8d44da
Merge pull request #21472 from alexrp/libunwind
`libunwind`: Update `gcc_personality_v0.c` to LLVM 19.1.0.
2024-09-23 13:19:14 -07:00
Will Lillis
943176bbfc
fix: Add error note when attempt is made to destructure error union (#21491)
closes #21417
2024-09-23 13:04:24 -07:00
Jakub Konka
e0acf43248 elf: always override existing __start/__stop symbols 2024-09-23 07:06:47 +02:00
Jakub Konka
7c2abff1e1 elf: only allocate __dso_handle symbol if not found in any object 2024-09-23 07:06:41 +02:00
Jakub Konka
6929a5f440 elf: remove dead code 2024-09-23 06:59:03 +02:00