diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-01-16 13:01:36 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-01-16 13:01:36 -0500 |
| commit | fbe6af81fdb1b964bb0c28f51de2458800b8274c (patch) | |
| tree | 6d65a49b911ba665a7e2c28c6619d1aa6517a744 /src/libc_installation.cpp | |
| parent | 230d27c1cd00e7adf0ccfca2c8bb73ae1779aa4c (diff) | |
| parent | 7e5e767ba0fdde91dd66690168eff96b75c28e33 (diff) | |
| download | zig-fbe6af81fdb1b964bb0c28f51de2458800b8274c.tar.gz zig-fbe6af81fdb1b964bb0c28f51de2458800b8274c.zip | |
Merge remote-tracking branch 'origin/master' into llvm10
Diffstat (limited to 'src/libc_installation.cpp')
| -rw-r--r-- | src/libc_installation.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libc_installation.cpp b/src/libc_installation.cpp index 135941dc40..2adc1cb69d 100644 --- a/src/libc_installation.cpp +++ b/src/libc_installation.cpp @@ -320,7 +320,7 @@ Error zig_libc_cc_print_file_name(const char *o_file, Buf *out, bool want_dirnam #undef CC_EXE -#if defined(ZIG_OS_WINDOWS) || defined(ZIG_OS_LINUX) +#if defined(ZIG_OS_WINDOWS) || defined(ZIG_OS_LINUX) || defined(ZIG_OS_DRAGONFLY) static Error zig_libc_find_native_crt_dir_posix(ZigLibCInstallation *self, bool verbose) { return zig_libc_cc_print_file_name("crt1.o", &self->crt_dir, true, verbose); } @@ -389,7 +389,7 @@ static Error zig_libc_find_native_msvc_include_dir(ZigLibCInstallation *self, Zi } Buf search_path = BUF_INIT; buf_init_from_mem(&search_path, sdk->msvc_lib_dir_ptr, sdk->msvc_lib_dir_len); - buf_append_str(&search_path, "\\..\\..\\include"); + buf_append_str(&search_path, "..\\..\\include"); Buf *vcruntime_path = buf_sprintf("%s\\vcruntime.h", buf_ptr(&search_path)); bool exists; @@ -413,6 +413,7 @@ void zig_libc_render(ZigLibCInstallation *self, FILE *file) { "# The directory that contains `stdlib.h`.\n" "# On POSIX-like systems, include directories be found with: `cc -E -Wp,-v -xc /dev/null`\n" "include_dir=%s\n" + "\n" "# The system-specific include directory. May be the same as `include_dir`.\n" "# On Windows it's the directory that includes `vcruntime.h`.\n" "# On POSIX it's the directory that includes `sys/errno.h`.\n" @@ -435,8 +436,7 @@ void zig_libc_render(ZigLibCInstallation *self, FILE *file) { "# The directory that contains `kernel32.lib`.\n" "# Only needed when targeting MSVC on Windows.\n" "kernel32_lib_dir=%s\n" - "\n" - , + "\n", buf_ptr(&self->include_dir), buf_ptr(&self->sys_include_dir), buf_ptr(&self->crt_dir), @@ -489,7 +489,7 @@ Error zig_libc_find_native(ZigLibCInstallation *self, bool verbose) { return err; #if defined(ZIG_OS_FREEBSD) || defined(ZIG_OS_NETBSD) buf_init_from_str(&self->crt_dir, "/usr/lib"); -#elif defined(ZIG_OS_LINUX) +#elif defined(ZIG_OS_LINUX) || defined(ZIG_OS_DRAGONFLY) if ((err = zig_libc_find_native_crt_dir_posix(self, verbose))) return err; #endif |
