Commit Graph

28561 Commits

Author SHA1 Message Date
Igor Anić
a5326c5ef8 return few previous fixes
Review: https://github.com/ziglang/zig/pull/19032#pullrequestreview-1896251841
2024-02-22 17:20:41 +01:00
antlilja
6cc51d3c33 LLVM: Set new debug location after inlining 2024-02-22 16:07:25 +01:00
antlilja
de536e8473 LLVM Builder: Emit metadata kinds and function metadata attachments 2024-02-22 15:29:28 +01:00
antlilja
92eec8dfec LLVM Builder: Emit type for debug subprogram 2024-02-22 15:24:22 +01:00
Igor Anić
d00faa2407 use BufferedTee in Fetch/git.zig 2024-02-22 15:18:03 +01:00
Igor Anić
eb67fab2d9 refactor according to Ian's review
https://github.com/ziglang/zig/pull/19032#pullrequestreview-1894702793
2024-02-22 12:29:21 +01:00
Jacob Young
4b215e3a11 Builder: support printing metadata in llvm ir 2024-02-22 08:54:35 +01:00
Andre Weissflog
dd1fc1cb8c std.os.emscripten: fix regression caused by code cleanup in std.os.wasi (Closes #19019) 2024-02-21 17:09:29 -08:00
antlilja
a907353ca4 LLVM Builder: Fix on 32-bit systems 2024-02-22 00:39:56 +01:00
Jakub Konka
a92e6146da elf+riscv: return an error for unimplemented HI20 forward lookup 2024-02-21 23:49:22 +01:00
Jakub Konka
6236f5b810 link+riscv: simplify bitSlice helper 2024-02-21 23:40:44 +01:00
Jakub Konka
2ad2e2f6f5 link+riscv: use riscv64/bits.zig to implement write helpers 2024-02-21 23:34:05 +01:00
antlilja
53f6071486 LLVM Builder: Emit debug vector types with DIVector flag 2024-02-21 23:33:25 +01:00
antlilja
5e9d0da43b LLVM Builder: Correctly emit debug subranges
The bitcode abbrev was missing the subrange code
2024-02-21 23:32:21 +01:00
Jakub Konka
ddb33baa11 test/link/elf: test static linking C riscv64-musl 2024-02-21 23:08:29 +01:00
Jakub Konka
720dd80007 elf+riscv: implement enough to get basic hello world in C working 2024-02-21 23:04:43 +01:00
Jakub Konka
ca6f41ee30 elf+riscv: skip parsing .riscv.attributes section for now 2024-02-21 22:50:55 +01:00
Jakub Konka
d19001abac elf: skip STT_NOTYPE only if SHN_UNDEF from symtab inclusion 2024-02-21 22:49:58 +01:00
Jakub Konka
9fd112804f link: commit missing files 2024-02-21 22:48:19 +01:00
Jakub Konka
8ba31ed39a elf: sort input relocs if targeting riscv64 2024-02-21 22:47:52 +01:00
Jakub Konka
55dadc3d85 test/link/elf: test static linking C aarch64-musl 2024-02-21 22:40:03 +01:00
Jakub Konka
7fd4576596 elf+aarch64: resolve .eh_frame relocs 2024-02-21 22:28:02 +01:00
Jakub Konka
7aeba3a3d1 elf+aarch64: implement some resolveRelocNonAlloc logic 2024-02-21 22:25:25 +01:00
Jakub Konka
887709ed5c elf+aarch64: implement some resolveRelocAlloc logic 2024-02-21 22:22:40 +01:00
Jakub Konka
d7d47a2c0c elf+aarch64: implement some scanReloc logic 2024-02-21 22:07:51 +01:00
Jakub Konka
ee364d542a link: introduce common set of aarch64 abstractions 2024-02-21 22:00:28 +01:00
antlilja
e57f553c07 LLVM Builder: Rework MetadataString to not rely on String
This fixes a problem where empty strings where not emitted as null.
This should also emit a smaller stringtab as all metadata strings were
emitted in both the strtab and in the strings block inside the metadata
block.
2024-02-21 21:46:04 +01:00
Jakub Konka
60a8f9b989 elf: make GOT arch aware when resolving relocs 2024-02-21 20:58:43 +01:00
Jakub Konka
775a161794 elf: simplify logic for resolving .eh_frame relocs on different arches 2024-02-21 20:50:29 +01:00
Jakub Konka
06c191a4ff elf: simplify logic for resolving nonalloc relocs on different arches 2024-02-21 20:29:56 +01:00
Igor Anić
ce1a590fc9 cleanup tests 2024-02-21 20:26:29 +01:00
Jakub Konka
4cde47a169 elf: simplify logic for resolving alloc relocs on different arches 2024-02-21 20:11:32 +01:00
Igor Anić
d995029844 add BufferedTee
BufferedTee provides reader interface to the consumer. Data read by consumer
is also written to the output. Output is hold lookahead_size bytes behind
consumer. Allowing consumer to put back some bytes to be read again. On flush
all consumed bytes are flushed to the output.

      input   ->   tee   ->   consumer
                    |
                 output

input - underlying unbuffered reader
output - writer, receives data read by consumer
consumer - uses provided reader interface

If lookahead_size is zero output always has same bytes as consumer.
2024-02-21 20:01:45 +01:00
Jacob Young
0b7af25637 MachO: fix calcLoadCommandsSize computation
Closes #19026
2024-02-21 19:56:55 +01:00
Jacob Young
48bd0ed7f3 llvm: fix builds that don't link with libllvm 2024-02-21 19:18:34 +01:00
Jakub Konka
60bc2e7616 elf: simplify logic for handling scanning relocs on different arches 2024-02-21 19:06:10 +01:00
Jakub Konka
1ca004176f elf+riscv: resolve synthetic __global_pointer$ symbol 2024-02-21 18:09:23 +01:00
antlilja
713a555aa1 LLVM: Remove unused from llvm/bindings.zig and zig_llvm.h/.cpp 2024-02-21 17:54:00 +01:00
antlilja
f6d275b14e LLVM: Remove use of LLVM in Builder 2024-02-21 17:53:15 +01:00
antlilja
626c3f7959 LLVM Builder: Emit debug info and metadata 2024-02-21 16:24:59 +01:00
antlilja
d35080b792 LLVM: Add Metadata/Debug bitcode IR 2024-02-21 16:24:59 +01:00
antlilja
c11c7a28a3 codegen/llvm: Remove use of DIBuilder and output bin by parsing bitcode 2024-02-21 16:24:59 +01:00
antlilja
c16818d623 Add LLVM bindings for parsing LLVM bitcode 2024-02-21 16:24:59 +01:00
antlilja
d3055480ec LLVM: Emit bitcode even if libllvm is not present 2024-02-21 16:24:59 +01:00
antlilja
049cad4411 LLVM Builder: Add debug locations to instructions 2024-02-21 16:24:59 +01:00
antlilja
a456631e29 LLVM Builder: Add debug/metadata system 2024-02-21 16:24:59 +01:00
antlilja
b4369dfbda LLVM: Add toBitcode to Builder 2024-02-21 16:24:59 +01:00
antlilja
5bd2a7c4d6 LLVM IR specific bitcode 2024-02-21 16:24:59 +01:00
antlilja
2396806165 Add LLVM bitcode writer 2024-02-21 16:24:59 +01:00
antlilja
4653fc4bb4 LLVM Builder: Add dbg.declare and dbg.value intrinsics 2024-02-21 16:24:59 +01:00