kcbanner
7edd69d8aa
tests: add tests for is_dll_import externs
...
- tests/standalone/extern wasn't running its test step
- add compile error tests for thread local / dll import @extern in a comptime scope
2024-10-22 18:46:14 -04:00
kcbanner
b87fa93500
Change ExternOptions.dll_storage_class
to is_dll_import
...
It wouldn't make sense to have passe `.export` here, and that was
in fact a compile error - so simply make this a bool instead.
2024-10-22 12:41:35 -04:00
kcbanner
a4690ecb1f
Cause a compilation error to occur if using @extern with is_dll_import in a comptime scope.
...
Add a note about thread local / dll import being the cause.
2024-10-22 12:41:35 -04:00
kcbanner
ee25757245
Add support for specifying dll_storage_class
in @extern
2024-10-22 12:41:35 -04:00
kcbanner
2d888a8e63
tests: re-enable tests that now pass on aarch64-windows
2024-10-22 11:39:29 +02:00
kcbanner
85d87c9ca1
coff: fix incorrect default image_base
values and re-enable shared library tests on Windows
...
This was the cause of aarch64-windows shared libraries causing "bad image" errors
during load-time linking. I also re-enabled the tests that were surfacing this bug.
2024-10-21 22:54:52 -07:00
Mario Nachbaur
9f84f7f921
watchOS: add os to aarch64 architecture
...
Needed for creating libraries that run both on
physical Apple Watches and the watchOS simulator.
2024-10-21 09:24:24 +02:00
mlugg
8573836892
incremental: disable flaky test
2024-10-18 09:46:03 +01:00
mlugg
097766bba3
compiler: implement @FieldType
...
Resolves : #21702
2024-10-18 08:50:40 +01:00
Andrew Kelley
fffbb511db
Merge pull request #21736 from alexrp/qemu-9.1
...
ci: Update to QEMU 9.1.0 in x86_64-linux scripts
2024-10-17 19:50:42 -07:00
Alex Rønne Petersen
8bfc36f091
ci: Update to QEMU 9.1.0 in x86_64-linux scripts.
2024-10-18 00:55:20 +02:00
Alex Rønne Petersen
b113415871
ci: Remove -fwasmtime from aarch64-linux scripts.
...
This is covered by the x86_64-linux scripts. Also remove the TODO comments
related to -fqemu for the same reason.
2024-10-18 00:55:18 +02:00
Alex Rønne Petersen
ff594eae49
std.Target: Make Abi.default() more smarter.
...
This builds on 221bd829bc
with more research I did
for test/llvm_targets.zig.
2024-10-18 00:10:43 +02:00
Andrew Kelley
8504e1f550
Merge pull request #21610 from alexrp/riscv-abis
...
Fix some RISC-V ABI issues and add ILP32/LP64 (soft float) to module tests
2024-10-17 12:54:44 -07:00
wooster0
816dfca0b5
langref: update builtin variadic functions
...
Documentation was outdated.
2024-10-17 11:51:06 +03:00
Alex Rønne Petersen
d38ed893c6
Merge pull request #21726 from alexrp/target-api
...
`std.Target`: Some miscellaneous API improvements
2024-10-17 02:49:34 +02:00
Justin Braben
4a2a0f50ca
fix compilation errors for fs and fs.Dir ( #21643 )
...
* fix compilation errors for fs and fs.Dir
* mem.span instead of mem.sliceTo
* Updating symLinkAbsoluteW function parameters
* Update with expected rename semantics
2024-10-17 01:08:58 +02:00
Alex Rønne Petersen
549a7eba40
std.Target: Rename OS version range functions to drop the "get" prefix.
2024-10-16 22:25:29 +02:00
Alex Rønne Petersen
55fe86c57e
std.Target: Remove isBpfFreestanding().
...
The only use of this has nothing to do with the OS tag.
2024-10-16 22:25:20 +02:00
Alex Rønne Petersen
140fb615a6
std.Target: Move isLib{C,Cxx}LibName() to std.zig.target.
...
These are really answering questions about the Zig compiler's capacity to
provide a libc/libc++ implementation. As such, std.zig.target seems like a more
fitting place for these.
2024-10-16 22:25:13 +02:00
Alex Rønne Petersen
bdb00b393e
std.Target: Only consider libxnet to be a libc library name for musl.
...
glibc has never had this.
2024-10-16 22:24:57 +02:00
Alex Rønne Petersen
879a39a700
std.Target: Ignore case for all Darwin platforms in isLibCLibName().
...
Matches isLibCxxLibName() behavior.
2024-10-16 22:24:52 +02:00
Alex Rønne Petersen
c76a98f28a
std.Target: Rename is_lib{c,cxx}_lib_name() to isLib{C,Cxx}LibName().
2024-10-16 22:24:46 +02:00
Alex Rønne Petersen
482759079f
std.Target: Move the elfiamcu check under the x86 prong in toElfMachine().
2024-10-16 22:24:38 +02:00
Matthew Lugg
6201031e05
Merge pull request #21722 from mlugg/incremental
...
incremental compilation progress
2024-10-16 20:29:55 +01:00
mlugg
3ba4f86198
incremental: disable failing test
...
The previous commit exposed a linker bug.
2024-10-16 16:30:38 +01:00
mlugg
22539783ad
incremental: introduce file
dependencies to handle AstGen failures
...
The re-analysis here is a little coarse; it'd be nice in the future to
have a way for an AstGen failure to preserve *all* analysis which
depends on the last success, and just hide the compile errors which
depend on it somehow. But I'm not sure how we'd achieve that, so this
works fine for now.
Resolves : #21223
2024-10-16 16:30:36 +01:00
mlugg
c6842b58d4
Zcu: cache output of resolveReferences
between calls
...
This not only simplifies the error bundling logic, but also improves
efficiency by allowing the result to be cached between, for instance,
multiple calls to `totalErrorCount`.
2024-10-16 16:30:36 +01:00
mlugg
a7dd34bfc5
incremental: add new test case
...
This isn't exactly the case provided in #11290 , but is a slightly
simpler case which I know would have triggered the same bug in the old
implementation of incremental compilation.
Resolves : #11290
2024-10-16 14:22:33 +01:00
Alex Rønne Petersen
bdd3bc056e
Merge pull request #21715 from alexrp/loongarch-porting
...
Some miscellaneous LoongArch port work
2024-10-16 09:13:51 +02:00
Alex Rønne Petersen
ecd5878b74
Merge pull request #21714 from alexrp/target-cpu-baseline
...
`std.Target`: Make `Cpu.baseline()` take OS into consideration and pick a better CPU for Apple targets
2024-10-16 04:59:02 +02:00
Alex Rønne Petersen
7a3626d1c6
llvm: Disable f16 lowering for loongarch.
...
This should be reverted with LLVM 20.
2024-10-16 01:19:00 +02:00
Alex Rønne Petersen
5e4249eb8b
llvm: Fix natural int width specifications for loongarch in DataLayoutBuilder.
2024-10-16 01:10:36 +02:00
Alex Rønne Petersen
95674fca0c
std.Thread: Use loongarch freeAndExit() implementation for loongarch32 too.
2024-10-16 01:10:36 +02:00
Alex Rønne Petersen
1cdb143af2
std.Target: Fix loongarch32 handling in C type alignment calculation.
2024-10-16 01:10:36 +02:00
Alex Rønne Petersen
dd983e12aa
compiler-rt: Use loongarch clear_cache() implementation for loongarch32 too.
2024-10-16 01:10:35 +02:00
Alex Rønne Petersen
f5beb50619
test: Remove some loongarch32 triples that were erroneously added to llvm_targets.
...
glibc and musl do not support loongarch32 yet.
2024-10-16 01:10:35 +02:00
Alex Rønne Petersen
a2c466220c
std.Target: Make Cpu.baseline() pick a better CPU for Apple targets.
2024-10-16 00:33:40 +02:00
Alex Rønne Petersen
1efc9c149c
std.zig.target: Sort the target triple list in a more user-friendly way.
...
This order should be a bit closer to what a user would expect when running
`zig targets | jq -r .libc[]` or similar.
2024-10-16 00:33:23 +02:00
Alex Rønne Petersen
1bca53cc20
std.Target: Change Cpu.baseline() to also be able to take OS into consideration.
2024-10-16 00:33:10 +02:00
Alex Rønne Petersen
6302a90cbf
test: Add riscv(32,64)-linux-(none,musl) with soft float to module tests.
2024-10-15 20:25:26 +02:00
Alex Rønne Petersen
0941364d70
compiler-rt: Always use f16 as the half type for riscv.
2024-10-15 19:29:56 +02:00
Alex Rønne Petersen
958f57d65d
llvm: Enable native f16 lowering for riscv32.
2024-10-15 19:29:56 +02:00
Alex Rønne Petersen
3550cacd73
llvm: Fix compiler crash when lowering f16 for riscv32 ilp32.
2024-10-15 19:29:56 +02:00
Alex Rønne Petersen
d289dba125
llvm: Fix ilp32e/lp64e and ilp32f/lp64f ABI selection for riscv.
2024-10-15 19:29:56 +02:00
gabeuehlein
7b8fc18c66
Sema: fail if analyzing return in noreturn
-declared function before coercing undefined
...
Just switches logic around in coerceExtra to check for returning in a noreturn function before coercing undefined to anything
2024-10-14 15:02:14 +03:00
Andrew Kelley
9fd61f7460
std.MultiArrayList: add clear methods
2024-10-14 03:33:23 -07:00
Andrew Kelley
3bf89f55c2
Merge pull request #21682 from der-teufel-programming/remove-packedintarray
...
Remove PackedIntArray
2024-10-13 18:46:51 -07:00
tgschultz
ba569bb8e9
Rewrite bit_reader and bit_writer to take advantage of current zig semantics and enhance readability ( #21689 )
...
Co-authored-by: Tanner Schultz <tgschultz@tgschultz-dl.tail7ba92.ts.net>
2024-10-13 18:44:42 -07:00
Robin Voetter
e2e79960d2
Merge pull request #21688 from Snektron/spirv-fix
...
spirv: fix some bitrot
2024-10-13 22:33:03 +02:00