lama_byterun/byterun/dune
Kakadu 0aba2a2a01 Trying to detect mac right
Signed-off-by: Kakadu <Kakadu@pm.me>
2025-02-27 23:55:37 +03:00

29 lines
567 B
Text

(rule
(target byterun.exe)
(deps
(:main byterun.c)
(:runtime ../runtime/runtime.a)
mac-specific-flags.txt)
(mode
(promote (until-clean)))
(action
(run gcc %{read:mac-specific-flags.txt} -g %{main} %{runtime} -o %{target})))
(rule
(target mac-specific-flags.txt)
(enabled_if
(= %{system} "linux"))
(action
(progn
(with-stdout-to
%{target}
(run printf "-g")))))
(rule
(target mac-specific-flags.txt)
(= %{ocaml-config:system} macosx)
(action
(progn
(with-stdout-to
%{target}
(run printf "-arch x86_64 -ld_classic")))))