authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-09-29 14:12:06-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-09-29 14:12:06-04:00
log339f62173594a06f9c47d9af078660fa63f42988
tree7135e4e48fa809474c203928b21e1d9c510266f0
parentc8e967f43dcf8e7cbf1efd45530d674ffd3fe6d8

detect the shared windows include dir as well


1 files changed, 7 insertions(+), 3 deletions(-)

src/codegen.cpp+7-3
......@@ -8921,8 +8921,8 @@ static void detect_libc(CodeGen *g) {
89218921 }
89228922 }
89238923 bool want_sys_dir = !buf_eql_buf(&g->libc->include_dir, &g->libc->sys_include_dir);
8924 bool want_um_dir = (g->zig_target->os == OsWindows);
8925 size_t dir_count = 1 + want_sys_dir + want_um_dir;
8924 size_t want_um_and_shared_dirs = (g->zig_target->os == OsWindows) ? 2 : 0;
8925 size_t dir_count = 1 + want_sys_dir + want_um_and_shared_dirs;
89268926 g->libc_include_dir_len = 0;
89278927 g->libc_include_dir_list = allocate<Buf*>(dir_count);
89288928
......@@ -8934,10 +8934,14 @@ static void detect_libc(CodeGen *g) {
89348934 g->libc_include_dir_len += 1;
89358935 }
89368936
8937 if (want_um_dir) {
8937 if (want_um_and_shared_dirs != 0) {
89388938 g->libc_include_dir_list[g->libc_include_dir_len] = buf_sprintf("%s" OS_SEP ".." OS_SEP "um",
89398939 buf_ptr(&g->libc->include_dir));
89408940 g->libc_include_dir_len += 1;
8941
8942 g->libc_include_dir_list[g->libc_include_dir_len] = buf_sprintf("%s" OS_SEP ".." OS_SEP "shared",
8943 buf_ptr(&g->libc->include_dir));
8944 g->libc_include_dir_len += 1;
89418945 }
89428946 assert(g->libc_include_dir_len == dir_count);
89438947 } else if ((g->out_type == OutTypeExe || (g->out_type == OutTypeLib && g->is_dynamic)) &&