aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorSahnvour <Sahnvour@users.noreply.github.com>2018-09-30 22:59:45 +0200
committerAndrew Kelley <superjoe30@gmail.com>2018-09-30 16:59:45 -0400
commitba78ae0ae73ac38a2bb32c618cd145b4d2f9602e (patch)
tree0b2787ddc68361852859e2b1ca5cf7a51e04fe72 /src/main.cpp
parent418b2e7d47cbfdd8d04c362b758c96b533674282 (diff)
downloadzig-ba78ae0ae73ac38a2bb32c618cd145b4d2f9602e.tar.gz
zig-ba78ae0ae73ac38a2bb32c618cd145b4d2f9602e.zip
Fixes --emit asm on windows and makes C header file generation explicit. (#1612)
* build: only do codegen_link when emitting an actual binary. Fixes #1371 * build: only output C header file when explicitely asked to
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 5c1e107362..f9df802cb3 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -52,7 +52,7 @@ static int print_full_usage(const char *arg0) {
" --libc-include-dir [path] directory where libc stdlib.h resides\n"
" --name [name] override output name\n"
" --output [file] override destination path\n"
- " --output-h [file] override generated header file path\n"
+ " --output-h [file] generate header file\n"
" --pkg-begin [name] [path] make pkg available to import and push current pkg\n"
" --pkg-end pop current pkg\n"
" --release-fast build with optimizations on and safety off\n"
@@ -926,7 +926,7 @@ int main(int argc, char **argv) {
if (out_file)
codegen_set_output_path(g, buf_create_from_str(out_file));
- if (out_file_h)
+ if (out_file_h != nullptr && (out_type == OutTypeObj || out_type == OutTypeLib))
codegen_set_output_h_path(g, buf_create_from_str(out_file_h));