aboutsummaryrefslogtreecommitdiff
path: root/src/parseh.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2016-01-27 19:22:58 -0700
committerAndrew Kelley <superjoe30@gmail.com>2016-01-27 19:22:58 -0700
commitc281533638dd08bb84f4f538fd8c5ae85791d034 (patch)
tree94ed711ef254a4b35d729dd944c1da2d0f833e63 /src/parseh.cpp
parent69d4f55fbf816bf417dfab9c0e7525971922f166 (diff)
downloadzig-c281533638dd08bb84f4f538fd8c5ae85791d034.tar.gz
zig-c281533638dd08bb84f4f538fd8c5ae85791d034.zip
build command supports -isystem argument
Diffstat (limited to 'src/parseh.cpp')
-rw-r--r--src/parseh.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/parseh.cpp b/src/parseh.cpp
index 73f7faa041..3721c83e79 100644
--- a/src/parseh.cpp
+++ b/src/parseh.cpp
@@ -345,7 +345,7 @@ static bool decl_visitor(void *context, const Decl *decl) {
return true;
}
-int parse_h_buf(ParseH *parse_h, Buf *source, const char *libc_include_path) {
+int parse_h_buf(ParseH *parse_h, Buf *source, const char **args, int args_len, const char *libc_include_path) {
int err;
Buf tmp_file_path = BUF_INIT;
if ((err = os_buf_to_tmp_file(source, buf_create_from_str(".h"), &tmp_file_path))) {
@@ -357,6 +357,10 @@ int parse_h_buf(ParseH *parse_h, Buf *source, const char *libc_include_path) {
clang_argv.append("-isystem");
clang_argv.append(libc_include_path);
+ for (int i = 0; i < args_len; i += 1) {
+ clang_argv.append(args[i]);
+ }
+
err = parse_h_file(parse_h, &clang_argv);
os_delete_file(&tmp_file_path);