mirror of
https://github.com/ziglang/zig.git
synced 2024-11-27 07:32:44 +00:00
parseh: ZIG_PARSEH_CFLAGS -> ZIG_NATIVE_PARSEH_CFLAGS
This commit is contained in:
parent
fb8700de6c
commit
87922bfae0
@ -1540,21 +1540,23 @@ int parse_h_file(ImportTableEntry *import, ZigList<ErrorMsg *> *errors, const ch
|
|||||||
clang_argv.append("-x");
|
clang_argv.append("-x");
|
||||||
clang_argv.append("c");
|
clang_argv.append("c");
|
||||||
|
|
||||||
char *ZIG_PARSEH_CFLAGS = getenv("ZIG_PARSEH_CFLAGS");
|
if (c->codegen->is_native_target) {
|
||||||
if (ZIG_PARSEH_CFLAGS) {
|
char *ZIG_PARSEH_CFLAGS = getenv("ZIG_NATIVE_PARSEH_CFLAGS");
|
||||||
Buf tmp_buf = BUF_INIT;
|
if (ZIG_PARSEH_CFLAGS) {
|
||||||
char *start = ZIG_PARSEH_CFLAGS;
|
Buf tmp_buf = BUF_INIT;
|
||||||
char *space = strstr(start, " ");
|
char *start = ZIG_PARSEH_CFLAGS;
|
||||||
while (space) {
|
char *space = strstr(start, " ");
|
||||||
if (space - start > 0) {
|
while (space) {
|
||||||
buf_init_from_mem(&tmp_buf, start, space - start);
|
if (space - start > 0) {
|
||||||
clang_argv.append(buf_ptr(buf_create_from_buf(&tmp_buf)));
|
buf_init_from_mem(&tmp_buf, start, space - start);
|
||||||
|
clang_argv.append(buf_ptr(buf_create_from_buf(&tmp_buf)));
|
||||||
|
}
|
||||||
|
start = space + 1;
|
||||||
|
space = strstr(start, " ");
|
||||||
}
|
}
|
||||||
start = space + 1;
|
buf_init_from_str(&tmp_buf, start);
|
||||||
space = strstr(start, " ");
|
clang_argv.append(buf_ptr(buf_create_from_buf(&tmp_buf)));
|
||||||
}
|
}
|
||||||
buf_init_from_str(&tmp_buf, start);
|
|
||||||
clang_argv.append(buf_ptr(buf_create_from_buf(&tmp_buf)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
clang_argv.append("-isystem");
|
clang_argv.append("-isystem");
|
||||||
|
Loading…
Reference in New Issue
Block a user