DraagrenKirneh
1882ff95e7
Package.Manifest: add minimum_zig_version field
2023-10-18 18:58:58 -07:00
Andrew Kelley
63f9af87d3
zig env: back to json output
...
changed my mind I liked it better before. this reverts
053119083c .
2023-10-18 15:50:00 -07:00
Andrew Kelley
ec21da0d51
compiler: fix LTO availability logic
...
Before this commit, the logic would fail with a "LTO not available"
error if the user set `-fno-lto` which doesn't make sense. This commit
corrects the logic to understand when the user is explicitly requesting
to turn LTO off.
2023-10-18 17:47:57 -04:00
Andrew Kelley
f9a3413112
compiler: better default for valgrind
...
* Default to off when strip=true
* Report an error when explicitly enabled but not supported for the
target
2023-10-18 17:46:29 -04:00
Andrew Kelley
39652331c9
Merge pull request #14428 from perillo/improve-zig-env
...
zig env: add support for line based output
2023-10-18 17:32:59 -04:00
Jacob Young
d8f7c79298
x86_64: improve inline assembly support
...
* C++-style comments
* indirect call operands
* fix misleading immediate debug formatting
2023-10-18 13:57:28 -04:00
Robin Voetter
c3120d5089
Merge pull request #17577 from alichraghi/spirv-1
...
spirv: switch on bool
2023-10-18 16:28:13 +02:00
Robin Voetter
24b065a6a8
Merge pull request #17561 from alichraghi/spirv-0
...
spirv: memcpy
2023-10-18 15:38:30 +02:00
Andrew Kelley
149f2f8adb
Merge pull request #17524 from Vexu/aro-translate-c
...
Add ability to test Aro based `translate-c`
2023-10-18 00:32:59 -04:00
Andrew Kelley
09dea957ed
rework zig env
...
Introduce introspect.EnvVar which tracks all the environment variables
that are observed by the compiler, so that we can print them with `zig
env`.
The `zig env` command now prints both the resolved values as well as all
the possibly observed environment variables.
2023-10-17 21:27:09 -07:00
Manlio Perillo
053119083c
zig env: remove the json output
...
The current json output is not very convenient to use from the shell or
a Zig program.
An example using the shell: `zig env | jq -r .lib_dir`.
Remove the json output, and instead use the POSIX shell syntax:
name="value"
Additionally, when args is not empty, assume each argument is the
environment variable name and print the associated value.
Unrecognized environment variables are ignored.
The new output format has been copied from `go env`, with the difference
that `go env` uses OS specific syntax for windows and plan9.
Define the environment variables in a single place, in order to avoid
possible bugs.
2023-10-17 20:10:23 -07:00
Tobias Simetsreiter
7a9500fd80
Fix rendering ast in zon mode ( #17547 )
...
Co-authored-by: Tobias Simetsreiter <tobias.simetsreiter@wabtec.com >
2023-10-17 19:04:01 -04:00
dweiller
f58811a58a
package fetching: support .tar.zst archives
2023-10-17 19:02:00 -04:00
Ali Chraghi
e5d5c1d423
spirv: switch on bool
2023-10-18 02:31:16 +03:30
Bogdan Romanyuk
ad168db727
Sema: disallow @intFromPtr for comptime-only types
2023-10-17 20:05:55 +00:00
Andrew Kelley
3b21c15782
Merge pull request #17562 from ziglang/fetch-symlink-normalize-sep
...
Package.Fetch: normalize path separators in symlinks
2023-10-17 14:35:39 -04:00
Jakub Konka
eb5276c94e
Merge pull request #17556 from ziglang/elf-link-zig-proper
...
elf: port 99% of zld ELF linker to Zig proper
2023-10-17 17:36:40 +02:00
Jakub Konka
742a130ce5
elf: fix use-after-move
2023-10-17 17:35:16 +02:00
Jacob Young
cfa247e53b
x86_64: fix C abi argument passing in memory
2023-10-17 10:41:48 -04:00
Ali Chraghi
6d8a979265
spirv: memcpy
2023-10-17 13:02:30 +03:30
Ali Chraghi
2d762a76a4
sema: emit logical and/or for safety checks
...
this has no performance impact as there is no branching either way
2023-10-17 13:00:36 +03:30
Veikka Tuominen
96f9e20152
add c_frontend to translate-c cache hash
2023-10-17 11:55:17 +03:00
Andrew Kelley
ba656e5c9f
zig fetch: add --debug-hash argument
...
This argument causes zig to print verbose hashing information to stdout,
which can be used to diff two different fetches and find out why the
hashes do not equal each other.
2023-10-16 18:15:47 -07:00
Ali Chraghi
e44152e252
spirv: fieldParentPtr
2023-10-16 20:27:28 -04:00
Andrew Kelley
b171a6f25d
Package.Fetch: normalize path separators in symlinks
...
closes #17549
2023-10-16 16:47:47 -07:00
Jakub Konka
43fb74f81a
elf: do not open file if emitting object file for LLVM and elf linker
...
This is at least until we implement `-r` option in the linker.
2023-10-16 23:57:33 +02:00
Jakub Konka
78f2ae7f29
Merge pull request #17531 from moosichu/fix/frameworks
...
Fix some frameworks not linking macos
2023-10-16 20:45:04 +02:00
Jakub Konka
d2727b808c
elf: fix 32bit build
2023-10-16 19:56:47 +02:00
Jakub Konka
e89155b565
elf: refactor logs
2023-10-16 19:33:06 +02:00
Jakub Konka
ee1c3c7058
elf: correctly copy and write out debug sections
2023-10-16 19:33:06 +02:00
Jakub Konka
b0e2c6323b
elf: sort PT_LOAD by address in PHDR table
...
Turns out order matters as otherwise we face unexplainable
segfaults to do with improper page mapping in static environments
(dynamic environments seem unaffected).
2023-10-16 19:33:06 +02:00
Jakub Konka
6993b3e23e
codegen: refactor .actual_got into .extern_got
2023-10-16 19:33:06 +02:00
Jakub Konka
d3b1c903dd
elf: emit empty TLS phdr when linking against musl libc even if unneeded
2023-10-16 19:33:06 +02:00
Jakub Konka
5192a2fbbe
elf: do not allocate zerofill segment in file offsets
2023-10-16 19:33:06 +02:00
Jakub Konka
17b8e8ab29
elf: sort the entire shdr table the usual way
2023-10-16 19:33:06 +02:00
Jakub Konka
46cf4c5d93
elf: sort phdr table
2023-10-16 19:33:06 +02:00
Jakub Konka
7b2cbcf0fe
codegen+elf: check if extern is a variable ref
2023-10-16 19:33:06 +02:00
Jakub Konka
45197ea7ad
codegen+elf: lower imported data refs
2023-10-16 19:33:06 +02:00
Jakub Konka
c71a79f618
elf: make .zig.rodata writeable
2023-10-16 19:33:06 +02:00
Jakub Konka
17635e4f2a
x86_64: add -fPIC support targeting ELF
2023-10-16 19:33:06 +02:00
Jakub Konka
b3d98a4b88
elf: emit dynamic base relocs for .zig.got entries when required
2023-10-16 19:33:06 +02:00
Jakub Konka
315cd7623e
elf: fix section sorting logic
2023-10-16 19:33:05 +02:00
Jakub Konka
5fad683791
elf: emit (broken) debug sections
2023-10-16 19:33:05 +02:00
Jakub Konka
85d451f96c
elf: re-enable self-hosted backends
2023-10-16 19:33:05 +02:00
Jakub Konka
7be983ac92
elf: create new synthetic section ZigGotSection
2023-10-16 19:33:05 +02:00
Jakub Konka
9b6337ab06
elf: exclude Zig special sections from bulk alloc
2023-10-16 19:33:05 +02:00
Jakub Konka
9da6574f7b
elf: refactor
2023-10-16 19:33:05 +02:00
Jakub Konka
716a45a209
elf: use findFreeSpace mechanics to allocate object-extracted segments
2023-10-16 19:33:05 +02:00
Jakub Konka
5ff12003ee
elf: dynamically allocate SHDR table
2023-10-16 19:33:05 +02:00
Jakub Konka
1939c7d182
elf: clean up logic for allocating TLS segment
2023-10-16 19:33:05 +02:00