| author | |
| committer | |
| log | 9f01598a498ecbd868cb81dc1efdb1507010c1b8 |
| tree | 6915ea659078be32b9592dfa6f88d80a171fa244 |
| parent | f1e324216d934ee6be0d8a4ab579353e2fc73bad |
- move ZIG_GLOBAL_CACHE_DIR to `introspect`
- cleanup some dead fields from stage1 codegen3 files changed, 9 insertions(+), 5 deletions(-)
src/introspect.zig+8| ... | ... | @@ -61,6 +61,14 @@ pub fn findZigLibDirFromSelfExe( |
| 61 | 61 | |
| 62 | 62 | /// Caller owns returned memory. |
| 63 | 63 | pub fn resolveGlobalCacheDir(allocator: *mem.Allocator) ![]u8 { |
| 64 | if (std.process.getEnvVarOwned(allocator, "ZIG_GLOBAL_CACHE_DIR")) |value| { | |
| 65 | if (value.len > 0) { | |
| 66 | return value; | |
| 67 | } else { | |
| 68 | allocator.free(value); | |
| 69 | } | |
| 70 | } else |_| {} | |
| 71 | ||
| 64 | 72 | const appname = "zig"; |
| 65 | 73 | |
| 66 | 74 | if (std.Target.current.os.tag != .windows) { |
src/main.zig+1-1| ... | ... | @@ -557,7 +557,7 @@ fn buildOutputType( |
| 557 | 557 | var test_filter: ?[]const u8 = null; |
| 558 | 558 | var test_name_prefix: ?[]const u8 = null; |
| 559 | 559 | var override_local_cache_dir: ?[]const u8 = try optionalStringEnvVar(arena, "ZIG_LOCAL_CACHE_DIR"); |
| 560 | var override_global_cache_dir: ?[]const u8 = try optionalStringEnvVar(arena, "ZIG_GLOBAL_CACHE_DIR"); | |
| 560 | var override_global_cache_dir: ?[]const u8 = null; | |
| 561 | 561 | var override_lib_dir: ?[]const u8 = try optionalStringEnvVar(arena, "ZIG_LIB_DIR"); |
| 562 | 562 | var main_pkg_path: ?[]const u8 = null; |
| 563 | 563 | var clang_preprocessor_mode: Compilation.ClangPreprocessorMode = .no; |
src/stage1/all_types.hpp-4| ... | ... | @@ -2139,10 +2139,6 @@ struct CodeGen { |
| 2139 | 2139 | Buf llvm_ir_file_output_path; |
| 2140 | 2140 | Buf analysis_json_output_path; |
| 2141 | 2141 | Buf docs_output_path; |
| 2142 | Buf *cache_dir; | |
| 2143 | Buf *c_artifact_dir; | |
| 2144 | const char **libc_include_dir_list; | |
| 2145 | size_t libc_include_dir_len; | |
| 2146 | 2142 | |
| 2147 | 2143 | Buf *builtin_zig_path; |
| 2148 | 2144 | Buf *zig_std_special_dir; // Cannot be overridden; derived from zig_lib_dir. |