From c281533638dd08bb84f4f538fd8c5ae85791d034 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 27 Jan 2016 19:22:58 -0700 Subject: build command supports -isystem argument --- src/parseh.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/parseh.cpp') 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); -- cgit v1.2.3