aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJimmi Holst Christensen <jimmiholstchristensen@gmail.com>2018-03-29 00:53:06 +0200
committerJimmi Holst Christensen <jimmiholstchristensen@gmail.com>2018-03-29 00:53:06 +0200
commit72ce1462938c5821936e7b98f95c70c572fda47f (patch)
treebbba0504a59bfd1ee0490c30bd5dc47f9089aca3 /src
parent5b00dee0c27ae5a8547d6a4063331302cdc7b0be (diff)
downloadzig-72ce1462938c5821936e7b98f95c70c572fda47f.tar.gz
zig-72ce1462938c5821936e7b98f95c70c572fda47f.zip
Fixed looking for windows sdk when targeting linux
Diffstat (limited to 'src')
-rw-r--r--src/analyze.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp
index 7ee1de78a2..2128339726 100644
--- a/src/analyze.cpp
+++ b/src/analyze.cpp
@@ -4287,17 +4287,15 @@ static ZigWindowsSDK *get_windows_sdk(CodeGen *g) {
void find_libc_include_path(CodeGen *g) {
if (!g->libc_include_dir || buf_len(g->libc_include_dir) == 0) {
- ZigWindowsSDK *sdk = get_windows_sdk(g);
if (g->zig_target.os == OsWindows) {
+ ZigWindowsSDK *sdk = get_windows_sdk(g);
if (os_get_win32_ucrt_include_path(sdk, g->libc_include_dir)) {
zig_panic("Unable to determine libc include path.");
}
}
- }
- // TODO find libc at runtime for other operating systems
- if(!g->libc_include_dir || buf_len(g->libc_include_dir) == 0) {
+ // TODO find libc at runtime for other operating systems
zig_panic("Unable to determine libc include path.");
}
}