| ... | ... | @@ -8292,15 +8292,18 @@ void add_cc_args(CodeGen *g, ZigList<const char *> &args, const char *out_dep_pa |
| 8292 | 8292 | } |
| 8293 | 8293 | } |
| 8294 | 8294 | |
| 8295 | //note(dimenus): appending libc headers before c_headers breaks intrinsics |
| 8296 | //and other compiler specific items |
| 8297 | // According to Rich Felker libc headers are supposed to go before C language headers. |
| 8298 | args.append("-isystem"); |
| 8299 | args.append(buf_ptr(g->zig_c_headers_dir)); |
| 8300 | |
| 8295 | 8301 | for (size_t i = 0; i < g->libc_include_dir_len; i += 1) { |
| 8296 | 8302 | Buf *include_dir = g->libc_include_dir_list[i]; |
| 8297 | 8303 | args.append("-isystem"); |
| 8298 | 8304 | args.append(buf_ptr(include_dir)); |
| 8299 | 8305 | } |
| 8300 | 8306 | |
| 8301 | | // According to Rich Felker libc headers are supposed to go before C language headers. |
| 8302 | | args.append("-isystem"); |
| 8303 | | args.append(buf_ptr(g->zig_c_headers_dir)); |
| 8304 | 8307 | |
| 8305 | 8308 | if (g->zig_target->is_native) { |
| 8306 | 8309 | args.append("-march=native"); |