libc headers before C language headers, and disable libunwind on arm32

This commit is contained in:
Andrew Kelley
2019-07-16 21:38:18 -04:00
parent ec92739022
commit c0b4121ff2
4 changed files with 17 additions and 5 deletions

View File

@@ -8390,15 +8390,16 @@ void add_cc_args(CodeGen *g, ZigList<const char *> &args, const char *out_dep_pa
}
}
args.append("-isystem");
args.append(buf_ptr(g->zig_c_headers_dir));
for (size_t i = 0; i < g->libc_include_dir_len; i += 1) {
Buf *include_dir = g->libc_include_dir_list[i];
args.append("-isystem");
args.append(buf_ptr(include_dir));
}
// According to Rich Felker libc headers are supposed to go before C language headers.
args.append("-isystem");
args.append(buf_ptr(g->zig_c_headers_dir));
if (g->zig_target->is_native) {
args.append("-march=native");
} else {