Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: stop running hl when compiling to hlc on arm64 #11783

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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