From 1d60e85691a64154f2ac3df9437885b0691fc60a Mon Sep 17 00:00:00 2001 From: TheArktect Date: Sat, 28 Sep 2024 21:36:23 -0300 Subject: [PATCH] fix Stop running hl when compiling to hlc on arm64 --- src/context/common.ml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/context/common.ml b/src/context/common.ml index b0662d700b2..8cd51a3b3c0 100644 --- a/src/context/common.ml +++ b/src/context/common.ml @@ -963,7 +963,15 @@ let init_platform com = | Jvm -> raw_define com "java" | Hl -> - if Path.file_extension com.file = "c" then define com Define.Hlc; + if Path.file_extension com.file = "c" then begin + define com Define.Hlc; + (* Hashlink isn't built for arm64, no point in running it. *) + let ic, pid = Process_helper.open_process_args_in_pid "uname" [| "uname"; "-m" |] in + let arch = input_line ic in + if arch <> "arm64" || arch <> "aarch64" then + define com Define.NoCompilation; + Stdlib.ignore (Process_helper.close_process_in_pid (ic, pid)); + end; | _ -> () end;