Skip to content


Fix: select generic ARM/AArch64 LibC (#4167)
Browse files Browse the repository at this point in the history
Fixes the target triple used by Crystal to select the LibC bindings
when the triple specifies a specific ARM architecture, e.g. `armv6`,
`armv7l` or `armv8.1-a`.

refs #3424 (comment)
  • Loading branch information
ysbaddaden committed Mar 23, 2017
1 parent 6697f17 commit 874eb8b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/compiler/crystal/
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@ module Crystal
triple = target_triple.split('-')
triple.delete(triple[1]) if triple.size == 4 # skip vendor

if %w(i386 i486 i586).includes?(triple[0])
case triple[0]
when "i386", "i486", "i586"
triple[0] = "i686"
when .starts_with?("armv8")
triple[0] = "aarch64"
when .starts_with?("arm")
triple[0] = "arm"

target = if triple.any?(&.includes?("macosx")) || triple.any?(&.includes?("darwin"))
Expand Down

0 comments on commit 874eb8b

Please sign in to comment.