aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-10-10 18:04:02 -0400
committerAndrew Kelley <superjoe30@gmail.com>2017-10-10 18:04:02 -0400
commitaa78827db2931d5affa13c5612f821e1328ec5ac (patch)
tree1bc22cb2d0aaf51d2790e32cad5bde355d3df984 /src/codegen.cpp
parent1c28631738a7b65e23e5bffc582695faf016045f (diff)
downloadzig-aa78827db2931d5affa13c5612f821e1328ec5ac.tar.gz
zig-aa78827db2931d5affa13c5612f821e1328ec5ac.zip
add module flag to emit CodeView for COFF object files
see #516
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 5889ba316a..03fa976b2e 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -4992,7 +4992,11 @@ static void init(CodeGen *g) {
LLVMSetTarget(g->module, buf_ptr(&g->triple_str));
- ZigLLVMAddModuleDebugInfoFlag(g->module);
+ if (g->zig_target.oformat == ZigLLVM_COFF) {
+ ZigLLVMAddModuleCodeViewFlag(g->module);
+ } else {
+ ZigLLVMAddModuleDebugInfoFlag(g->module);
+ }
LLVMTargetRef target_ref;
char *err_msg = nullptr;