I tried (from a Mac M1):
crystal build --target x86_64-apple-darwin src/hello.cr
The result is:
Error: execution of command failed with code: 1: `cc "${@}" -o /Users/sergehulne/Documents/code/Crystal/0_hello/hello/hello -rdynamic -L/opt/homebrew/Cellar/crystal/1.7.2/libexec/../../../../lib -lgc -L/opt/homebrew/Cellar/libevent/2.1.12/lib -levent -liconv`
Where hello.cr is :
i = 0
while true
sleep(0.1)
p "next step : #{i+=1}"
end