Veikka Tuominen
e584558bd8
Sema: do not use coerceCompatiblePtr for alignCast
...
Closes #12902
2022-09-19 18:34:52 +03:00
Jakub Konka
e42f83825f
Merge pull request #12893 from ziglang/macho-relocs-cleanup
...
macho: rewrite incremental linker, and init splitting of linking contexts
2022-09-18 23:19:33 +02:00
Loris Cro
2698cb346a
autodoc: don't collect tests, usingnamespace and comptime blocks
...
Previously we were collecting as autodoc decls everything that was a ZIR
decl in a rather naive way. Now we only collect decltests as part of the
data relative to the decl they refer to, and ignore everything else.
2022-09-18 20:00:44 +02:00
Jakub Konka
4474f8dd6e
macho: cleanup how we collect dyld data in incremental linker
2022-09-18 15:13:45 +02:00
Jakub Konka
f4706c23e9
macho: fix after sync with master
2022-09-18 11:01:29 +02:00
Jakub Konka
372acb8350
macho: ensure we extend section size when updating last atom
2022-09-18 10:00:04 +02:00
Jakub Konka
275abf7c57
macho: fix overlapping segments in file offset
2022-09-18 10:00:04 +02:00
Jakub Konka
66942cbc1a
macho: make sure both vmsize and filesize for segments match always
2022-09-18 10:00:04 +02:00
Jakub Konka
2c971f0085
fix code formatting
2022-09-18 10:00:04 +02:00
Jakub Konka
e35a16c7e0
macho: make sure both vmsize and filesize for segments match
2022-09-18 10:00:04 +02:00
Jakub Konka
7f7669a09e
macho: fix building on 32bit targets
2022-09-18 10:00:04 +02:00
Jakub Konka
dc6480dba5
macho: allow for add and ldr when resolving GOT_LOAD_* relocs
2022-09-18 10:00:04 +02:00
Jakub Konka
618c7a3546
macho: add logic for expanding segments in memory
2022-09-18 10:00:04 +02:00
Jakub Konka
e601969244
macho: rewrite how we allocate space in incremental context
2022-09-18 10:00:04 +02:00
Jakub Konka
79ab46ec91
macho: start separating linking contexts
2022-09-18 10:00:04 +02:00
Jakub Konka
53bd7bd044
macho: move to incremental writes and global relocs for incremental
2022-09-18 10:00:04 +02:00
Jakub Konka
34f9360ea2
macho: do not call populateMissingMetadata in full link mode
2022-09-18 10:00:04 +02:00
Jakub Konka
e5da251635
macho: clean up use of section ids
2022-09-18 10:00:04 +02:00
Jakub Konka
05d0c42894
macho: move main driver loop for one-shot into standalone zld module
2022-09-18 10:00:03 +02:00
Jakub Konka
26af8d254a
macho: separate in structure and logic incremental relocs and file relocs
2022-09-18 10:00:03 +02:00
Jakub Konka
54854e2ab8
add removed expected stdout comparison in link test
2022-09-18 09:28:46 +02:00
Jakub Konka
0030e72d53
use EmulatableRunStep for newly added macho link test
...
Reverts 75e9a8c7fabb1f32753960b9114dcee875256351
2022-09-18 09:22:49 +02:00
Andrew Kelley
75e9a8c7fa
skip macho link test execution on non-macOS
...
2c3d87b168bf522f538e78325fdae71c320e6e20 introduced a new test that
passes on macOS but fails on other operating systems. This commit makes
it only run on macOS.
2022-09-17 21:33:19 -07:00
Jakub Konka
437ddcce7a
test-cases: remove removed "note: referenced here" note from the error
2022-09-17 23:38:40 +02:00
Jakub Konka
0f1fbbfdfb
ci: azure: macos: use updated release tarball
2022-09-17 23:11:58 +02:00
Jakub Konka
2c3d87b168
macho: test empty translation units
2022-09-17 18:43:24 +02:00
Jakub Konka
5391541f11
macho: do not assume every object has a symtab
...
For example, building stage2 requires an empty `empty.cc` source file
compiling which generates a valid translation unit with no symtab/strtab.
In this case, we cannot simply assume that every translation unit will
have a valid symtab; instead, we cautiously default the input symtab
and strtab fields to optional `null` to signal symtab's presence or its lack of.
In case the symtab is not present, we catch this fact when splitting
input sections into subsections and create a synthetic symbol per every
suitable section.
2022-09-17 18:42:47 +02:00
billzez
dfcadd22bb
fix android definition of pthread_rwlock_t ( #12830 )
2022-09-16 20:20:24 -05:00
Veikka Tuominen
b2aedb0709
Merge pull request #12796 from Vexu/referenced-by-v2
...
stage2: add referenced by trace to compile errors attempt #2 (+ some fixes)
2022-09-16 23:49:00 +03:00
Andrew Kelley
8edd7219c0
Sema: improve source location after as_node is used
...
+2 more passing compile error tests
2022-09-16 14:47:17 -04:00
Andrew Kelley
d3d24874c9
std: remove deprecated API for the upcoming release
...
See #3811
2022-09-16 14:46:53 -04:00
cod1r
7b32aacbaf
fix ChildProcess crash when PATH is empty.
2022-09-15 22:54:17 -04:00
Andrew Kelley
2be72c719e
ci: azure: macos: use an unstripped debug zig tarball
...
Hopefully will give us some insight into the spurious failures.
Follow-up from afba53f0f168365a9540a8c8bb39e85a44e0249c.
2022-09-15 13:56:18 -07:00
Andrew Kelley
9f4408d68b
organize some compile error tests
...
Many of these tests check for the incorrect behavior of stage1 whereas
self-hosted correctly does not emit an error, so they are simply
deleted.
The remaining number of test cases within the stage1/ subdirectory is
reduced from 143 to 103.
2022-09-15 14:40:45 -04:00
Andrew Kelley
afba53f0f1
CI: swap out azure macos tarball for unstripped ReleaseSafe
...
Hopefully will give us some insight into the spurious failures.
2022-09-14 19:16:02 -07:00
Eric Joldasov
a86c7b13a3
docgen: add f80 to builtin types
2022-09-14 20:08:34 -04:00
Stephen Gregoratto
7ccb94fac8
Audit FreeBSD structs to match header files/ABI
...
The big outliers were `Stat` and `mcontext_t`. Also adds doc-comments
from the headers where possible.
2022-09-14 20:05:54 -04:00
alichraghi
8c9f468fdd
std.ArrayList.ensureTotalCapacity: optimize and fix integer overflow
...
Fixes #12099
2022-09-14 20:05:15 -04:00
Andrew Kelley
78cd7b57ef
Merge pull request #12206 from koachan/sparc64-codegen
...
stage2: sparc64: Another batch of Air lowerings, bugfixes, etc.
2022-09-14 20:00:38 -04:00
Koakuma
86dc982e74
stage2: sparc64: Implement airSlicePtr
2022-09-14 16:58:13 -07:00
Koakuma
ed546a7aad
stage2: sparc64: Add placeholder for some Air instructions
...
airAddSat airSubSat airMulSat airShlSat airUnaryMath airPopcount airPrefetch
airPtrElemVal airOptionalPayload airOptionalPayloadPtr airOptionalPayloadPtrSet
2022-09-14 16:58:13 -07:00
Koakuma
0910cb6fcb
stage2: sparc64: Skip compile-failing tests for now
2022-09-14 16:58:12 -07:00
Koakuma
0e1c68d90a
stage2: sparc64: Don't track condition_flags_inst in checked binOps
...
This stops the emission of spurious CCR spills.
2022-09-14 16:57:31 -07:00
Koakuma
0464512f2e
stage2: sparc64: Implement airShlWithOverflow
2022-09-14 16:57:31 -07:00
Koakuma
de17fe66a5
stage2: sparc64: Tidy up binOp and enable more operations
...
sub, mul, addwrap, subwrap, mulwrap, shr, shr_exact
2022-09-14 16:57:31 -07:00
Koakuma
ab3d3b260b
stage2: sparc64: Add airClz/airCtz placeholder
2022-09-14 16:57:31 -07:00
Koakuma
b9897c3b84
stage2: sparc64: Implement airMulOverflow for <= 32 bits
2022-09-14 16:57:31 -07:00
Koakuma
844d3a5a74
stage2: sparc64: Fix SPARCv9 shift opcodes encoding
2022-09-14 16:57:31 -07:00
Koakuma
2263bba6cd
stage2: sparc64: Skip Sema-failing tests for now
2022-09-14 16:57:31 -07:00
Koakuma
61265fba04
stage2: sparc64: Implement airBinop for bool_and/or
2022-09-14 16:57:31 -07:00