mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-04 20:17:48 +00:00
Make -threaded-checker the default not (opt out with -no-threaded-checker)
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
16
src/main.cpp
16
src/main.cpp
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user