| ... | @@ -1540,21 +1540,23 @@ int parse_h_file(ImportTableEntry *import, ZigList<ErrorMsg *> *errors, const ch | ... | @@ -1540,21 +1540,23 @@ int parse_h_file(ImportTableEntry *import, ZigList<ErrorMsg *> *errors, const ch |
| 1540 | clang_argv.append("-x"); | 1540 | clang_argv.append("-x"); |
| 1541 | clang_argv.append("c"); | 1541 | clang_argv.append("c"); |
| 1542 | | 1542 | |
| 1543 | char *ZIG_PARSEH_CFLAGS = getenv("ZIG_PARSEH_CFLAGS"); | 1543 | if (c->codegen->is_native_target) { |
| 1544 | if (ZIG_PARSEH_CFLAGS) { | 1544 | char *ZIG_PARSEH_CFLAGS = getenv("ZIG_NATIVE_PARSEH_CFLAGS"); |
| 1545 | Buf tmp_buf = BUF_INIT; | 1545 | if (ZIG_PARSEH_CFLAGS) { |
| 1546 | char *start = ZIG_PARSEH_CFLAGS; | 1546 | Buf tmp_buf = BUF_INIT; |
| 1547 | char *space = strstr(start, " "); | 1547 | char *start = ZIG_PARSEH_CFLAGS; |
| 1548 | while (space) { | 1548 | char *space = strstr(start, " "); |
| 1549 | if (space - start > 0) { | 1549 | while (space) { |
| 1550 | buf_init_from_mem(&tmp_buf, start, space - start); | 1550 | if (space - start > 0) { |
| 1551 | clang_argv.append(buf_ptr(buf_create_from_buf(&tmp_buf))); | 1551 | buf_init_from_mem(&tmp_buf, start, space - start); |
| | 1552 | clang_argv.append(buf_ptr(buf_create_from_buf(&tmp_buf))); |
| | 1553 | } |
| | 1554 | start = space + 1; |
| | 1555 | space = strstr(start, " "); |
| 1552 | } | 1556 | } |
| 1553 | start = space + 1; | 1557 | buf_init_from_str(&tmp_buf, start); |
| 1554 | space = strstr(start, " "); | 1558 | clang_argv.append(buf_ptr(buf_create_from_buf(&tmp_buf))); |
| 1555 | } | 1559 | } |
| 1556 | buf_init_from_str(&tmp_buf, start); | | |
| 1557 | clang_argv.append(buf_ptr(buf_create_from_buf(&tmp_buf))); | | |
| 1558 | } | 1560 | } |
| 1559 | | 1561 | |
| 1560 | clang_argv.append("-isystem"); | 1562 | clang_argv.append("-isystem"); |