lama_byterun/byterun/dune
Kakadu 46f5e43cee Fixup
Signed-off-by: Kakadu <Kakadu@pm.me>
2025-02-28 00:17:43 +03:00

31 lines
537 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-lines:mac-specific-flags.txt}
-g
%{main}
%{runtime}
-o
%{target})))
(rule
(target mac-specific-flags.txt)
(enabled_if
(= %{system} "linux"))
(action
(write-file %{target} "")))
(rule
(target mac-specific-flags.txt)
(enabled_if
(= %{ocaml-config:system} macosx))
(action
(write-file %{target} "-arch\nx86_64\n-ld_classic")))