* Introduce `-Ddebug-extensions` for enabling compiler debug helpers
* Replace safety mode checks with `std.debug.runtime_safety`
* Replace debugger helper checks with `!builtin.strip_debug_info`
Sometimes, you just have to debug optimized compilers...
I moved part of the compiler that checks environment variables to the
standard library, so it doesn't have access to `build_options.only_c`
anymore, which means some environment variable checks are leaking into
the zig1.wasm build of zig. This logic still makes it return "no
environment variables found" though.
The build was previously failing with `error: unknown command: -print-file-name=libstdc++.a`
because the command invocation was
`zig -print-file-name=libstdc++.a`
instead of
`zig c++ -print-file-name=libstdc++.a`
note: .cxx_compiler_arg1 = "" instead of undefined to avoid breaking existing setups without requiring to run cmake again.
Notably, this contains bug fixes related to `@errorCast` which are
required by the changes to `std.io.Reader` in this branch, and the
compiler source code has a dependency on `std.io.Reader`.
Notable changes in this update:
127198e58c fixes building zig2 artifact on
macOS Sonoma 14.0 (more specifically the SDK 14.0 linker).
a8d2ed8065 fixed some alignment edge
cases which is needed to do the store_hash=false change in the compiler
source code.
df5f0517b3 preserves result type
information through the address-of operator.
Detect system libcxx name with the CMake build system and convey that
information to build.zig via config.h so that the same system libcxx is
used for stage3.
This undoes the hacky search 901457d173 .
closes#17018
Needed due to the breaking changes to `@splat` which are used by the
self-hosted compiler.
This update also includes the improvement that allows casting builtins
to infer the result type through optionals and error unions.
* `CMakeLists.txt`: support the weird `uname -m` output.
* `CMakeLists.txt`: detect and use the C compiler's default arm mode.
* cbe: support gcc with both `f128` and `u128` emulated.
* std.os.linux.thumb: fix incorrectly passed asm inputs.
Needed due to the breaking changes to casting builtins, which are used
by the compiler when building itself.
Note from Andrew: I re-ran update-zig1 on my PC and replaced this
commit.
Signed-off-by: Andrew Kelley <andrew@ziglang.org>
Note from Andrew: I re-ran update-zig1 on my pc and replaced this
commit.
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
Signed-off-by: Andrew Kelley <andrew@ziglang.org>
This is needed in order to remove math.{min,max} from std in favour of
the builtins, since the builtins need the behavior fix from the previous
commit.
Note from Andrew: I updated this commit with zig1.wasm built by me.
Signed-off-by: Andrew Kelley <andrew@ziglang.org>
Looks like I might have messed up the wasm kernel in my recent branch causing some sporadic failures on the CI.
This file was built the following way:
1. check out d0311e28b3
2. do the cmake bootstrap
3. check out 57ea6207d3
4. `zig build update-zig1` and stash those modified files
5. check out 440b3df702 (master)
6. do the cmake bootstrap
7. `zig build update-zig1` to produce this commit
This is needed because bug fixes to the C backend are required in order
to actually update the standard library and compiler sources to use the
new `@memcpy` and `@memset` semantics.
Needed due to the compiler depending on standard library APIs such as
ArrayList that contain `@memset` and `@memcpy` calls in them. The number
of parameters changed, so this is necessary for the compiler to build.
Multiple processes can sit waiting for the exclusive lock at the same
time, so we want to recheck whether it needs to be updated whenever
we get an exclusive lock.
This also fixes a race condition between one process truncating the
cache file and another process reading it without atomic locking.
This requires manual defines before C99 which may not have stdint.h.
Also have update-zig1 leave a copy of lib/zig.h in stage1/zig.h, which
allows lib/zig.h to be updated without needing to update zig1.wasm.
Note that since the object already existed with the exact same contents,
this completely avoids repo bloat due to zig.h changes.