Commit Graph

20301 Commits

Author SHA1 Message Date
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 75e9a8c7fa
2022-09-18 09:22:49 +02:00
Andrew Kelley 75e9a8c7fa skip macho link test execution on non-macOS
2c3d87b168 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 afba53f0f1.
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
Koakuma 4fc6df9f62 stage2: sparc64: Implement airTagName 2022-09-14 16:57:31 -07:00
Koakuma f01867f78e stage2: sparc64: Implement airWrapOptional 2022-09-14 16:57:31 -07:00
Koakuma b6307144c0 stage2: sparc64: Implement airPtrToInt 2022-09-14 16:57:31 -07:00
Koakuma 2c9ab03b0b stage2: sparc64: Add airCmpLtErrorsLen placeholder 2022-09-14 16:57:31 -07:00
Koakuma 5b0134e3ed stage2: sparc64: Change branch_link Mir field definition 2022-09-14 16:57:31 -07:00
Koakuma 64b61f0740 stage2: sparc64: Add airFloatToInt & airIntToFloat placeholder 2022-09-14 16:57:31 -07:00
Andrew Kelley 17596c79a9 stage2: fix compile error merge conflict
3250b20cea had a silent merge conflict
with master branch; fixed now.
2022-09-14 16:41:53 -07:00
Jan Philipp Hafer 8cab0762d8 place zig-cache directory next to build.zig
* search upwards, if no build.zig is found
* if this fails or any error occurs, fallback to global zig-cache

Closes #11672
2022-09-14 19:39:25 -04:00
Manlio Perillo 3250b20cea src/print_env: print the native target
Add the native target triple to the zig env command output.

The target triple is formatted the same way as it is done in the
zig targets command.
2022-09-14 19:28:47 -04:00
Andrew Kelley 1d041d3a10 Merge pull request #11664 from vincenzopalazzo/macros/docs
docs: add missed docs for some language feature like `defer` and `errdefer`
2022-09-14 19:26:28 -04:00
Andrew Kelley 0931dda9a9 Merge pull request #11663 from matu3ba/utf16
std.unicode: add utf16 byte length and codepoints counting routines
2022-09-14 19:25:15 -04:00
Andrew Kelley d7a0fe67b3 disable spuriously failing test on Windows
See tracking issue #12844
2022-09-14 16:12:55 -07:00