aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2022-04-28 18:12:55 +0200
committerJeroen van Rijn <Kelimion@users.noreply.github.com>2022-04-28 18:12:55 +0200
commit1ed84a064bd0d64ba4deba56d5a2704350866d1f (patch)
treeb4e749a4702b3b6d26eaf9c936efded42b192fd0 /src/main.cpp
parent79019c7a09fb2f5b795d32f76c0aaef26b308a8c (diff)
Make -error-pos-style case-insensitive.
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;