Skip to content

Commit

Permalink
make builds cross compile to correct target if using the llvm triple …
Browse files Browse the repository at this point in the history
…(--target) x86_64-apple-darwin16.1.0 which my sierra box with llvm 3.9 advertises
  • Loading branch information
rdp authored and asterite committed Dec 12, 2016
1 parent 5818369 commit c5e1388
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/compiler/crystal/crystal_path.cr
Expand Up @@ -21,7 +21,7 @@ module Crystal
triple[0] = "i686"
end

target = if triple.any?(&.includes?("macosx"))
target = if triple.any?(&.includes?("macosx")) || triple.any?(&.includes?("darwin"))
{triple[0], "macosx", "darwin"}.join('-')
elsif triple.any?(&.includes?("freebsd"))
{triple[0], triple[1], "freebsd"}.join('-')
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/crystal/semantic/flags.cr
Expand Up @@ -23,7 +23,7 @@ class Crystal::Program

private def parse_flags(flags_name)
set = flags_name.map(&.downcase).to_set
set.add "darwin" if set.any?(&.starts_with?("macosx"))
set.add "darwin" if set.any?(&.starts_with?("macosx")) || set.any?(&.starts_with?("darwin"))
set.add "freebsd" if set.any?(&.starts_with?("freebsd"))
set.add "openbsd" if set.any?(&.starts_with?("openbsd"))
set.add "x86_64" if set.any?(&.starts_with?("amd64"))
Expand Down

0 comments on commit c5e1388

Please sign in to comment.