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
Andrew Kelley
9cca6728e5
Merge pull request #12663 from Vexu/stage2-fixes
...
Stage2 fixes
2022-08-29 16:46:51 -04:00
Veikka Tuominen
a4b52ccd9f
Sema: fix access of inactive union field when enum and union fields are in different order
...
Closes #12667
2022-08-29 13:45:37 -07:00
Andrew Kelley
532cfb65e0
CI: rework to account for new cmake behavior
...
* CMakeLists: pass `-Dstrip` for release zig builds
* pass -target and -mcpu to zig1. works around llvm on freebsd
incorrectly detecting "freestanding" instead of "freebsd" for the
native OS.
* ci.ziglang.org is now responsible for creating aarch64-macos tarballs
rather than Azure.
2022-08-28 17:07:21 -07:00
Andrew Kelley
aee53e2ffd
CMake: add dummy install command
...
This makes it so that `ninja install` will work as expected.
2022-08-28 17:07:21 -07:00
Andrew Kelley
3d9b6cfcc9
stage2: add an explicit padding field to avoid Valgrind warning
...
Adds a `unused: u32 = 0` field to `Zir.Header`.
We could leave this as padding, however it triggers a Valgrind warning because
we read and write undefined bytes to the file system. This is harmless, but
it's essentially free to have a zero field here and makes the warning go away,
making it more likely that following Valgrind warnings will be taken seriously.
2022-08-28 17:07:21 -07:00
Andrew Kelley
56129d26eb
cmake: build stage3 by default
...
This is a simplification of the cmake build script which introduces a
new "stage3" target that is built by default, which builds and installs
a stage3 zig.
It greatly simplifies the build instructions for Zig, making it conform
to the regular cmake routine, while still producing a stage3 artifact.
2022-08-28 17:07:21 -07:00
Luuk de Gram
1eb22e7ad6
wasm: skip unimplemented behavior test
...
Since now the size of a c_longdouble is correctly 16 bytes,
the test is no longer passing. It was previously accidentally passing
due to incorrect sizing and it not being larger than the size
of a f64.
disable long_double test for windows
2022-08-28 17:50:07 +02:00
William Sengir
91b9f295d3
coff: publicize and flesh out more image constants
2022-08-28 06:20:18 -07:00
Veikka Tuominen
15cc4514e0
Sema: add missing calls to resolveStructLayout
...
Closes #12645
2022-08-28 15:41:21 +03:00
Veikka Tuominen
e2dc77ab62
Sema: correct one possible value for tuples
...
Closes #12376
2022-08-28 15:41:21 +03:00
Veikka Tuominen
776caaf999
Sema: fix handling of non-standard int types in empty non-exhaustive enums
...
Closes #12649
2022-08-28 15:41:21 +03:00
Veikka Tuominen
6aead18ab3
add error tests for now correctly behaving cases
...
Closes #6377
2022-08-28 15:41:21 +03:00
Veikka Tuominen
1401890ed5
Sema: add error for switch on slice
...
Closes #12651
2022-08-28 15:41:21 +03:00
Veikka Tuominen
fc213e2d61
AstGen: add error for named function type
...
Closes #12660
2022-08-28 15:41:21 +03:00
Justin Whear
5bb8c03697
std.random: add weightedIndex function
...
`weightedIndex` picks from a selection of weighted indices.
2022-08-28 14:19:51 +03:00
William Sengir
3860e664c5
coff: fix reading COFF header offset
2022-08-28 03:10:39 -07:00
Loris Cro
0f27836c21
ci: fix wrong path when deploying stdlib docs
2022-08-28 01:20:38 +02:00
Loris Cro
e0103704c5
autodoc: better line counting for decls
2022-08-27 22:48:18 +02:00
Henrique Dante de Almeida
ee12264387
docs: Remove mention of type inference on anytype struct fields
...
It was removed from the language.
2022-08-27 20:34:13 +02:00
antlilja
ae8d26a6a0
Sema: add error for non-comptime param in comptime func
...
Adds error for taking a non comptime parameter in a function returning a
comptime-only type but not when that type is dependent on a parameter.
Co-authored-by: Veikka Tuominen <git@vexu.eu>
2022-08-27 11:17:48 +03:00