odin-lang / odin-lang.org

http://odin-lang.org
19 stars 80 forks source link

Update install instructions to include LLVM 18 as an acceptable version #220

Closed matthewelmer closed 1 day ago

matthewelmer commented 1 week ago

Based on the code found in build_odin.sh, it appears that LLVM 18 is supported:

if [ -z "$LLVM_CONFIG" ]; then
    # darwin, linux, openbsd
    if   [ -n "$(command -v llvm-config-18)" ]; then LLVM_CONFIG="llvm-config-18"
    elif [ -n "$(command -v llvm-config-17)" ]; then LLVM_CONFIG="llvm-config-17"
    elif [ -n "$(command -v llvm-config-14)" ]; then LLVM_CONFIG="llvm-config-14"
    elif [ -n "$(command -v llvm-config-13)" ]; then LLVM_CONFIG="llvm-config-13"
    elif [ -n "$(command -v llvm-config-12)" ]; then LLVM_CONFIG="llvm-config-12"
    elif [ -n "$(command -v llvm-config-11)" ]; then LLVM_CONFIG="llvm-config-11"
    # freebsd
    elif [ -n "$(command -v llvm-config18)" ]; then  LLVM_CONFIG="llvm-config18"
    elif [ -n "$(command -v llvm-config17)" ]; then  LLVM_CONFIG="llvm-config17"
    elif [ -n "$(command -v llvm-config14)" ]; then  LLVM_CONFIG="llvm-config14"
    elif [ -n "$(command -v llvm-config13)" ]; then  LLVM_CONFIG="llvm-config13"
    elif [ -n "$(command -v llvm-config12)" ]; then  LLVM_CONFIG="llvm-config12"
    elif [ -n "$(command -v llvm-config11)" ]; then  LLVM_CONFIG="llvm-config11"
    # fallback
    elif [ -n "$(command -v llvm-config)" ]; then LLVM_CONFIG="llvm-config"
    else
        error "No llvm-config command found. Set LLVM_CONFIG to proceed."
    fi
fi

This PR simply updates the website to reflect that.