Skip to content

Commit

Permalink
fix Stop running hl when compiling to hlc on arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
TheArktect committed Oct 4, 2024
1 parent 1ce738c commit 1d60e85
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/context/common.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1d60e85

Please sign in to comment.