diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-10-16 10:20:52 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-10-16 12:21:46 -0400 |
| commit | cbb6d2239f84ee13279655fc591530a23301d188 (patch) | |
| tree | c89c4ecb59a0a91521ff32b81755ac56fb9336d7 /src/codegen.cpp | |
| parent | 8cfb0cfbcee8161c52f71bccc3cf1b8d988f83b0 (diff) | |
| download | zig-cbb6d2239f84ee13279655fc591530a23301d188.tar.gz zig-cbb6d2239f84ee13279655fc591530a23301d188.zip | |
look for libc at runtime on windows
See #539
before we close the issue we should also detect MSVC 2017
but this gets us started with supporting MSVC 2015
Diffstat (limited to 'src/codegen.cpp')
| -rw-r--r-- | src/codegen.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp index 2ffb2c49c2..c8e339b8e3 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -117,6 +117,8 @@ CodeGen *codegen_create(Buf *root_src_path, const ZigTarget *target, OutType out g->libc_lib_dir = buf_create_from_str(""); g->libc_static_lib_dir = buf_create_from_str(""); g->libc_include_dir = buf_create_from_str(""); + g->msvc_lib_dir = nullptr; + g->kernel32_lib_dir = nullptr; g->each_lib_rpath = false; } else { // native compilation, we can rely on the configuration stuff @@ -127,6 +129,8 @@ CodeGen *codegen_create(Buf *root_src_path, const ZigTarget *target, OutType out g->libc_lib_dir = buf_create_from_str(ZIG_LIBC_LIB_DIR); g->libc_static_lib_dir = buf_create_from_str(ZIG_LIBC_STATIC_LIB_DIR); g->libc_include_dir = buf_create_from_str(ZIG_LIBC_INCLUDE_DIR); + g->msvc_lib_dir = nullptr; // find it at runtime + g->kernel32_lib_dir = nullptr; // find it at runtime #ifdef ZIG_EACH_LIB_RPATH g->each_lib_rpath = true; #endif @@ -228,6 +232,14 @@ void codegen_set_libc_include_dir(CodeGen *g, Buf *libc_include_dir) { g->libc_include_dir = libc_include_dir; } +void codegen_set_msvc_lib_dir(CodeGen *g, Buf *msvc_lib_dir) { + g->msvc_lib_dir = msvc_lib_dir; +} + +void codegen_set_kernel32_lib_dir(CodeGen *g, Buf *kernel32_lib_dir) { + g->kernel32_lib_dir = kernel32_lib_dir; +} + void codegen_set_dynamic_linker(CodeGen *g, Buf *dynamic_linker) { g->dynamic_linker = dynamic_linker; } |
