Commit Graph

25757 Commits

Author SHA1 Message Date
Andrew Kelley c89a20741a try again 2023-09-14 21:07:17 -07:00
Andrew Kelley 8278722e57 temporarily disable most ci stuff 2023-09-14 19:47:14 -07:00
Andrew Kelley f71d4cfdaf enable for x86_64 too 2023-09-14 19:44:22 -07:00
Andrew Kelley f616c4b91d fix 2023-09-14 19:40:40 -07:00
Andrew Kelley 7a375d6d68 CI: temporarily comment out more stuff 2023-09-14 18:46:54 -07:00
Andrew Kelley 36e2bc8075 cwd oops 2023-09-14 18:46:18 -07:00
Andrew Kelley ea62faf382 fixup file paths 2023-09-14 18:17:45 -07:00
Andrew Kelley ca71aeb569 CI: disable most stuff temporarily for testing 2023-09-14 18:16:58 -07:00
Andrew Kelley 27edf60651 CI: measure perf difference of compiling hello world
and post comment on the PR
2023-09-14 18:14:26 -07:00
Andrew Kelley ad4991f428 CI: temporarily disable while testing this branch 2023-09-14 17:11:06 -07:00
Federico Stra 4f952c7e0e std.math.log_int: implement integer logarithm without using float math 2023-09-14 19:33:56 +00:00
Ryan Liptak 30e1883834 Add -includes option to zig libc
Prints the detected libc include paths for the target and exits
2023-09-14 11:04:34 -07:00
Ryan Liptak c9613e3d5c ComptimeStringMap: Add version that takes an equality function
This will allow users to construct e.g. a ComptimeStringMap that uses case-insensitive ASCII comparison.

Note: the previous ComptimeStringMap API is unchanged (i.e. this does not break any existing code).
2023-09-14 11:03:15 -07:00
Rafael Fernández López 69982339ed std: add compile error when using std.os.getenv on the wasi target
`std.process.getEnvMap` or `std.process.getEnvVarOwned` should be used
instead, requiring allocation.
2023-09-14 20:04:35 +03:00
Ryan Liptak 742030a8f2 fs tests: Skip UNC path types in Dir.rename tests
Follow up to https://github.com/ziglang/zig/pull/17136. The `Dir.rename files` test has now also been seen to fail in CI, so now all rename tests are skipped for the UNC path type. This is a heavy handed approach to hopefully get rid of any flakiness related to rename & UNC paths. See https://github.com/ziglang/zig/issues/17134
2023-09-14 16:30:41 +03:00
Jakub Konka 8fb4a4efba Merge pull request #17146 from ziglang/elf-linker
elf: upstream zld/ELF functionality, part 2
2023-09-14 01:45:23 +02:00
Jonathan Marler 223f62acbd std.json: add fmt function (#17055)
Adds std.json.fmt which returns a std.fmt Formatter that formats any
given value using std.json.stringify.
2023-09-13 18:24:59 -04:00
Andrew Kelley 0e2f002a7b Merge pull request #17046 from tiehuis/improve-hash-tests
improve std/hash test coverage
2023-09-13 18:22:56 -04:00
Jakub Konka 59a586a878 cmake: add new zig source files 2023-09-13 22:40:01 +02:00
Jakub Konka fc86b80b3b elf: correctly handle overflows on non-64bit hosts 2023-09-13 22:38:44 +02:00
Jakub Konka d4c1e85a13 elf: skip writing non-alloc and zerofill atoms 2023-09-13 21:51:43 +02:00
Jakub Konka a9f1b994bd elf: allocate locals and globals in objects 2023-09-13 21:51:43 +02:00
Jakub Konka d37cb60621 elf: re-enable linking compiler_rt 2023-09-13 21:51:43 +02:00
Jakub Konka ce88df497c elf: do not store Symbol's index in Symbol 2023-09-13 21:51:43 +02:00
Jakub Konka dbde746f9d elf: parse archives 2023-09-13 21:51:43 +02:00
Jakub Konka 5eef7577d1 elf: handle more relocs with GOT relaxation 2023-09-13 21:51:43 +02:00
Jakub Konka 7a16a97671 x86_64: add simple disassembler interface to the encoder 2023-09-13 21:51:43 +02:00
Jakub Konka 9de0df76a8 elf: allocate .bss section and matching PHDR 2023-09-13 21:51:43 +02:00
Jakub Konka 10a99f8f64 Merge pull request #17141 from ziglang/elf-linker
elf: enable Zig's ELF linker on non-incremental codepaths (LLVM, clang)
2023-09-13 21:49:10 +02:00
Pascal S. de Kloe 4a44b79935 mem: explicit Allocator.Error on concat and join 2023-09-13 13:52:05 +03:00
Jakub Konka 0d924d2da6 elf: look for entry point globally if not set by incremental compiler 2023-09-13 12:33:51 +02:00
Jakub Konka 31f363d51f elf: enable linker for non-incremental code paths 2023-09-13 12:17:02 +02:00
Jakub Konka 4d29b39678 Merge pull request #17113 from ziglang/elf-linker
elf: upstream zld/ELF functionality, part 1
2023-09-13 10:07:07 +02:00
Ryan Liptak 89ea67aee2 Disable flaky part of Dir.rename directories test on Windows
See https://github.com/ziglang/zig/issues/17134
2023-09-13 03:46:00 -04:00
Andrew Kelley cb6201715a InternPool: prevent anon struct UAF bugs with type safety
Instead of using actual slices for InternPool.Key.AnonStructType, this
commit changes to use Slice types instead, which store a
long-lived index rather than a pointer.

This is a follow-up to 7ef1eb1c27.
2023-09-12 20:08:56 -04:00
Jakub Konka 8142349d69 elf: add missing input zig source files to cmake 2023-09-13 00:40:08 +02:00
Jakub Konka 6910a50ae5 elf: add u64 to usize casts where required 2023-09-13 00:31:41 +02:00
Andrew Kelley 7e2b6b0f1b Revert "ci: use zig build check-fmt instead of zig fmt --check"
This reverts commit 4d1432299f.

Please don't hard-code unrelated concerns this way. build.zig should not
have awareness of the naming conventions for cmake build directories.
2023-09-12 14:32:05 -07:00
Jakub Konka 1a6d12ea92 elf: clean up and unify symbol ref handling in relocs
Also, this lets us re-enable proper undefined symbols tracking.
2023-09-12 23:27:14 +02:00
Lucas Culverhouse 5b7eefce46 std.math.cbrt: fixed -0.0 evaluating to 0.0 2023-09-12 18:39:34 +00:00
Jakub Konka 9719fa7412 elf: include C compilation artifacts on the linker line 2023-09-12 19:26:51 +02:00
Jakub Konka ae74a36af0 elf: resolve and write objects to file 2023-09-12 19:17:57 +02:00
Jakub Konka 652ebf3b6a elf: allocate objects, currently atom-by-atom 2023-09-12 18:07:10 +02:00
Jakub Konka 9db472cff6 elf: set output section index of a global when resolving 2023-09-12 17:52:55 +02:00
Jakub Konka 472d326a8c elf: set output section index when parsing objects 2023-09-12 17:35:56 +02:00
Jakub Konka 44e84af874 elf: add simplistic reloc scanning mechanism 2023-09-12 16:32:55 +02:00
Jakub Konka c654f3b0ee elf: claim unresolved dangling symbols that can be claimed 2023-09-12 15:44:16 +02:00
Jakub Konka b478a0dd1a elf: mark imports-exports; populate symtab with objects 2023-09-12 15:14:38 +02:00
Jakub Konka 962b46148d elf: add simplistic symbol resolution 2023-09-12 14:36:55 +02:00
Jakub Konka 53c3757c00 elf: start fixing symbol resolution 2023-09-12 14:02:15 +02:00