crystal-lang / crystal-book

Crystal reference with language specification, manuals and learning materials
https://crystal-lang.org/reference
Other
395 stars 248 forks source link

What is the correct target name for macOS? #760

Open zw963 opened 6 months ago

zw963 commented 6 months ago

More details, check discuss on https://github.com/luislavena/magic-haversack/pull/3#issuecomment-2082227117

document said x86_64-darwin, there is no -apple- in the middle for the macOS target

but, crystal compiler output different result on the macOS:

$ crystal version
Crystal 1.12.1 (2024-04-11)

LLVM: 18.1.4
Default target: aarch64-apple-darwin23.4.0

We need a consistent name to follow, although, i am not using macOS.

straight-shoota commented 6 months ago

AFAIU there is no single "correct" one. So this cannot be done.

Target triples are not very standardized and people use different combinations referring to the same platform. So different names such as x86_64-darwin, x86_64-apple-darwin, x86_64-apple-macos or x86_64-macosx-darwin all have the same meaning. Maybe some of them is preferrable over others, but all are correct and need to be supported.

zw963 commented 6 months ago

Thanks for reply.

But, why not just select one of them, both mention in the document and crystal version output?