diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-02-11 01:33:27 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-02-11 01:33:27 -0700 |
| commit | 2bf6c28bc3e535deb651d5b37e332226e0d38930 (patch) | |
| tree | bb206f61ac612f1c991a7c1c58176a163d51a74f /src/parseh.cpp | |
| parent | 54a8b6a110fa779a2fc12b901b96b6e072bca7cf (diff) | |
| download | zig-2bf6c28bc3e535deb651d5b37e332226e0d38930.tar.gz zig-2bf6c28bc3e535deb651d5b37e332226e0d38930.zip | |
ability to cross compile
hello_libc.zig can produce a windows build
Diffstat (limited to 'src/parseh.cpp')
| -rw-r--r-- | src/parseh.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/parseh.cpp b/src/parseh.cpp index ebe2c2f248..d77f155e30 100644 --- a/src/parseh.cpp +++ b/src/parseh.cpp @@ -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 |
