From 525c2eaf5d49f537d4ccd48ab0c5bc1f52cc3204 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 25 Feb 2019 13:34:25 -0500 Subject: building DLLs on Windows works better --- src/codegen.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/codegen.cpp') diff --git a/src/codegen.cpp b/src/codegen.cpp index f14749bb28..3edff93be8 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -175,6 +175,10 @@ void codegen_set_output_h_path(CodeGen *g, Buf *h_path) { g->out_h_path = h_path; } +void codegen_set_output_lib_path(CodeGen *g, Buf *lib_path) { + g->out_lib_path = lib_path; +} + void codegen_set_output_path(CodeGen *g, Buf *path) { g->wanted_output_file_path = path; } @@ -8201,7 +8205,7 @@ static void gen_c_object(CodeGen *g, Buf *self_exe_path, CFile *c_file) { args.append("-c"); args.append(buf_ptr(c_source_file)); - if (!g->disable_pic) { + if (!g->disable_pic && target_supports_fpic(g->zig_target)) { args.append("-fPIC"); } -- cgit v1.2.3