6335 Commits

Author SHA1 Message Date
Jakub Konka
f24ceec35a
Merge pull request #17844 from ziglang/elf-object
elf: handle emitting relocatables and static libraries - humble beginnings
2023-11-04 20:58:15 +01:00
Jakub Konka
ee66137269 elf: add link smoke tests covering emitting obj and static lib 2023-11-04 09:13:34 +01:00
Jakub Konka
b8c8565e93 elf: implement --gc-sections for non-LLVM Zig source 2023-11-04 09:08:27 +01:00
Jacob Young
509be7cf1f x86_64: fix std test failures 2023-11-03 23:18:21 -04:00
Luuk de Gram
db1825e931
wasm: re-enable regressed tests 2023-11-01 19:47:15 +01:00
Andrew Kelley
3fc6fc6812 std.builtin.Endian: make the tags lower case
Let's take this breaking change opportunity to fix the style of this
enum.
2023-10-31 21:37:35 -04:00
Jacob Young
d890e81761 mem: fix ub in writeInt
Use inline to vastly simplify the exposed API.  This allows a
comptime-known endian parameter to be propogated, making extra functions
for a specific endianness completely unnecessary.
2023-10-31 21:37:35 -04:00
Jacob Young
50cdb65784 Sema: fix incorrect error comptime-mutating empty array 2023-10-31 21:37:35 -04:00
kcbanner
825da34769 Add compile error test case for union layout depending on pointer alignment 2023-10-31 01:35:58 +00:00
kcbanner
fb523c6283 sema: when guessing union alignment, save the result and check if the guess was correct 2023-10-31 01:35:58 +00:00
Jakub Konka
10d03acdb5
Merge pull request #17773 from ziglang/elf-exports
link: implement exporting anon decls
2023-10-30 17:29:05 +01:00
DilithiumNitrate
91e117697a
Fix hasRuntimeBitsAdvanced lazy case for pointers and optionals
As suggested by mlugg, always returns `error.NeedLazy`. If this has a
performance impact, it could be replaced by adding lazy handling to
`comptimeOnlyAdvanced`.
2023-10-29 21:12:43 +00:00
Jakub Konka
71dfea1f17 coff: implement exporting anon decls 2023-10-29 18:55:58 +01:00
Jakub Konka
a7a95ce9c4 macho: implement exporting anon decls 2023-10-29 18:55:58 +01:00
Jakub Konka
eaca72534c elf: implement exporting anon decls 2023-10-29 18:55:58 +01:00
Jakub Konka
209fd8cb93 elf: add partial implementation of exporting anon decls 2023-10-29 18:55:58 +01:00
Jacob Young
f6f2708d82 x86_64: fix compiler rt test failures 2023-10-29 07:20:36 -04:00
Jacob Young
20ade4ce7f tests: change some x86_64 backend targets to pic for more coverage 2023-10-29 05:15:35 -04:00
Jakub Konka
13c7aa5fef
Merge pull request #17727 from ziglang/elf-memory-deferred
x86_64+elf: do not pass hardcoded memory addresses in prep for build-obj
2023-10-28 19:41:07 +02:00
mlugg
c1c9bc0c41 Sema: do not assume switch item indices align with union field indices
Resolves: #17754
2023-10-28 06:30:28 +01:00
Jacob Young
a440cf6d44 x86_64: fix c abi test failures 2023-10-27 23:31:20 -04:00
Andrew Kelley
24d9438bcc split export behavior test into export_keyword and export_builtin 2023-10-27 12:45:04 -07:00
Andrew Kelley
9f0fd72321 categorize nan behavior test
move it from bugs/xxx.zig to its own category
2023-10-27 12:43:34 -07:00
Andrew Kelley
3fb301b16a categorize fn ptr behavior test
move a function pointer test from bugs/xxx.zig to fn.zig
2023-10-27 12:43:34 -07:00
Andrew Kelley
dfe9cae4eb categorize globals behavior tests
moves some tests that store to global variables to their own category
instead of being named after a GitHub issue.
2023-10-27 12:43:34 -07:00
Andrew Kelley
1c85b0acbb
Merge pull request #17735 from ziglang/export-anon
link: support exporting constant values without a Decl
2023-10-27 15:20:13 -04:00
Andrew Kelley
4bc88dd116 link: support exporting constant values without a Decl
The main motivating change here is to prevent the creation of a fake
Decl object by the frontend in order to `@export()` a value.

Instead, `link.updateDeclExports` is renamed to `link.updateExports` and
accepts a tagged union which can be either a Decl.Index or a
InternPool.Index.
2023-10-26 20:32:16 -07:00
Jacob Young
48526c0eb6 test: enable c-abi-tests for the x86_64 backend
Add testing for `x86_64_v2` and `x86_64_v3` with the x86_64 backend.
2023-10-26 21:45:58 -04:00
Jakub Konka
cc394431ae
Merge pull request #17699 from ziglang/elf-better-alloc
elf: allocated PHDR table always immediately succeeding the EHDR
2023-10-25 23:25:56 +02:00
Jakub Konka
bc081901dc Step.Compile: differentiate between fuzzy and exact matches for compile errors 2023-10-25 11:40:16 +02:00
Jacob Young
b55377a5ab x86_64: pass more tests
* 128-bit integer multiplication with overflow
 * more instruction encodings used by std inline asm
 * implement the `try_ptr` air instruction
 * follow correct stack frame abi
 * enable full panic handler
 * enable stack traces
2023-10-25 04:28:30 -04:00
Jakub Konka
55c7a6d99d elf: test unknown file type error 2023-10-24 23:11:50 +02:00
Jakub Konka
bc9ab3a613 elf: test mismatched cpu architecture error 2023-10-24 22:48:55 +02:00
Jakub Konka
c9c210a4e7 elf: test path errors in ld script parsing 2023-10-24 22:31:25 +02:00
Jakub Konka
403e539669 elf: test unresolved symbol reference error 2023-10-24 22:08:36 +02:00
Jakub Konka
8087ec8e8c elf: improve parsing of ld scripts and actually test linking against them 2023-10-24 19:03:00 +02:00
Jacob Young
bb0419599a
Merge pull request #17666 from jacobly0/x86_64-unicode
x86_64: pass more std tests
2023-10-24 05:34:13 -04:00
Andrew Kelley
b477279c37
Merge pull request #17688 from ziglang/comptime-src
Sema: make `@src().line` comptime-known
2023-10-24 03:58:47 -04:00
Jacob Young
8f69e977f1 x86_64: implement 128-bit builtins
* `@clz`
 * `@ctz`
 * `@popCount`
 * `@byteSwap`
 * `@bitReverse`
 * various encodings used by std
2023-10-23 22:42:18 -04:00
Jacob Young
fbe8c8938b x86_64: implement @mod for floating-point types 2023-10-23 22:42:18 -04:00
Andrew Kelley
46a6d50fdf Sema: make @src().line comptime-known
Reverts 89cef9f5f731f8f33dc935aac3c21bd57c92900d.

Closes #13315
2023-10-23 18:35:10 -07:00
Andrew Kelley
d4911794ae rename behavior test to better describe what it does
In general, let's not lean on GitHub issue numbers as having meaning.
The goal of behavior tests is to produce a minimum set of tests that
test 100% of the language.
2023-10-23 17:28:10 -07:00
Robin Voetter
4bf27da6a6 Revert "Revert "Merge pull request #17657 from Snektron/spirv-recursive-ptrs""
This reverts commit 9f0359d78f9facc38418e32b0e8c1bf6f99f0d26 in an attempt to
make the tests pass again. The CI failure from that merge should be unrelated
to this commit.
2023-10-23 06:27:12 -04:00
Andrew Kelley
b82459fa43
Merge pull request #17407 from truemedian/http-ng
std.http: more proxy support, buffer writes, tls toggle
2023-10-22 17:48:03 -04:00
Jacob Young
27fe945a00 Revert "Revert "Merge pull request #17637 from jacobly0/x86_64-test-std""
This reverts commit 6f0198cadbe29294f2bf3153a27beebd64377566.
2023-10-22 15:46:43 -04:00
Andrew Kelley
6f0198cadb Revert "Merge pull request #17637 from jacobly0/x86_64-test-std"
This reverts commit 0c99ba1eab63865592bb084feb271cd4e4b0357e, reversing
changes made to 5f92b070bf284f1493b1b5d433dd3adde2f46727.

This caused a CI failure when it landed in master branch due to a
128-bit `@byteSwap` in std.mem.
2023-10-22 12:16:35 -07:00
Andrew Kelley
9f0359d78f Revert "Merge pull request #17657 from Snektron/spirv-recursive-ptrs"
This reverts commit b822e841cda0adabe3fec260ff51c18508f7ee32, reversing
changes made to 0c99ba1eab63865592bb084feb271cd4e4b0357e.

This caused a CI failure when it landed in master branch.
2023-10-22 12:15:31 -07:00
Jan Philipp Hafer
fd2239bde9 child_process + Build: rename exec to run + all related code
Justification: exec, execv etc are unix concepts and portable version
should be called differently.

Do no touch non-Zig code. Adjust error names as well, if associated.
Closes #5853.
2023-10-22 14:47:20 -04:00
Robin Voetter
b822e841cd
Merge pull request #17657 from Snektron/spirv-recursive-ptrs
spirv: recursive pointers
2023-10-22 15:35:00 +02:00
Jacob Young
0c99ba1eab
Merge pull request #17637 from jacobly0/x86_64-test-std
x86_64: start to enable `test-std` and `test-compiler-rt` testing
2023-10-22 08:06:47 -04:00