The DWARF spec has CFI instructions that take signed offsets, but at least LLVM
always emits the unsigned variants, even for e.g. `.cfi_def_cfa_offset -4`.
Example output:
$ zig build-exe "-freference-trace=b\" 'ah"
error: unable to parse reference_trace count "b\" 'ah": InvalidCharacter
Before this change:
error: unable to parse reference_trace count 'b" 'ah': InvalidCharacter
Zig does not have single-quoted strings, plus it wasn't escaping the
single quotes anyway. Better to use actual double quote string syntax
than to fake a fake syntax.
Until #35473 is implemented we have to re-run configure logic in case of
these things:
* git commit changes
* test-cases on the file system changed
* test-incremental on the file system changed
Repeated calls to `addModule` with the same name will override the
module that is visible to dependants which is likely unintentional.
Instead it should assert that no existing module has already been added
with the given name.
The same issue applies to `addNamedWriteFiles` and `addNamedLazyPath`.
This makes all commands in the zig executable that support color
output respect the user's preference for color output based on the
NO_COLOR and CLICOLOR_FORCE environment variables. Setting color
preference via command line option still overrides preferences set via
environment variables.
Previously, if the same inline function was called multiple times
by the same caller, the inline function's frame would be repeated
multiple times, once for each prior call.
makes the build system compile on 32 bit systems
bonus, also fix incorrectly passing advanced debug options to the maker
process which doesn't care about them
On 32-bit systems usize is not u64 but it was assumed in multiple places
of the build script.
Sometimes using u64 instead of usize since available and used memory can
exceed usize on 32-bit systems (just like totalSystemMemory)
Example errors:
lib/compiler/build_runner.zig:508:26: error: expected type 'usize', found 'u64'
.available_rss = max_rss,
^~~~~~~
lib/compiler/build_runner.zig:508:26: note: unsigned 32-bit int cannot represent all possible unsigned 64-bit values
referenced by:
callMain [inlined]: lib/std/start.zig:699:88
callMainWithArgs [inlined]: lib/std/start.zig:638:20
posixCallMainAndExit: lib/std/start.zig:590:38
2 reference(s) hidden; use '-freference-trace=5' to see all references
lib/std/Build/WebServer.zig:849:38: error: expected type 'usize', found 'u64'
const buf = gpa.realloc(old_buf, new_len) catch @panic("out of memory");
^~~~~~~
lib/std/Build/WebServer.zig:849:38: note: unsigned 32-bit int cannot represent all possible unsigned 64-bit values
lib/std/mem/Allocator.zig:399:58: note: parameter type declared here
pub fn realloc(self: Allocator, old_mem: anytype, new_n: usize) Error!@TypeOf(old_mem) {
^~~~~
build.zig:548:10: error: type 'usize' cannot represent integer value '9300000000'
.max_rss = 9_300_000_000,
~^~~~~~~~~~~~~~~~~~~~~~~
build.zig:778:10: error: type 'usize' cannot represent integer value '8000000000'
.max_rss = 8_000_000_000,
~^~~~~~~~~~~~~~~~~~~~~~~
- choose smp_allocator depending on optimization mode
- organize the globals
- avoid pessimistically allocating failed command string
- recover the PkgConfig memory
- recover the memory from captureChildProcess
- make Step.result_stderr gpa-owned so it doesn't leak when a step that
fails with stderr is re-run
- recover memory from evalZigTest and evalGeneric child process stdio
streams