ability to cross compile

hello_libc.zig can produce a windows build
This commit is contained in:
Andrew Kelley
2016-02-11 01:33:27 -07:00
parent 54a8b6a110
commit 2bf6c28bc3
14 changed files with 893 additions and 309 deletions

View File

@@ -1540,6 +1540,11 @@ int parse_h_file(ImportTableEntry *import, ZigList<ErrorMsg *> *errors, const ch
clang_argv.append("-Xclang");
clang_argv.append("-detailed-preprocessing-record");
if (!c->codegen->is_native_target) {
clang_argv.append("-target");
clang_argv.append(buf_ptr(&c->codegen->triple_str));
}
clang_argv.append(target_file);
// to make the [start...end] argument work