zig cc: detect optimization and debug flags

This commit is contained in:
Andrew Kelley
2020-03-21 22:30:46 -04:00
parent 4b0ddb817b
commit 2b65dc1032
7 changed files with 159 additions and 24 deletions

View File

@@ -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");