support building static libraries

closes #1493
closes #54
This commit is contained in:
Andrew Kelley
2018-10-08 13:24:39 -04:00
parent d40c4e7c89
commit 5a3c02137e
7 changed files with 71 additions and 25 deletions

View File

@@ -7487,7 +7487,9 @@ static void gen_root_source(CodeGen *g) {
{
g->bootstrap_import = add_special_code(g, create_bootstrap_pkg(g, g->root_package), "bootstrap.zig");
}
if (g->zig_target.os == OsWindows && !g->have_dllmain_crt_startup && g->out_type == OutTypeLib) {
if (g->zig_target.os == OsWindows && !g->have_dllmain_crt_startup &&
g->out_type == OutTypeLib && !g->is_static)
{
g->bootstrap_import = add_special_code(g, create_bootstrap_pkg(g, g->root_package), "bootstrap_lib.zig");
}