diff --git a/stage0/intern_pool.h b/stage0/intern_pool.h index 8b9c41c269..bb564a208c 100644 --- a/stage0/intern_pool.h +++ b/stage0/intern_pool.h @@ -389,7 +389,7 @@ typedef struct { bool is_const; } Nav; -#define IP_MAX_NAVS 4096 +#define IP_MAX_NAVS 16384 // --- Function declarations --- diff --git a/stage0/zig0.c b/stage0/zig0.c index 344f6248f4..4fe140ea31 100644 --- a/stage0/zig0.c +++ b/stage0/zig0.c @@ -117,6 +117,7 @@ int zig0RunFile(const char* fname, bool verbose_air, bool verbose_intern_pool, // Derive module_root: walk up from source_dir to find the repo root. // For paths like .../lib/compiler_rt/neghf2.zig, module_root is the // directory containing "lib/". Heuristic: strip /lib/... suffix. + // Also handles relative paths like "lib/compiler_rt" (no leading /). char module_root[1024] = { 0 }; { const char* lib_pos = strstr(source_dir, "/lib/"); @@ -126,6 +127,11 @@ int zig0RunFile(const char* fname, bool verbose_air, bool verbose_intern_pool, len = sizeof(module_root) - 1; memcpy(module_root, source_dir, len); module_root[len] = '\0'; + } else if (strncmp(source_dir, "lib/", 4) == 0 + || strncmp(source_dir, "lib", 4) == 0) { + // Relative path starting with "lib/" — module_root is "." + module_root[0] = '.'; + module_root[1] = '\0'; } }