Andrew Kelley
0d120fcb89
Merge pull request #12225 from ziglang/ci-stage3-standalone
...
CI stage3 test coverage for test-standalone and test-cli
2022-07-25 00:46:56 -07:00
Andrew Kelley
546c75ca46
LLVM: notice the soft_float CPU feature
...
when deciding whether to lower to x86_fp80 instructions, or softfloat
instructions.
Closes #10847
Closes #12090
2022-07-24 17:10:08 -07:00
Andrew Kelley
93ae386f56
stage2: don't skip liveness or codegen if -femit-asm is supplied
...
Fixes Godbolt's CLI usage of Zig.
2022-07-24 15:02:05 -07:00
Andrew Kelley
934573fc5d
Revert "std.fmt: require specifier for unwrapping ?T and E!T."
...
This reverts commit 7cbd586ace46a8e8cebab660ebca3cfc049305d9.
This is causing a fail to build from source:
```
./lib/std/fmt.zig:492:17: error: cannot format optional without a specifier (i.e. {?} or {any})
@compileError("cannot format optional without a specifier (i.e. {?} or {any})");
^
./src/link/MachO/Atom.zig:544:26: note: called from here
log.debug(" RELA({s}) @ {x} => %{d} in object({d})", .{
^
```
I looked at the code to fix it but none of those args are optionals.
2022-07-24 11:50:10 -07:00
InKryption
7cbd586ace
std.fmt: require specifier for unwrapping ?T and E!T.
...
Co-authored-by: Veikka Tuominen <git@vexu.eu>
2022-07-24 12:01:56 +03:00
Meghan
dea437edfb
stage2: implement noinline fn
2022-07-24 11:56:33 +03:00
Andreas Reischuck
903bed931d
report better error for package not found in stage2
2022-07-24 11:55:37 +03:00
Veikka Tuominen
baf516218e
Sema: don't add union field access safety check for single field unions
2022-07-23 15:40:12 +03:00
Veikka Tuominen
2436dd2c1b
Sema: validate duplicate fields in anon structs
2022-07-23 15:40:12 +03:00
Veikka Tuominen
5b29275240
Sema: add some more 'declared here' notes
2022-07-23 15:40:12 +03:00
Veikka Tuominen
881c0cb20b
Sema: add default value here note to invalid comptime field store error
2022-07-23 15:40:12 +03:00
Veikka Tuominen
15dddfd84d
AstGen: make comptime fields in packed and extern structs compile errors
2022-07-23 15:40:12 +03:00
Veikka Tuominen
0ef4cc738b
Sema: check for zero length slices in @alignCast safety
2022-07-23 15:40:12 +03:00
Veikka Tuominen
d75fa86d70
stage2: implement @setFloatMode
2022-07-23 15:40:12 +03:00
Veikka Tuominen
585c160c20
Sema: handle store to comptime field when ResultLoc == .none
2022-07-23 15:40:12 +03:00
Veikka Tuominen
9465906775
Sema: return .comptime_field_ptrs for tuples
2022-07-23 15:40:12 +03:00
Veikka Tuominen
cf87026e52
Sema: @alignCast safety
2022-07-23 15:40:11 +03:00
Veikka Tuominen
711b656773
Sema: @floatToInt safety
2022-07-23 15:40:11 +03:00
Veikka Tuominen
ff7ec4efb5
Sema: bad union field access safety
2022-07-23 15:40:11 +03:00
Veikka Tuominen
55fe34100f
Sema: exact division safety
2022-07-23 15:40:11 +03:00
Veikka Tuominen
76d099950a
Sema: cast negative to unsigned safety
2022-07-23 15:40:11 +03:00
Veikka Tuominen
0782586b15
Sema: divide by zero safety
2022-07-23 15:40:11 +03:00
Veikka Tuominen
9f10dfcb54
Sema: implement shr_exact runtime safety
2022-07-23 15:40:11 +03:00
Veikka Tuominen
4d20d6874c
move passing safety tests to stage2
2022-07-23 15:40:11 +03:00
viri
b728e6aa00
stage1: don't lowercaseify lib names
2022-07-23 15:04:02 +03:00
Yujiri
6b9f609bd0
Fix #6944 : referencing type info alignment causes error in unrelated function
2022-07-23 14:26:52 +03:00
Jakub Konka
a8bfddfaea
Merge pull request #12140 from ziglang/macho-gc-sections
...
macho: add support for `-dead_strip` (GC sections) and simplify symbol resolution
2022-07-23 00:01:09 -07:00
Andrew Kelley
a035d75a17
Autodoc: update to new ZIR
...
Fixes a merge conflict with 8e75ba653b03477229cf72211e8a8bfe7b071254
which removed ptr_type_simple and added overflow_arithmetic_ptr.
2022-07-22 21:24:19 -07:00
Andrew Kelley
7502e490cb
Merge pull request #12173 from ziglang/autodocs-rebased
...
New Autodocs!
2022-07-22 20:56:59 -07:00
Andrew Kelley
f591936480
Merge pull request #12198 from Vexu/stage2
...
Sema: fix loading and storing of optional pointers represented as pointers
2022-07-22 20:47:40 -07:00
Jakub Konka
cf6cfc830d
macho: fix use-after-move in placeDecl
...
Previously, we would get a pointer to a slot in the symbol table,
apply changes to the symbol, and return the pointer. This however
didn't take into account that the symbol table may be moved in memory
in-between the modification and return from the function (`fn placeDecl`).
Prior to my rewrite, this was not possible within the body of the said
function. However, my rewrite revamped how we allocate GOT atoms and
their matching symtab indexes, which now may cause a move in memory
of the container.
2022-07-23 00:13:34 +02:00
Jakub Konka
600348283f
macho: include __StaticInit input sections as GC roots
2022-07-22 21:19:33 +02:00
Andrew Kelley
5dd59a5423
Merge pull request #12191 from ziglang/underaligned-fields
...
LLVM: fix lowering of structs with underaligned fields
2022-07-22 11:58:50 -07:00
Veikka Tuominen
423a19fa60
Sema: add error for dereferencing invalid payload ptr at comptime
2022-07-22 21:10:50 +03:00
Veikka Tuominen
03b1fbe50d
stage2: fix airIsErr when is_ptr == true
2022-07-22 21:07:55 +03:00
Veikka Tuominen
1f748fe426
Sema: fix mutation of optional ptr represented as regular ptr
2022-07-22 19:50:11 +03:00
Jakub Konka
f8458a549b
macho: dead_strip defaults: off for debug, on for release
2022-07-22 16:58:21 +02:00
Jakub Konka
0901e4805c
macho: fix zig cc and c++ using stage2 llvm
2022-07-22 16:58:21 +02:00
Jakub Konka
ca74656685
macho: move GC code into dead_strip.zig module
...
Implement marking live atoms that reference other live atoms if
required by the compiler (via section attribute).
2022-07-22 16:58:21 +02:00
Jakub Konka
7345976261
macho: sort subsection symbols by seniority
2022-07-22 16:58:21 +02:00
Jakub Konka
39df241df4
macho: do not GC local symbols unless reference dead symbols
...
If a local references another local, we keep it. If it doesn't
reference anything, we keep it. Otherwise, we dead strip it.
2022-07-22 16:58:21 +02:00
Jakub Konka
a089a6dc4f
macho: parse data-in-code when writing LINKEDIT segment
2022-07-22 16:58:21 +02:00
Jakub Konka
2dfc78dc03
macho: limit export info to entrypoint and mh symbol when executable
2022-07-22 16:58:21 +02:00
Jakub Konka
0f1b5d45bc
macho: mark __mh_execute_header as ref'd dynamically
2022-07-22 16:58:21 +02:00
Jakub Konka
0da8ba816a
macho: do not store stabs; generate on-the-fly instead
2022-07-22 16:58:21 +02:00
Jakub Konka
41b91442f4
macho: improve logs for dyld info
2022-07-22 16:58:21 +02:00
Jakub Konka
4658d857de
macho: fix caching linker line in incremental setting
2022-07-22 16:58:20 +02:00
Jakub Konka
b380ed6a72
macho: deallocate globals keys
2022-07-22 16:58:20 +02:00
Jakub Konka
817939d20a
macho: don't store GC roots globally
...
Instead, if dead-strip was requested, create a temp container and
pass it around.
2022-07-22 16:58:20 +02:00
Jakub Konka
61b4119a7d
macho: link atom starting section by orig section id
...
In x86_64 relocs, it can so happen that the compiler
refers to the same atom by both the actual assigned symbol
and the start of the section. In this case, we need to
link the two together so add an alias.
2022-07-22 16:58:20 +02:00