Veikka Tuominen
c558de6655
stage2 llvm: use tag value instead of field index in airUnionInit
...
Closes #12656
2022-08-30 12:22:07 -07:00
Veikka Tuominen
d3b4b2edf1
Sema: shift of comptime int with runtime value
...
Closes #12290
2022-08-30 12:22:07 -07:00
Veikka Tuominen
01d19a8d3c
Sema: do not emit generic poison for non generic parameters
...
Closes #12679
2022-08-30 12:22:07 -07:00
Veikka Tuominen
67a44211f7
Sema: improve handling of always_tail call modifier
...
Closes #4301
Closes #5692
Closes #6281
Closes #10786
Closes #11149
Closes #11776
2022-08-30 12:22:07 -07:00
Andrew Kelley
0a42602418
CI: drone: disable failing tests
...
See tracking issue #12689
2022-08-30 12:02:26 -07:00
Luuk de Gram
8627858bbc
test/link: add test for extern resolution
...
Adds a linker tests to verify extern/undefined symbols
representing non-functions are being resolved correctly.
2022-08-30 18:32:08 +02:00
Luuk de Gram
4f72ac265a
wasm: create relocations for extern decls
...
This also fixes performing relocations for data symbols
of which the target symbol exists in an external object file.
We do this by checking if the target symbol was discarded,
and if so: get the new location so that we can find the
corresponding atom that belongs to said new location. Previously
it would always assume the symbol would live in the same file
as the atom/symbol that is doing the relocation.
2022-08-30 16:38:55 +02:00
Luuk de Gram
414fcea162
link/Wasm: handle extern variables
...
Generate symbols for extern variables and try to resolve them.
Unresolved 'data' symbols generate an error as they cannot be
exported from the Wasm runtime into a Wasm module. This means,
they can only be resolved by other object files such as from other
Zig or C code compiled to Wasm.
2022-08-30 16:38:51 +02:00
Jakub Konka
aa5568beb6
coff: move Symtab and Strtab out of coff.Coff
...
This should ease interfacing with different std.coff functionalities.
2022-08-30 15:51:49 +02:00
Jakub Konka
7ef0c9d298
Merge pull request #12677 from ziglang/coff-linker
...
coff: initial rewrite of the COFF/PE linker
2022-08-30 14:29:41 +02:00
Jakub Konka
b64e4c5bf2
fix aarch64-macos CI build script
2022-08-30 14:29:06 +02:00
Jakub Konka
69d6931be7
Merge pull request #12662 from wsengir/coff-fix
...
coff: fix reading COFF header offset
2022-08-30 12:26:35 +02:00
Veikka Tuominen
e6be6d9768
std.rand: make weightedIndex proportions param a const slice
...
The function does not mutate the proportions and the signature should reflect that.
2022-08-30 13:02:17 +03:00
Jakub Konka
e57fbe8069
test-cases: fix compiler error locations for hello world with updates
2022-08-30 11:01:08 +02:00
Jakub Konka
241e1ac030
cmake: add runaway Coff/Object.zig path
2022-08-30 10:42:21 +02:00
Jakub Konka
601f2147e0
coff: cleanup relocations; remove COFF support from other backends
...
Given that COFF will want to support PIC from ground-up, there is no
point in leaving outdated code for COFF in other backends such as
arm or aarch64. Instead, when we are ready to look into those, we
can start figuring out what to add and where.
2022-08-30 10:42:21 +02:00
Jakub Konka
ebdb286736
coff: commit missing Object.zig placeholder
2022-08-30 10:42:21 +02:00
Jakub Konka
f0d4ce4494
coff: add basic handling of GOT PC relative indirection
2022-08-30 10:42:21 +02:00
Jakub Konka
db1a3bb0e7
coff: fallback to _start as default entry point for now
...
This is not technically correct, but given that we are not yet able
to link against the CRT, it's a good default until then.
Add basic logging of generated symbol table in the linker.
2022-08-30 10:42:21 +02:00
Jakub Konka
b4e3b87a52
coff: ...and lift-off!
2022-08-30 10:42:21 +02:00
Jakub Konka
30baba899c
coff: add missing bits required for minimal PE example
2022-08-30 10:42:21 +02:00
Jakub Konka
e5b8a1ac27
coff: allocate and write atoms to file
2022-08-30 10:42:21 +02:00
Jakub Konka
2a994ba4a7
coff: populate missing section metadata
2022-08-30 10:42:21 +02:00
Jakub Konka
f36029a385
coff: add helpers for setting section/symbol names
2022-08-30 10:42:21 +02:00
Jakub Konka
ff0abad2a9
coff: allow for strtab in final PE image
...
I believe this is going to be vital for section headers having names
that require the use of a string table.
2022-08-30 10:42:21 +02:00
Jakub Konka
3aa99f45b8
coff: initial implementation of incremental file allocs
2022-08-30 10:42:21 +02:00
Jakub Konka
da00e6dd59
coff: always write all data directory headers to file
...
Maximum number is always 16, and this also unbreaks `dumpbin.exe`
run on a simple section-less PE image created with our linker.
2022-08-30 10:42:21 +02:00
Jakub Konka
9fc6933418
coff: write data directory and section headers to file
2022-08-30 10:42:21 +02:00
Jakub Konka
93127a615b
coff: set some defaults for PE headers
2022-08-30 10:42:21 +02:00
Jakub Konka
ed481e3837
coff: write headers to file
2022-08-30 10:42:21 +02:00
Jakub Konka
90b3599c68
coff: reorganize the linker
2022-08-30 10:42:21 +02:00
Jakub Konka
580bfe01c8
coff: fix after rebase
2022-08-30 10:42:21 +02:00
Jakub Konka
3c10221030
coff: move header writing logic into flush
2022-08-30 10:42:21 +02:00
Jakub Konka
06371950cf
start: allow for explicitly defined entry point for Win
2022-08-30 10:42:21 +02:00
Andrew Kelley
527055a821
CI: use absolute path for zig lib dir
...
Workaround for #12685
2022-08-30 00:33:21 -07:00
Andrew Kelley
75d5a4b9a2
CI: pass explicit zig lib dir in lots of places
...
see #12684 for motivation
2022-08-29 23:37:31 -07:00
Andrew Kelley
6f9b7c8cee
make 'zig build' respect ZIG_LIB_DIR
...
follow-up to 56bdd0127f806da8b617eb82be444a4624aa5685
2022-08-29 23:35:07 -07:00
Andrew Kelley
1cb8065a52
skip new behavior tests that do not pass for stage1
2022-08-29 22:58:24 -07:00
Andrew Kelley
3c506c8aaa
disable tests failing due to LLVM 15 regressions
2022-08-29 22:58:24 -07:00
Meghan
56bdd0127f
implement cache environment variables for zig build
2022-08-29 22:26:41 -04:00
Andrew Kelley
bf28765a97
LLVM: upgrade byval attr code to LLVM 15 opaque pointers
...
Follow-up from 74673b7f69b27dc39a653f92eb58bba71e289f39.
2022-08-29 18:19:39 -07:00
Luuk de Gram
fffece1533
wasm-lld: set stack size to 1MB by default
...
Regardless of the build mode (build-exe, build-lib), always
set the default stack size to 1MB. Previously, this was only
done when using build-exe, making the inconsistancy confusing.
The user can still override this behavior by providing the
`--stack <size>` flag.
2022-08-29 18:23:14 -04:00
Andrew Kelley
d2d42cf7ba
Merge pull request #12641 from Luukdegram/wasm-c-types
...
stage2: fix size of c_longdouble for Wasm target
2022-08-29 18:21:38 -04:00
Andrew Kelley
f52ee1607a
Merge remote-tracking branch 'origin/master' into llvm15
2022-08-29 15:19:19 -07:00
Andrew Kelley
d841d2c27e
update C headers to LLVM 15 rc3
2022-08-29 15:14:58 -07:00
Andrew Kelley
e6ccc93aac
update libcxx to LLVM 15 rc3
2022-08-29 15:12:46 -07:00
Andrew Kelley
b5dc8b67bc
LLVM: update merged master branch code to opaque pointers
2022-08-29 15:00:31 -07:00
Andrew Kelley
e8edc4cf83
link: add force_undefined_symbols to cache hash
...
Follow-up for d5233ee85ce13cba3dd03e4c0c938cee193b9b19.
2022-08-29 14:52:18 -07:00
Andrew Kelley
de7270028d
Merge remote-tracking branch 'origin/master' into llvm15
2022-08-29 14:10:59 -07:00
Andrew Kelley
e69973bedd
Merge pull request #12508 from ziglang/cmake-stage3
...
cmake: build stage3 by default
2022-08-29 16:52:36 -04:00