I’ve just noticed a very strange behavior in the zig env
command and wanted to ask if this is expected:
When running Zig (both the 0.14.1 release and latest master branch) with a path set in the ZIG_LIB_DIR
environment variable, aforementioned path is shown in the env
field of zig env
command, but not reflected in the lib_dir
/std_dir
fields.
{
"zig_exe": "/home/***/.local/bin/zig-0.14.1",
"lib_dir": ".local/lib/zig",
"std_dir": ".local/lib/zig/std",
"global_cache_dir": "/home/***/.cache/zig-0.14.1",
"version": "0.14.1",
"target": "x86_64-linux.4.19...6.13.4-gnu.2.41",
"env": {
"ZIG_GLOBAL_CACHE_DIR": "/home/***/.cache/zig-0.14.1",
"ZIG_LOCAL_CACHE_DIR": null,
"ZIG_LIB_DIR": "/home/***/.local/lib/zig-0.14.1",
"ZIG_LIBC": null,
"ZIG_BUILD_RUNNER": null,
"ZIG_VERBOSE_LINK": null,
"ZIG_VERBOSE_CC": null,
"ZIG_BTRFS_WORKAROUND": null,
"ZIG_DEBUG_CMD": null,
"CC": null,
"NO_COLOR": null,
"CLICOLOR_FORCE": null,
"XDG_CACHE_HOME": null,
"HOME": "/home/***"
}
}
Interesting to note is that in the above output, you can see the ZIG_GLOBAL_CACHE_DIR
environment variable is being properly reflected in the global_cache_dir
field.
Does this output mean that the ZIG_LIB_DIR
is not being properly applied to compiler invocations? Have I misinterpreted the lib_dir
/std_dir
fields?