aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index c9e908f11..ff7bb9f67 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1477,9 +1477,14 @@ bool parse_build_flags(Array<String> args) {
case BuildFlag_ErrorPosStyle:
GB_ASSERT(value.kind == ExactValue_String);
- build_context.ODIN_ERROR_POS_STYLE = ErrorPosStyle_Default;
- if (value.value_string == "unix" || value.value_string == "UNIX") {
+
+ if (str_eq_ignore_case(value.value_string, str_lit("odin"))) {
+ build_context.ODIN_ERROR_POS_STYLE = ErrorPosStyle_Default;
+ } else if (str_eq_ignore_case(value.value_string, str_lit("unix"))) {
build_context.ODIN_ERROR_POS_STYLE = ErrorPosStyle_Unix;
+ } else {
+ gb_printf_err("-error-pos-style options are 'unix' and 'odin'\n");
+ bad_flags = true;
}
break;