fix translate-c

This commit is contained in:
Andrew Kelley 2019-03-05 16:12:19 -05:00
parent 55a0016221
commit e06da10838
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9

View File

@ -4814,10 +4814,11 @@ Error parse_h_file(ZigType *import, ZigList<ErrorMsg *> *errors, const char *tar
clang_argv.append("-isystem");
clang_argv.append(buf_ptr(codegen->zig_c_headers_dir));
if (codegen->libc != nullptr) {
if (codegen->libc_include_dir != nullptr) {
clang_argv.append("-isystem");
clang_argv.append(buf_ptr(&codegen->libc->include_dir));
clang_argv.append(buf_ptr(codegen->libc_include_dir));
}
if (codegen->libc != nullptr) {
if (!buf_eql_buf(&codegen->libc->include_dir, &codegen->libc->sys_include_dir)) {
clang_argv.append("-isystem");
clang_argv.append(buf_ptr(&codegen->libc->sys_include_dir));