Signed-off-by: Kakadu <Kakadu@pm.me>
This commit is contained in:
Kakadu 2025-02-28 00:17:43 +03:00
parent ba9c32f38a
commit 46f5e43cee

View file

@ -7,24 +7,25 @@
(mode (mode
(promote (until-clean))) (promote (until-clean)))
(action (action
(run gcc %{read:mac-specific-flags.txt} -g %{main} %{runtime} -o %{target}))) (run
gcc
%{read-lines:mac-specific-flags.txt}
-g
%{main}
%{runtime}
-o
%{target})))
(rule (rule
(target mac-specific-flags.txt) (target mac-specific-flags.txt)
(enabled_if (enabled_if
(= %{system} "linux")) (= %{system} "linux"))
(action (action
(progn (write-file %{target} "")))
(with-stdout-to
%{target}
(run printf "-g")))))
(rule (rule
(target mac-specific-flags.txt) (target mac-specific-flags.txt)
(enabled_if (enabled_if
(= %{ocaml-config:system} macosx)) (= %{ocaml-config:system} macosx))
(action (action
(progn (write-file %{target} "-arch\nx86_64\n-ld_classic")))
(with-stdout-to
%{target}
(run printf "-arch x86_64 -ld_classic")))))