Make -threaded-checker the default not (opt out with -no-threaded-checker)

This commit is contained in:
gingerBill
2023-01-11 17:27:06 +00:00
parent 9b47a5eddb
commit 6ec014e980
3 changed files with 3 additions and 17 deletions

View File

@@ -298,7 +298,7 @@ struct BuildContext {
bool linker_map_file;
bool use_separate_modules;
bool threaded_checker;
bool no_threaded_checker;
bool show_debug_messages;

View File

@@ -5339,7 +5339,7 @@ gb_internal void check_procedure_bodies(Checker *c) {
GB_ASSERT(c != nullptr);
u32 thread_count = cast(u32)global_thread_pool.threads.count;
if (!build_context.threaded_checker) {
if (build_context.no_threaded_checker) {
thread_count = 1;
}

View File

@@ -617,7 +617,6 @@ enum BuildFlagKind {
BuildFlag_NoEntryPoint,
BuildFlag_UseLLD,
BuildFlag_UseSeparateModules,
BuildFlag_ThreadedChecker,
BuildFlag_NoThreadedChecker,
BuildFlag_ShowDebugMessages,
BuildFlag_Vet,
@@ -793,7 +792,6 @@ gb_internal bool parse_build_flags(Array<String> args) {
add_flag(&build_flags, BuildFlag_NoEntryPoint, str_lit("no-entry-point"), BuildFlagParam_None, Command__does_check &~ Command_test);
add_flag(&build_flags, BuildFlag_UseLLD, str_lit("lld"), BuildFlagParam_None, Command__does_build);
add_flag(&build_flags, BuildFlag_UseSeparateModules, str_lit("use-separate-modules"), BuildFlagParam_None, Command__does_build);
add_flag(&build_flags, BuildFlag_ThreadedChecker, str_lit("threaded-checker"), BuildFlagParam_None, Command__does_check);
add_flag(&build_flags, BuildFlag_NoThreadedChecker, str_lit("no-threaded-checker"), BuildFlagParam_None, Command__does_check);
add_flag(&build_flags, BuildFlag_ShowDebugMessages, str_lit("show-debug-messages"), BuildFlagParam_None, Command_all);
add_flag(&build_flags, BuildFlag_Vet, str_lit("vet"), BuildFlagParam_None, Command__does_check);
@@ -1311,20 +1309,8 @@ gb_internal bool parse_build_flags(Array<String> args) {
case BuildFlag_UseSeparateModules:
build_context.use_separate_modules = true;
break;
case BuildFlag_ThreadedChecker: {
#if defined(DEFAULT_TO_THREADED_CHECKER)
gb_printf_err("-threaded-checker is the default on this platform\n");
bad_flags = true;
#endif
build_context.threaded_checker = true;
break;
}
case BuildFlag_NoThreadedChecker: {
#if !defined(DEFAULT_TO_THREADED_CHECKER)
gb_printf_err("-no-threaded-checker is the default on this platform\n");
bad_flags = true;
#endif
build_context.threaded_checker = false;
build_context.no_threaded_checker = true;
break;
}
case BuildFlag_ShowDebugMessages: