Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: crystal-lang/crystal
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 12ed6dfa6085
Choose a base ref
...
head repository: crystal-lang/crystal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 02fca17ef0de
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Sep 20, 2017

  1. Support LLVM 4.0 postfixed versions

    Debian-based distributions allow you to install multiple versions of LLVM
    in parallel, allowing you to access them individually using postfixed
    `llvm-config` versions (ie `llvm-config-3.8` or `llvm-config-3.9`).
    
    Ubuntu (Xenial) added packages for LLVM 4.0 with `-4.0` postfix (under
    `llvm-4.0` package).
    
    Crystal supports and uses 3.9 or 3.8, but no option for 4.0.
    
    This change makes sure LLVM 4.0 is also tried first.
    
    Before this change (with LLVM 4.0 installed):
    
        $ make crystal
        Using /usr/bin/llvm-config-3.8 [version=3.8.0]
        ...
    
        $ bin/crystal --version
        Using compiled compiler at `.build/crystal'
        Crystal 0.23.0+177 [12ed6df] (2017-09-20)
    
        LLVM: 3.8.0
        Default target: x86_64-pc-linux-gnu
    
    After this change (with LLVM 4.0 installed)
    
        $ make crystal
        Using /usr/bin/llvm-config-4.0 [version=4.0.0]
        ...
    
        $ bin/crystal --version
        Using compiled compiler at `.build/crystal'
        Crystal 0.23.0+177 [12ed6df] (2017-09-20)
    
        LLVM: 4.0.0
        Default target: x86_64-pc-linux-gnu
    luislavena committed Sep 20, 2017
    Copy the full SHA
    79fd84e View commit details

Commits on Sep 21, 2017

  1. Merge pull request #5013 from luislavena/support-llvm-config-4.0

    Support LLVM 4.0 postfixed versions
    asterite authored Sep 21, 2017
    Copy the full SHA
    02fca17 View commit details
Showing with 4 additions and 0 deletions.
  1. +2 −0 Makefile
  2. +2 −0 src/llvm/lib_llvm.cr
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -33,6 +33,8 @@ EXPORTS := $(if $(release),,CRYSTAL_CONFIG_PATH=`pwd`/src)
SHELL = bash
LLVM_CONFIG_FINDER := \
[ -n "$(LLVM_CONFIG)" ] && command -v "$(LLVM_CONFIG)" || \
command -v llvm-config-4.0 || command -v llvm-config40 || \
(command -v llvm-config > /dev/null && (case "$(llvm-config --version)" in 4.0*) command -v llvm-config;; *) false;; esac)) || \
command -v llvm-config-3.9 || command -v llvm-config39 || \
(command -v llvm-config > /dev/null && (case "$(llvm-config --version)" in 3.9*) command -v llvm-config;; *) false;; esac)) || \
command -v llvm-config-3.8 || command -v llvm-config38 || \
2 changes: 2 additions & 0 deletions src/llvm/lib_llvm.cr
Original file line number Diff line number Diff line change
@@ -2,6 +2,8 @@
lib LibLLVM
LLVM_CONFIG = {{
`[ -n "$LLVM_CONFIG" ] && command -v "$LLVM_CONFIG" || \
command -v llvm-config-4.0 || command -v llvm-config40 || \
(command -v llvm-config > /dev/null && (case "$(llvm-config --version)" in 4.0*) command -v llvm-config;; *) false;; esac)) || \
command -v llvm-config-3.9 || command -v llvm-config39 || \
(command -v llvm-config > /dev/null && (case "$(llvm-config --version)" in 3.9*) command -v llvm-config;; *) false;; esac)) || \
command -v llvm-config-3.8 || command -v llvm-config38 || \