* Advance line and PC prior to ending sequence in debug line program
for a fn_decl. This is equivalent to closing scope in the debugger
and without it, the debugger will not map source-to-address info
as a result will not print the source when breaking at a symbol.
* Fix debug aranges sentinels to be of the size as the actual tuple
descriptor (assuming segment selector to be ommitted). In summary,
the sentinels were 32bit 0s, whereas they ought to be 64bit 0s.
* Make naming of symbols in the binary more consistent by prefixing
each symbol name with an underscore '_'.
Use .bold instead of .white, the effect is the same for light-on-dark
terminals but greatly improves the readability for dark-on-light ones.
Closes#8761
* std: fix overflow in math.scalbn32
* std: rewrite math.scalbn to be generic
* std: support f128 in math.isNormal
* std: enable f128 tests in math.scalbn
we only effectively need 1 control bit to represent 2 special states for
the metadata (free and tombstone)
this should reduce the number of actual element equality tests, but since
it's very low already, the impact is negligible
The `1 - shift` expression was computed using small unsigned types and
then casted to i32, producing either an underflow error or an incorrect
result.
Reported by `@notviri` in #8733
There is a lot left to be desired for this tool, as currently dependencies of extensions and dependencies
of capabilities on extensions are not included:
- There is no machine-readable definition of dependencies of extensions.
- A capability may depend on either of a multitude of extensions, which as of yet cannot be properly
modelled in the target system.
Originally, I thought that the dSYM bundle has to reside side-by-side
with the binary it carries the debugging information for. However, it
turns out macOS is clever enough that it auto-searches for matching
dSYM bundle based on the embedded UUID of the binary.
To verify this, run this on your macOS:
```
mdfind "com_apple_xcode_dsym_uuids == <UUID from LC_UUID>"
```
See [here] for more info.
[here]: https://developer.apple.com/documentation/xcode/adding-identifiable-symbol-names-to-a-crash-report
* `-lc++` now implies `-lc`.
* `-lunwind` is now pulled out into a separate `link_libunwind` flag in
the frontend driver code. This allows a project to request zig to
provide libunwind even if the default situation that causes it to be
implicitly added, is not active.
* build.zig: ask for -lunwind when building the self-hosted compiler on
Linux. Otherwise we get linker errors with unresolved symbols to
libunwind.
* for cross testing stage2 tests, we use `darling shell` command
since the path to the tested binary is relative to cwd
* for the `zig test` command, we simply use `darling` since the
path to the binary is absolute
With this change, it is now possible to use zig-bootstrap as the
initial C/C++ compiler, and then build stage2 with the resultant
stage1 without the need to link any system libs!
5ac91794cce8bd53916a378815be01e4365d53d9 made Zig link against the
system libc when targeting the native C ABI. However this made it stop
putting libunwind.a on the linker line when it needed to sometimes,
causing undefined symbols when linking against C++ code.
Without this, and with `-Denable-qemu -Denable-foreign-glibc`,
i386-linux-gnu tests failed because the `-L` path passed to qemu
was "i386-linux-gnu" (nonexistent) rather than "i686-linux-gnu".
Fixes std lib and behavior tests when using these options to enable
test coverage with cross compiled glibcs.
The CPU detection code is nearly at feature parity, we do support
detecting the native CPU on Sparc systems and macos, our ARM/AArch64
model list is quite comprehensive and so is our PPC one.
The only missing pieces are:
- ARM32 detection on Darwin hosts (I don't think anybody is planning on
running the compiler on a old-ass iPhone)
- s390x detection on Linux hosts, this can be easily added at a later
stage.