Add mac-specific flags to compile byterun on Darwin

Signed-off-by: Kakadu <Kakadu@pm.me>
This commit is contained in:
Kakadu 2025-02-27 23:35:42 +03:00
parent 57a4bafb9a
commit 259b52bb83

View file

@ -6,4 +6,24 @@
(mode (mode
(promote (until-clean))) (promote (until-clean)))
(action (action
(run gcc -g %{main} %{runtime} -o %{target}))) (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)
(enabled_if
(= %{system} "darwin"))
(action
(progn
(with-stdout-to
%{target}
(run printf "-arch x86_64 -ld_classic")))))