lithdew
81adcd533e
os/posix: handle ECONNRESET for write/writev
2021-04-14 16:40:06 -07:00
Andrew Kelley
5a3ea9bece
Merge remote-tracking branch 'origin/llvm12'
...
Happy LLVM 12 Release Day.
Please note that the llvm 12 tag does not include the latest commit in
the release/12.x branch, which is in fact a bug fix for a regression
that is causing a failure in Zig's test suite.
Zig master branch is tracking release/12.x, and will be enabling the
test that is fixed by that commit.
2021-04-14 14:41:57 -07:00
Evan Haas
e761e0ac18
translate-c: wrap switch statements in a while (true) loop
...
This allows `break` statements to be directly translated from the original C.
Add a break statement as the last statement of the while loop to ensure we
don't have an infinite loop if no breaks / returns are hit in the switch.
Fixes #8387
2021-04-13 11:45:03 -07:00
Jakub Konka
461543a5fd
zld: fix symbol resolution from interdep archives
...
Fixes symbol resolution if an archive occurring later in the linker
line depends on a object embedded within the archive that occurred
before.
2021-04-13 13:36:08 +02:00
Jakub Konka
a5bbc66f10
zld: cleanup redundant changes
2021-04-13 10:56:03 +02:00
Jakub Konka
db30033de2
zld: rebase to new naming conv for aarch64
2021-04-13 10:56:03 +02:00
Jakub Konka
1119970d22
zld: add x86_64 relocs
2021-04-13 10:56:03 +02:00
Jakub Konka
b1f9db75f3
zld: save locals per TU
2021-04-13 10:56:03 +02:00
Jakub Konka
3b7c9dd6bd
zld: differentiate between static and global in stabs
2021-04-13 10:56:03 +02:00
Jakub Konka
717d382871
zld: streamline tags for Symbol
2021-04-13 10:56:03 +02:00
Jakub Konka
b377e0b370
zld: fix indirect symtab
2021-04-13 10:56:03 +02:00
Jakub Konka
b0a4e1fa46
zld: fix rebase vs bind for GOT entries
2021-04-13 10:56:03 +02:00
Jakub Konka
6e3f82ef28
zld: fix parsing debug info
2021-04-13 10:56:03 +02:00
Jakub Konka
65c27d51f6
zld: limit exports to just main entrypoint
2021-04-13 10:56:03 +02:00
Jakub Konka
421102ba72
zld: move parsing debug info into object
2021-04-13 10:56:03 +02:00
Jakub Konka
dc7cff8ebc
zld: add prelim support for locals
2021-04-13 10:56:03 +02:00
Jakub Konka
23bb6fa9f4
zld: flush MachO
2021-04-13 10:56:03 +02:00
Jakub Konka
db44a7803f
zld: resolve target addresses for relocs
2021-04-13 10:56:03 +02:00
Jakub Konka
b667fe2c62
zld: resolve stubs and GOT entries
2021-04-13 10:56:03 +02:00
Jakub Konka
46cc214f2d
zld: migrate parts of main to new relocs
2021-04-13 10:56:03 +02:00
Jakub Konka
6a866f1a96
zld: preprocess relocs on arm64
2021-04-13 10:56:03 +02:00
Jakub Konka
4e676ecbb5
zld: allocate addresses for global symbols
2021-04-13 10:56:03 +02:00
Jakub Konka
d5c2f8ed32
zld: store a single global symtab
2021-04-13 10:56:03 +02:00
Jakub Konka
1b5bceec91
zld: start work on reloc preprocessing
2021-04-13 10:56:03 +02:00
Jakub Konka
04659f5b82
zld: allocate segments based on worst-case and upper-limit
2021-04-13 10:56:03 +02:00
Jakub Konka
116ea1bf2c
zld: assume remaining undefs are from libSystem
2021-04-13 10:56:03 +02:00
Jakub Konka
b0105029ca
zld: refactor object and archive parsing
2021-04-13 10:56:03 +02:00
Jakub Konka
988b184d03
zld: redo symbol resolution in objects
...
Store only globals and undefs at the linker level, while all locals
stay scoped to the actual object file they were defined in. This is
fine since the relocations referencing locals will always be resolved
first using the local symbol table before checking for the reference
within the linker's global symbol table.
This also paves the way for proper symbol resolution from within static
and dynamic libraries.
2021-04-13 10:56:03 +02:00
Andrew Kelley
262e09c482
stage1: resolve builtin types and values via std.builtin
...
rather than via `@import("builtin")`. This helps avoid the need for
`usingnamespace` used in builtin.zig or in std.builtin.
2021-04-12 15:54:28 -07:00
Michael Dusan
93cf9560b1
Merge remote-tracking branch 'origin/master' into llvm12
2021-04-11 17:40:19 -04:00
joachimschmidt557
4fe575f47b
stage2 ARM: Add fibonacci test
2021-04-11 10:19:36 +02:00
joachimschmidt557
a6ddc12b33
stage2 codegen: Set MCValue of register arguments to their stack copy
2021-04-11 10:19:35 +02:00
Min-Yih Hsu
52d871844c
llvm new-pm: Build O0 pipeline in the correct way
...
Use `PassBuilder::buildO0DefaultPipeline` to build pipeline for -O0
in replacement of `PassBuilder::buildPerModuleDefaultPipeline`. This
affects both normal and LTO settings.
Two redundant Passes - which were added by accident - were also removed
from LTO pipeline.
2021-04-09 16:51:35 -07:00
Min-Yih Hsu
6b3eaa62e8
Revert "Revert back to the old LLVM PassManager"
...
This reverts commit 09008125e7944ae01bb907f2eb8dbff41d7a0715.
2021-04-09 16:51:35 -07:00
jacob gw
0d92bd474f
stage2: fix case where public variables did not work
2021-04-09 11:54:38 -07:00
Andrew Kelley
b3f5d4dc4c
stage2: fix regression from previous commit
...
I forgot to build, sorry about that.
2021-04-09 10:38:44 -07:00
Andrew Kelley
7c4c5495be
stage2: fix stderr deadlock and slightly wrong tty coloring
2021-04-09 10:34:10 -07:00
Andrew Kelley
f75cdd1acd
Merge pull request #8470 from ziglang/stage2-start
...
stage2: blaze the trail for std lib integration
2021-04-09 10:15:46 -07:00
Andrew Kelley
952032b40c
Merge pull request #8439 from Luukdegram/wasm-mem
...
stage2: wasm - "Hello world"
2021-04-09 10:08:21 -07:00
jacob gw
afe5862111
stage2: add error for private decls accessed from other files
2021-04-09 10:05:15 -07:00
Luuk de Gram
eaaf75c157
Fix memory cleanup and update unplugging to avoid infinite loop
2021-04-09 09:24:52 +02:00
Andrew Kelley
9a2de796bd
stage2: clean up pretty printing compile errors
2021-04-09 00:19:44 -07:00
jacob gw
0f105ea324
stage2: fix bug where a parser error would break errors
...
A parser error would deinit the tree, but the tree is needed for the
node locations. This removes the offending code written before node
locations.
2021-04-08 23:17:36 -07:00
jacob gw
99ec511c4c
stage2: pretty print compilation errors
2021-04-08 23:17:36 -07:00
g-w1
c6791d87d4
stage2: delete allowing input (and output) zir from the pipeline ( #8471 )
...
Remove -femit-zir as we aren't going to need it. Also remove zir test code
This removes a TODO that asserts the file is not zir.
2021-04-09 02:11:33 -04:00
Andrew Kelley
23db96931e
AstGen: implement @typeInfo builtin
2021-04-08 22:38:13 -07:00
Andrew Kelley
6e05d53e88
AstGen: implement struct init with ResultLoc.ty
2021-04-08 22:33:40 -07:00
Andrew Kelley
91e1414b50
stage2: implement array access to a global array
2021-04-08 21:56:42 -07:00
Andrew Kelley
1b702f8ddb
stage2: fix the memory leaks
2021-04-08 20:52:02 -07:00
Andrew Kelley
61b868f9a5
stage2: simplify Decl src_node field
...
Also fix "previous definition here" error notes to be correct.
2021-04-08 20:37:19 -07:00