* better libc detection
This introduces a new command `zig libc` which prints
the various paths of libc files. It outputs them to stdout
in a simple text file format that it is capable of parsing.
You can use `zig libc libc.txt` to validate a file.
These arguments are gone:
--libc-lib-dir [path] directory where libc crt1.o resides
--libc-static-lib-dir [path] directory where libc crtbegin.o resides
--msvc-lib-dir [path] (windows) directory where vcruntime.lib resides
--kernel32-lib-dir [path] (windows) directory where kernel32.lib resides
Instead we have this argument:
--libc [file] Provide a file which specifies libc paths
This is used to pass a libc text file (which can be generated with
`zig libc`). So it is easier to manage multiple cross compilation
environments.
`--cache on` now works when linking against libc.
`ZigTarget` now has a bool field `is_native`
Better error messaging when you try to link against libc or use
`@cImport` but the various paths cannot be found. It should also be
faster.
* save native_libc.txt in zig-cache
This avoids having to detect libc at runtime on every invocation.
with this change, when you assign undefined, zig emits a few
assembly instructions to tell valgrind that the memory is undefined
it's on by default for debug builds, and disabled otherwise. only
support for linux, darwin, solaris, mingw on x86_64 is currently
implemented.
--disable-valgrind turns it off even in debug mode.
--enable-valgrind turns it on even in release modes.
It's always disabled for compiler_rt.a and builtin.a.
Adds `@import("builtin").valgrind_support` which lets code know
at comptime whether valgrind client requests are enabled.
See #1989