remove --override-std-dir. fix issues caused by moving std lib

This commit is contained in:
Andrew Kelley
2019-09-25 23:57:47 -04:00
parent ed36dbbd9c
commit dc7016344e
8 changed files with 15 additions and 54 deletions

View File

@@ -10367,8 +10367,7 @@ CodeGen *create_child_codegen(CodeGen *parent_gen, Buf *root_src_path, OutType o
ZigLibCInstallation *libc)
{
CodeGen *child_gen = codegen_create(nullptr, root_src_path, parent_gen->zig_target, out_type,
parent_gen->build_mode, parent_gen->zig_lib_dir, parent_gen->zig_std_dir, libc, get_stage1_cache_path(),
false);
parent_gen->build_mode, parent_gen->zig_lib_dir, libc, get_stage1_cache_path(), false);
child_gen->disable_gen_h = true;
child_gen->want_stack_check = WantStackCheckDisabled;
child_gen->verbose_tokenize = parent_gen->verbose_tokenize;
@@ -10396,7 +10395,7 @@ CodeGen *create_child_codegen(CodeGen *parent_gen, Buf *root_src_path, OutType o
}
CodeGen *codegen_create(Buf *main_pkg_path, Buf *root_src_path, const ZigTarget *target,
OutType out_type, BuildMode build_mode, Buf *override_lib_dir, Buf *override_std_dir,
OutType out_type, BuildMode build_mode, Buf *override_lib_dir,
ZigLibCInstallation *libc, Buf *cache_dir, bool is_test_build)
{
CodeGen *g = allocate<CodeGen>(1);
@@ -10414,12 +10413,8 @@ CodeGen *codegen_create(Buf *main_pkg_path, Buf *root_src_path, const ZigTarget
g->zig_lib_dir = override_lib_dir;
}
if (override_std_dir == nullptr) {
g->zig_std_dir = buf_alloc();
os_path_join(g->zig_lib_dir, buf_create_from_str("std"), g->zig_std_dir);
} else {
g->zig_std_dir = override_std_dir;
}
g->zig_std_dir = buf_alloc();
os_path_join(g->zig_lib_dir, buf_create_from_str("std"), g->zig_std_dir);
g->zig_c_headers_dir = buf_alloc();
os_path_join(g->zig_lib_dir, buf_create_from_str("include"), g->zig_c_headers_dir);