mlugg
b65865b027
tools: improve incr-check
...
And add a new incremental test to match!
2024-08-17 18:50:10 -04:00
mlugg
895267c916
frontend: incremental progress
...
This commit makes more progress towards incremental compilation, fixing
some crashes in the frontend. Notably, it fixes the regressions introduced
by #20964 . It also cleans up the "outdated file root" mechanism, by
virtue of deleting it: we now detect outdated file roots just after
updating ZIR refs, and re-scan their namespaces.
2024-08-17 18:50:10 -04:00
Jacob Young
2b05e85107
Merge pull request #21111 from jacobly0/self-dwarf
...
Dwarf: debug info progress
2024-08-17 18:47:27 -04:00
Forest
cf939b096a
cmake: CLANG_LIBRARIES: find libclang-cpp.so.18.1
...
This fixes the failure to find CLANG_LIBRARIES on debian, which packages
the relevant .so file at these paths:
libclang-cpp18: /usr/lib/llvm-18/lib/libclang-cpp.so.18.1
libclang-cpp18: /usr/lib/x86_64-linux-gnu/libclang-cpp.so.18.1
libclang-cpp18: /usr/lib/x86_64-linux-gnu/libclang-cpp.so.18
(The latter two paths are symlinks to the first.)
2024-08-17 13:15:32 -07:00
Jakub Konka
5d2bf96c02
Merge pull request #21098 from ziglang/macho-zig-got
...
macho: replace __got_zig with distributed jump table
2024-08-17 17:17:01 +02:00
Jacob Young
d4e3d0e676
Dwarf: fix and test error unions
2024-08-17 09:27:15 -04:00
Jacob Young
f601aa780e
Dwarf: fix and test allowzero pointers
2024-08-17 05:57:45 -04:00
Jakub Konka
df9ac485da
codegen: fix rebase gone wrong
2024-08-17 08:31:16 +02:00
Jakub Konka
96441bd829
macho: update codegen and linker to distributed jump table approach
2024-08-17 08:14:38 +02:00
Jacob Young
bb70501060
Merge pull request #21078 from jacobly0/new-dwarf
...
Dwarf: rework self-hosted debug info from scratch
2024-08-17 01:15:04 -04:00
Jacob Young
ed19ecd115
Coff: fix missing error lazy symbols
2024-08-16 16:23:53 -04:00
Jacob Young
e9df5ab7f1
std: disable failing debug info test for self-hosted
2024-08-16 16:23:53 -04:00
Jacob Young
0ecf0cf867
x86_64: fix debug arg spills clobbering other args
2024-08-16 15:22:56 -04:00
Jacob Young
00ca818805
Dwarf: incremental also needs end_sequence
...
The spec says that addresses can only increase within a sequence, so
every decl must be a separate sequence since they are not sorted.
2024-08-16 15:22:56 -04:00
Jacob Young
ad634537ce
x86_64: move end of prologue to after function arguments are spilled
...
This prevents the first step in to a function from displaying bogus
argument values.
2024-08-16 15:22:56 -04:00
Jacob Young
7a0acc8be6
Dwarf: fix cross-module inline function line info
2024-08-16 15:22:56 -04:00
Jacob Young
ef11bc9899
Dwarf: rework self-hosted debug info from scratch
...
This is in preparation for incremental and actually being able to debug
executables built by the x86_64 backend.
2024-08-16 15:22:55 -04:00
Jakub Konka
90989be0e3
Merge pull request #21065 from ziglang/elf-zig-got
...
elf: replace .got.zig with a zig jump table
2024-08-16 21:19:44 +02:00
David Rubin
f1eed99f3d
add an error for stack allocations in naked functions ( #21082 )
...
closes #72
2024-08-16 09:41:58 -07:00
Jakub Konka
73f385eec5
Update src/arch/x86_64/CodeGen.zig
...
Co-authored-by: Jacob Young <jacobly0@users.noreply.github.com>
2024-08-16 11:49:23 +02:00
Jacob Young
624016e8f3
riscv64: fix incorrect branch target
2024-08-16 05:44:55 -04:00
Andrew Kelley
11176d22f8
Merge pull request #21073 from alexrp/test-changes
...
`test`: QoL for port work, more mips re-enablement
2024-08-15 22:23:48 -07:00
Andrew Kelley
05c7968920
Merge pull request #21020 from alexrp/target-fixes
...
`std.Target`: Assorted corrections, plus cleanup around ELF/COFF machine types
2024-08-15 22:13:31 -07:00
Andrew Kelley
b917d778c6
Merge pull request #21056 from alexrp/start-fix-precedence
...
`start`: Avoid string concatenation in inline asm.
2024-08-15 22:10:59 -07:00
Igor Anić
72bcc3b7a5
std.tar: add writer ( #19603 )
...
Simplifies code in docs creation where we used `std.tar.output.Header`.
Writer uses that Header internally and provides higher level interface.
Updates checksum on write, handles long file names, allows setting mtime and file permission mode. Provides handy interface for passing `Dir.WalkerEntry`.
2024-08-15 22:05:53 -07:00
Linus Groh
708414aaf4
std.time.epoch: Fix comments referring to epoch as 1970-10-01
2024-08-15 17:54:27 -07:00
YANG Xudong
8e91c229e1
loongarch: fix asm to set thread pointer ( #21086 )
...
Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
2024-08-15 15:40:44 -07:00
Jakub Konka
9473d76449
test/elf: enhance testImportingDataDynamic
2024-08-15 21:47:34 +02:00
Jakub Konka
4d5bf0f09a
x86_64: deref GOT pointer when requesting var value
2024-08-15 14:23:36 +02:00
Alex Rønne Petersen
7a8e86e46c
llvm: Don't emit extra debug instructions for dbg_var_val
in naked functions.
2024-08-15 10:56:33 +02:00
Alex Rønne Petersen
acad2fae44
llvm: Remove the aarch64-windows @llvm.dbg.value() workaround.
...
https://github.com/llvm/llvm-project/issues/56484
2024-08-15 10:56:33 +02:00
Alex Rønne Petersen
2bf244c0e9
llvm: Always omit the frame pointer for naked functions.
2024-08-15 10:56:33 +02:00
Alex Rønne Petersen
ab9628dd2c
start: Avoid concatenating strings for inline asm.
...
For csky, we can just always do the gb initialization. For riscv, the gp code is
temporarily pulled above the main switch until the blocking issue is resolved.
2024-08-15 10:56:32 +02:00
Alex Rønne Petersen
6db9ad7798
std.Target: Return the correct value for 32-bit sparc v9 in toElfMachine().
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
9b5c992d31
std.Target: Return the correct value for elfiamcu in toElfMachine().
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
550438653d
std.Target: Pull toCoffMachine()/toElfMachine() up from Arch to Target.
...
This enables them to give more correct results.
Contributes to #20771 .
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
b01c595d4a
std.coff: Capitalize MachineType.{Unknown,Thumb} for consistency.
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
ac9ca7d30c
std.coff: Remove MachineType.fromTargetCpuArch().
...
This does the same thing as std.Target.Cpu.Arch.toCoffMachine(). Just use that.
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
65affb1c22
std.Target: Don't match PowerPC in Arch.toCoffMachine().
...
It's entirely unclear whether this should map to POWERPC or POWERPCFP, and as I
can find no evidence of people producing PE files for PowerPC since Windows NT,
let's just not make a likely-wrong guess. We can revisit this if the need ever
actually arises.
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
b24fc35eeb
std.Target: Don't match big endian architectures in Arch.toCoffMachine().
...
All of these were mapping to types that are little endian. In fact, I can find
no evidence that either Windows or UEFI have ever been used on big endian
systems.
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
8516a6ab57
std.Target: Clean up Arch.toCoffMachine().
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
490b328127
std.Target: Fix Arch.toElfMachine() for mips.
...
EM_MIPS_RS3_LE is obsolete; all mips targets just use EM_MIPS.
Also, fun fact: EM_MIPS_RS3_LE is actually big endian!
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
6c27cab5b3
std.Target: Fix Arch.toElfMachine() for arc.
...
The arc tag means ARCv2.
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
9246c88031
std.Target: Clean up Arch.toElfMachine().
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
1e67221f07
std.Target: Change requiresLibC() to return true for aix.
...
AIX does not have a stable syscall interface; libc is required.
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
fc93ab7182
std.Target: Fix isGnuLibC() to handle hurd too.
2024-08-15 10:55:45 +02:00
Alex Rønne Petersen
0def4e0db0
std.Target: Make some functions handle driverkit alongside other Apple OSs.
...
Reference for versions: https://developer.apple.com/support/xcode
2024-08-15 10:55:45 +02:00
Jakub Konka
79418fa0ab
riscv: remove redundant by-symbol-name check; just check for PIC and extern ptr
2024-08-15 10:52:06 +02:00
Jacob Young
5d080e25d5
start: fix passing comptime-only value to inline asm
...
Also fix fmt directive typo.
2024-08-15 04:42:04 -04:00
Jakub Konka
c79290467f
elf: fix GOT32 reloc resolution logic
2024-08-15 10:36:37 +02:00