aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-03-21 22:30:46 -0400
committerAndrew Kelley <andrew@ziglang.org>2020-03-21 22:30:46 -0400
commit2b65dc10328cc437b21114e3c87fac2ef6ef9adc (patch)
treee40cec4e13ea3f1605b47ff84e8bc956162dde6c /src/codegen.cpp
parent4b0ddb817bb5d4effd8cd2dd0844ac278e35e1d5 (diff)
downloadzig-2b65dc10328cc437b21114e3c87fac2ef6ef9adc.tar.gz
zig-2b65dc10328cc437b21114e3c87fac2ef6ef9adc.zip
zig cc: detect optimization and debug flags
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 7b481f7c21..a0fd984740 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -9269,6 +9269,7 @@ void add_cc_args(CodeGen *g, ZigList<const char *> &args, const char *out_dep_pa
case BuildModeDebug:
// windows c runtime requires -D_DEBUG if using debug libraries
args.append("-D_DEBUG");
+ args.append("-Og");
if (g->libc_link_lib != nullptr) {
args.append("-fstack-protector-strong");