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
Not sure what I was thinking. This is silly, translate-c package simply
needs to pass this data (link_libc and target) to the CLI application,
which can then do the appropriate behavior.
Currently, neither configurer nor Maker is aware of the standard zig
package path, and the root path is stored as a bare string rather than
relative to a known base directory. Without changing that, we must
construct a cwd relative path here rather than using knowledge of the
standard package path plus package hash.
Also fixes a bug that would have been prevented by implementing the
accepted proposal https://github.com/ziglang/zig/issues/25315
provides a way for the build system to append -target and -isystem/-I
flags to a Run step.
needed by translate-c package to avoid doing naughty stuff in the
configure phase.
It is generally best practice to avoid calling this function, instead
relying on the user to provide these paths via the standard build system
interface. However, when integrating with other build systems, the user
may have already provided the information to the other build system, and
thus it is desirable to use that same information without requiring the
user to provide it again.
options which are passed to configurer and therefore observable by the
build script are added to the cache hash. A sorted list is hashed since
they are unordered.
I had this idea to make b.dupe() also intern the strings since they will
be ultimately serialized to Configuration. Unfortunately the idea does
not work, because although a process-lived arena is used for the
string_bytes ArrayList of the Configuration.Wip, when the ArrayList is
resized, Allocator.free() memsets the freed memory to undefined, even
though it still technically lives due to being in a process-scoped
arena. So this commit will need to be partially reverted. However, I
kept it for posterity, and there are some more changes which I will now
note below.
- dupePaths: don't rewrite backslashes to forward slashes. backslashes
are valid in filenames on non-windows systems.
- always compile configurer in single-threaded mode
- use arena allocator for everything, no gpa for anything
- construct the Configuration.Wip instance earlier, so some stuff can be
prepopulated as desired.
- don't forget to flush