403 Commits

Author SHA1 Message Date
Ali Cheraghi
181a89e728
build: add spirv to test matrix
Signed-off-by: Ali Cheraghi <alichraghi@proton.me>
2025-02-24 19:12:38 +01:00
Andrew Kelley
1afa6e260e build: respect -Duse-llvm option when doing behavior tests 2025-01-15 15:11:36 -08:00
Alex Rønne Petersen
23281704dc test: Enable long calls for all thumb/thumbeb module tests.
The relocation range issues will happen eventually as we add more code to the
standard library and test suites, so we may as well just deal with this now.
@MasonRemaley ran into this in #20271, for example.
2025-01-07 08:44:45 +01:00
mlugg
b8472db215
tests.zig: migrate from deprecated std.Build APIs 2024-12-18 01:48:57 +05:00
Eric Joldasov
3d393dba6f
std.Build: remove deprecated APIs
These APIs were all deprecated prior to the release of 0.13.0, so can be
safety removed in the current release cycle.

`std.Build`:
* `host` -> `graph.host`

`std.Build.Step.Compile`:
* `setLinkerScriptPath` -> `setLinkerScript`
* `defineCMacro` -> `root_module.addCMacro`
* `linkFrameworkNeeded`-> `root_module.linkFramework`
* `linkFrameworkWeak`-> `root_module.linkFramework`

`std.Build.Step.ObjCopy`:
* `getOutputSource` -> `getOutput`

`std.Build.Step.Options`:
* `addOptionArtifact` -> `addOptionPath`
* `getSource` -> `getOutput`

`std.Build.Step.Run`:
* `extra_file_dependencies` -> `addFileInput`
* `addDirectorySourceArg` -> `addDirectoryArg`
* `addPrefixedDirectorySourceArg` -> `addPrefixedDirectoryArg`
2024-12-18 01:47:50 +05:00
Alex Rønne Petersen
d5c2f527b4
Merge pull request #22219 from alexrp/arm-big-endian
Add `armeb-linux-*`, `thumbeb-linux-*`, and `aarch64_be-linux-*` to CI
2024-12-15 01:41:46 +01:00
Carl Åstholm
b352595aa2 Add compiler internals tests
There are several test decls inside `/src` that are not currently being
tested and have bitrotted as a result. This commit revives those tests
and adds the `test-compiler-internals` set of tests which tests
everything reachable from `/src/main.zig`.
2024-12-13 08:49:02 -05:00
Alex Rønne Petersen
9aa4cf4f88
test: Add aarch64_be-linux-* to the module test matrix. 2024-12-13 03:13:14 +01:00
Alex Rønne Petersen
fdc0ed92ce
test: Add thumbeb-linux-* to the module test matrix. 2024-12-13 03:13:14 +01:00
Alex Rønne Petersen
df27298aef
test: Add armeb-linux-* to the module test matrix. 2024-12-13 03:13:14 +01:00
Alex Rønne Petersen
1731510933
test: Add x86_64-linux-(gnux32,muslx32) to module tests. 2024-12-01 02:23:55 +01:00
Alex Rønne Petersen
2a29381117
test: Enable -Dtest-target-filter=... to work for test-cases and test-translate-c. 2024-11-24 22:11:17 +01:00
Alex Rønne Petersen
9c7776a938
test: Enable -Dtest-target-filter=... to work for test-c-abi. 2024-11-24 22:11:17 +01:00
Alex Rønne Petersen
f25ea264b7 Revert "test: Add aarch64_be-linux-(none,gnu,musl) to module tests."
This reverts commit 4049be90de6a557c1ab522363fddbb71d3ccdb18.

See: https://github.com/ziglang/zig/issues/21911
2024-11-05 07:15:53 +01:00
Alex Rønne Petersen
4049be90de
test: Add aarch64_be-linux-(none,gnu,musl) to module tests. 2024-11-04 08:29:42 +01:00
Alex Rønne Petersen
2f003f39b2
Merge pull request #21599 from alexrp/thumb-porting 2024-11-03 14:25:30 +01:00
Alex Rønne Petersen
621487d5ab
test: Add thumb-linux-(musl)eabi(hf) target triples for module tests. 2024-11-03 09:29:33 +01:00
Alex Rønne Petersen
d89cf3e7d8
test: Add the ability to skip specific modules for a target. 2024-11-03 09:29:33 +01:00
Alex Rønne Petersen
11915ae48e
std.zig.target: Change mips64(el)-linux-musl triples to -muslabi64.
With this, MIPS triples for musl are in line with glibc triples.
2024-11-02 10:42:53 +01: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
mlugg
f60c045cef
tests: add test-incremental step
This is contained in the `test` step, so is tested by CI.

This commit also includes some enhancements to the `incr-check` tool to
make this work correctly.
2024-10-05 20:52:25 +01:00
Alex Rønne Petersen
736694b1e6
test: Add s390x-linux-(none,musl,gnu) triples to module tests. 2024-10-04 00:26:55 +02:00
Alex Rønne Petersen
496e90a487
test: Add riscv32-linux-(none,musl,gnu) triples for module tests. 2024-09-20 13:03:33 +02:00
Alex Rønne Petersen
8c0902b7ae Revert "tests: skip native CPU std tests on Windows"
This reverts commit 234693bcbba6f55ff6e975ddbedf0fad4dfaa8f1.
2024-09-19 18:20:21 -07:00
Alex Rønne Petersen
2a24c17be2 test: Re-enable LLVM riscv64 module tests.
Closes #18872.
2024-09-19 18:20:21 -07:00
Alex Rønne Petersen
75983c692f
test: Switch all arm-linux-* triples for module tests from v8a to v7a.
Broadly speaking, versions 6, 7, and 8 are the ones that are in common use. Of
these, v7 is what you'll typically see for 32-bit Arm today. So let's actually
make sure that that's what we're testing.
2024-09-10 08:53:30 +02:00
Alex Rønne Petersen
a872b61021
test: Add arm, mips, and powerpc soft float targets to module tests.
Prefer `eabi` and `eabihf` over the ambiguous `none` when not using libc.
2024-09-10 08:53:30 +02:00
Alex Rønne Petersen
17f54e8274
std.zig.target: Split powerpc-linux-musl triple into powerpc-linux-musleabi(hf). 2024-09-06 20:11:47 +02:00
Alex Rønne Petersen
c1a70acc91
std.zig.target: Split mips(el)-linux-musl triples into mips(el)-linux-musleabi(hf).
Closes #21184.
2024-09-06 20:11:47 +02:00
Alex Rønne Petersen
ee3efe8007
test: Add powerpc64-linux-(none,musl) triples to module tests. 2024-09-05 01:15:33 +02:00
Alex Rønne Petersen
3e8ac8e23f test: Add mips64(el)-linux-(none,musl,gnuabi64) targets.
These take 3-4 minutes to run on my machine, i.e. they're not affected by the
LLVM compilation speed bug that affects mips32.
2024-08-18 07:27:23 +02:00
Jacob Young
ef11bc9899 Dwarf: rework self-hosted debug info from scratch
This is in preparation for incremental and actually being able to debug
executables built by the x86_64 backend.
2024-08-16 15:22:55 -04:00
Alex Rønne Petersen
b6009a7416
build/test: Add -Dtest-slow-targets and move mips module tests behind it.
The idea is that these tests are just too slow to include by default on a
contributor's local machine. If they want to run these, they need to opt in.
2024-08-14 07:03:23 +02:00
Alex Rønne Petersen
3b51b43dc8
build/test: Add -Dtest-target-filter for filtering module tests by target triple.
This is useful during porting work where you're not interested in running all
targets all the time while iterating on changes.
2024-08-14 07:03:23 +02:00
Alex Rønne Petersen
019c0fc184
test: Re-enable mips(el)-linux-gnueabihf tests.
Closes #4927.
2024-08-14 06:52:05 +02:00
Andrew Kelley
0b5ea2b902
Merge pull request #21053 from alexrp/mips-tests
`test`: Re-enable `mips(el)-linux(-musl)` tests.
2024-08-13 11:48:33 -07:00
Alex Rønne Petersen
eadc0c01cc test: Re-enable armv8-linux-gnueabihf tests.
Closes #3287.
2024-08-13 00:57:49 -07:00
Alex Rønne Petersen
46f64358dd
test: Re-enable mips(el)-linux(-musl) tests.
Closes #13782.
Closes #16846.
2024-08-12 13:34:19 +02:00
Andrew Kelley
9c84b5cc18 build.zig: fix -Dskip-non-native
now it actually does what it says on the tin
2024-08-01 13:47:29 -07:00
David Rubin
93e9c7a963
riscv: implement @clz 2024-07-26 04:05:39 -07:00
David Rubin
571aa694fd
riscv: vectors part 1 2024-07-14 23:02:34 -07:00
Andrew Kelley
d1c14f2f52 std.Build.Step.WriteFile: extract UpdateSourceFiles
This has been planned for quite some time; this commit finally does it.

Also implements file system watching integration in the make()
implementation for UpdateSourceFiles and fixes the reporting of step
caching for both.

WriteFile does not yet have file system watching integration.
2024-07-12 00:14:08 -07:00
Andrew Kelley
0cc492a272 make more build steps integrate with the watch system 2024-07-12 00:14:08 -07:00
mlugg
0e5335aaf5
compiler: rework type resolution, fully resolve all types
I'm so sorry.

This commit was just meant to be making all types fully resolve by
queueing resolution at the moment of their creation. Unfortunately, a
lot of dominoes ended up falling. Here's what happened:

* I added a work queue job to fully resolve a type.
* I realised that from here we could eliminate `Sema.types_to_resolve`
  if we made function codegen a separate job. This is desirable for
  simplicity of both spec and implementation.
* This led to a new AIR traversal to detect whether any required type is
  unresolved. If a type in the AIR failed to resolve, then we can't run
  codegen.
* Because full type resolution now occurs by the work queue job, a bug
  was exposed whereby error messages for type resolution were associated
  with the wrong `Decl`, resulting in duplicate error messages when the
  type was also resolved "by" its owner `Decl` (which really *all*
  resolution should be done on).
* A correct fix for this requires using a different `Sema` when
  performing type resolution: we need a `Sema` owned by the type. Also
  note that this fix is necessary for incremental compilation.
* This means a whole bunch of functions no longer need to take `Sema`s.
  * First-order effects: `resolveTypeFields`, `resolveTypeLayout`, etc
  * Second-order effects: `Type.abiAlignmentAdvanced`, `Value.orderAgainstZeroAdvanced`, etc

The end result of this is, in short, a more correct compiler and a
simpler language specification. This regressed a few error notes in the
test cases, but nothing that seems worth blocking this change.

Oh, also, I ripped out the old code in `test/src/Cases.zig` which
introduced a dependency on `Compilation`. This dependency was
problematic at best, and this code has been unused for a while. When we
re-enable incremental test cases, we must rewrite their executor to use
the compiler server protocol.
2024-07-04 21:01:42 +01:00
Jonathan Marler
d9f1a952b8 build: fix WriteFile and addCSourceFiles not adding LazyPath deps
Adds a missing call to addLazyPathDependenciesOnly in
std.Build.Module.addCSourceFiles.  Also fixes an issue in
std.Build.Step.WriteFile where it wasn't updating all the GeneratedFile
instances for every directory.  To fix the second issue, I removed
all the GeneratedFile instances and now all files/directories reference
the steps main GeneratedFile via sub paths.
2024-07-04 13:34:17 -04:00
Krzysztof Wolicki
45c77931c2 Change deprecated b.host to b.graph.host in tests and Zig's build.zig 2024-06-13 10:49:06 -04:00
Veikka Tuominen
c01d8c8b20 pass -fno-builtin when testing lib/c.zig, lib/compiler_rt.zig 2024-06-02 10:10:35 +03:00
David Rubin
d9e0cafe64 riscv: add stage2_riscv to test matrix and bypass failing tests 2024-05-11 02:17:24 -07:00
Ryan Liptak
b86c4bde64 Rename Dir.writeFile2 -> Dir.writeFile and update all callsites
writeFile was deprecated in favor of writeFile2 in f645022d16361865e24582d28f1e62312fbc73bb. This commit renames writeFile2 to writeFile and makes writeFile2 a compile error.
2024-05-03 13:29:22 -07:00
Andrew Kelley
dddddcffd0 disable RISC-V CI testing due to LLVM's O(N^2) codegen
tracked by #18872
2024-04-19 20:24:57 -07:00