mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-20 12:44:59 -07:00
Merge branch 'master' into separate-int-word-sizes
This commit is contained in:
@@ -264,6 +264,7 @@ struct BuildContext {
|
||||
String microarch;
|
||||
BuildModeKind build_mode;
|
||||
bool generate_docs;
|
||||
bool custom_optimization_level;
|
||||
i32 optimization_level;
|
||||
bool show_timings;
|
||||
TimingsExportFormat export_timings_format;
|
||||
@@ -1309,6 +1310,12 @@ gb_internal void init_build_context(TargetMetrics *cross_target) {
|
||||
gb_exit(1);
|
||||
}
|
||||
|
||||
if (bc->ODIN_DEBUG && !bc->custom_optimization_level) {
|
||||
// NOTE(bill): when building with `-debug` but not specifying an optimization level
|
||||
// default to `-o:none` to improve the debug symbol generation by default
|
||||
bc->optimization_level = -1; // -o:none
|
||||
}
|
||||
|
||||
bc->optimization_level = gb_clamp(bc->optimization_level, -1, 2);
|
||||
|
||||
// ENFORCE DYNAMIC MAP CALLS
|
||||
@@ -1322,9 +1329,6 @@ gb_internal void init_build_context(TargetMetrics *cross_target) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#undef LINK_FLAG_X64
|
||||
#undef LINK_FLAG_386
|
||||
}
|
||||
|
||||
#if defined(GB_SYSTEM_WINDOWS)
|
||||
|
||||
Reference in New Issue
Block a user