diff options
| author | Laytan Laats <laytanlaats@hotmail.com> | 2024-03-25 21:55:58 +0100 |
|---|---|---|
| committer | Laytan Laats <laytanlaats@hotmail.com> | 2024-03-25 22:11:20 +0100 |
| commit | b26a685b769c99128f96a4b00c578775daec5192 (patch) | |
| tree | 0ffdc37d958d4b7461c32213cbffd31216d20414 /src/build_settings.cpp | |
| parent | 3a8971c260e097db5eb1186048425f638db88846 (diff) | |
darwin: be less annoying about "incompatible" library versions
After #3316 we set a default minimum version, now this will warn if you
link with a library that is targeting later versions.
This might be a bit annoying, especially when the user hasn't actually
given Odin a minimum target.
So this PR makes these warnings only show when you explicitly give a
target version (afaik that is the only thing that -mmacosx-min-version
actually does for us because we don't use it to compile anything, just
to link).
Diffstat (limited to 'src/build_settings.cpp')
| -rw-r--r-- | src/build_settings.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/build_settings.cpp b/src/build_settings.cpp index 19006ab2c..3a9951cb2 100644 --- a/src/build_settings.cpp +++ b/src/build_settings.cpp @@ -436,7 +436,9 @@ struct BuildContext { BlockingMutex target_features_mutex; StringSet target_features_set; String target_features_string; + String minimum_os_version_string; + bool minimum_os_version_string_given; }; gb_global BuildContext build_context = {0}; @@ -1419,7 +1421,7 @@ gb_internal void init_build_context(TargetMetrics *cross_target, Subtarget subta bc->metrics = *metrics; if (metrics->os == TargetOs_darwin) { - if (bc->minimum_os_version_string.len == 0) { + if (!bc->minimum_os_version_string_given) { bc->minimum_os_version_string = str_lit("11.0.0"); } |