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
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
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
Jakub Konka
f4c4ca4b4c
elf: fix condition for skipping symbols if atom is dead
...
Skipping the symbols too early when resolving would end up in the
linker not deduping CIEs fully.
2024-09-23 06:56:36 +02:00
Alex Rønne Petersen
a9d1c6acb2
libunwind: Use -Wno-dll-attribute-on-redeclaration for Windows like upstream.
...
This silences a bunch of noisy warnings when building libunwind.
2024-09-21 01:20:36 +02:00
Alex Rønne Petersen
894b732630
Partially revert "LLVM: work around @floatFromInt bug"
...
This partially reverts commit ab4d6bf468bd8cba4ffd2d700d83e9707f5307b1.
2024-09-19 18:20:21 -07:00
Luuk de Gram
3acf997692
link.Wasm.Feature: Update to mirror std.Target.wasm.
2024-09-19 18:20:21 -07:00
Alex Rønne Petersen
0082475ddb
Compilation: Synchronize some libcxx CXXFLAGS with upstream.
2024-09-19 18:20:21 -07:00
Alex Rønne Petersen
a4d0a01243
std.Target: Add bridgeos tag to Os.
2024-09-19 18:20:21 -07:00
Alex Rønne Petersen
a27f4072ec
llvm: Stop emitting shl/xor ops for constant packed structs.
...
This is no longer supported in LLVM 19; fall back to the generic code path.
2024-09-19 18:20:21 -07:00
Alex Rønne Petersen
9f669df1b3
libcxx: Synchronize some CXXFLAGS with upstream.
2024-09-19 18:20:21 -07:00
Alex Rønne Petersen
1c8f0b8909
libcxx: Update to LLVM 19.
...
* Moved the tz.cpp patch to experimental/tzdb.cpp.
* Extended the __config_site patch to a few more files.
2024-09-19 18:20:21 -07:00
Alex Rønne Petersen
70a1805e46
libunwind: Synchronize some CFLAGS/CXXFLAGS with upstream.
2024-09-19 18:20:21 -07:00
Alex Rønne Petersen
f69ff5e9b5
clang: Update options data to Clang 19.
2024-09-19 18:20:21 -07:00
Alex Rønne Petersen
41e5acd89d
zig_clang: Update to Clang 19.
...
Co-authored-by: David Rubin <daviru007@icloud.com>
2024-09-19 18:20:20 -07:00
Alex Rønne Petersen
973ebeb610
zig_llvm: Update to LLVM 19.
2024-09-19 18:20:20 -07:00
Alex Rønne Petersen
da8f81c78b
compiler: Update LLVM/Clang driver files to LLVM/Clang 19.
2024-09-19 18:20:20 -07:00
mlugg
2111f4c38b
Sema: mark export on owner nav when exporting function alias
...
Resolves : #20847
2024-09-18 21:42:47 +01:00
Maciej 'vesim' Kuliński
feaee2ba17
cc: Add support for -Wp,
2024-09-17 23:54:04 -07:00
Matthew Lugg
41330c96ae
Merge pull request #21428 from mlugg/compare-to-undef
...
Sema: return undefined on comparison of runtime value against undefined
2024-09-17 14:34:10 +01:00
mlugg
4650e5b9fc
Sema: clean up cmpNumeric
...
There is one minor language change here, which is that comparisons of
the form `comptime_inf < runtime_f32` have their results comptime-known.
This is consistent with comparisons against comptime NaN for instance,
which are always comptime known. A corresponding behavior test is added.
This fixes a bug with int comparison elision which my previous commit
somehow triggered. `Sema.compareIntsOnlyPossibleResult` is much cleaner
now!
2024-09-17 11:00:38 +01:00
Matthew Lugg
7caa3d9da7
Merge pull request #21425 from mlugg/pointer-arith-inplace-res-ty
...
compiler: provide correct result types to `+=` and `-=`
2024-09-16 22:04:06 +01:00
Matthew Lugg
f3445f8f69
Merge pull request #21423 from mlugg/field-init-resolution
...
compiler: always resolve field inits, remove unncecessary eager resolution
2024-09-16 17:39:56 +01:00