aboutsummaryrefslogtreecommitdiff
path: root/src/checker.cpp
diff options
context:
space:
mode:
authorLaytan Laats <laytanlaats@hotmail.com>2024-03-25 13:55:18 +0100
committerLaytan Laats <laytanlaats@hotmail.com>2024-03-25 14:07:49 +0100
commitb2a35683a40cacb15385c5647531862993aa38e9 (patch)
treee66a4dc76d912709b30cea341fa28b2ce92ca5cc /src/checker.cpp
parent09d7f1337bd8ddccc6b058c3f5752f6365beb31b (diff)
darwin: fix amd64 f16 emulation
Fixes #3222
Diffstat (limited to 'src/checker.cpp')
-rw-r--r--src/checker.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/checker.cpp b/src/checker.cpp
index 6456cab0c..ad5159d14 100644
--- a/src/checker.cpp
+++ b/src/checker.cpp
@@ -1115,7 +1115,16 @@ gb_internal void init_universal(void) {
add_global_constant("ODIN_COMPILE_TIMESTAMP", t_untyped_integer, exact_value_i64(odin_compile_timestamp()));
- add_global_bool_constant("__ODIN_LLVM_F16_SUPPORTED", lb_use_new_pass_system() && !is_arch_wasm());
+ {
+ bool f16_supported = lb_use_new_pass_system();
+ if (is_arch_wasm()) {
+ f16_supported = false;
+ } else if (build_context.metrics.os == TargetOs_darwin && build_context.metrics.arch == TargetArch_amd64) {
+ // NOTE(laytan): See #3222 for my ramblings on this.
+ f16_supported = false;
+ }
+ add_global_bool_constant("__ODIN_LLVM_F16_SUPPORTED", f16_supported);
+ }
{
GlobalEnumValue values[3] = {