# ASDF Crystal and LLVM version

**URL:** <https://forum.crystal-lang.org/t/asdf-crystal-and-llvm-version/1923>\
**Category:** Help & Support\
**Created:** [April 9, 2020, 5:10pm UTC](https://forum.crystal-lang.org/t/asdf-crystal-and-llvm-version/1923 "2020-04-09T17:10:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jwoertink](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/jwoertink/32/50_2.png) [@jwoertink](https://forum.crystal-lang.org/u/jwoertink)\
**Post date:** [April 9, 2020, 5:10pm UTC](https://forum.crystal-lang.org/t/asdf-crystal-and-llvm-version/1923/1 "2020-04-09T17:10:56Z")

</div>

I use [asdf](https://github.com/asdf-community/asdf-crystal) to manage my crystal versions. When asdf installs, it looks like it just finds the latest tar and downloads the binary from that.

When I run `crystal -v`, I get this:

```auto
Crystal 0.34.0 (2020-04-06)

LLVM: 6.0.1
Default target: x86_64-apple-macosx

```

But my llvm is set to 10

```auto
[10:08AM] jeremywoertink$ llvm-config --version
10.0.0

```

Does crystal still use 10 if it sees it even though the version lists 6? Or does anyone know how to get that built version of crystal to be higher than 6?

---

<div class="post-metadata">

**Author:** ![bcardiff](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/bcardiff/32/3_2.png) [@bcardiff](https://forum.crystal-lang.org/u/bcardiff)\
**Post date:** [April 9, 2020, 6:25pm UTC](https://forum.crystal-lang.org/t/asdf-crystal-and-llvm-version/1923/2 "2020-04-09T18:25:33Z")

</div>

The osx packages in github are built and linked against llvm 6.

That compiler will not use llvm 10 as it is installed.

If you build the compiler from sources and have a newer llvm installed, using ./bin/crystal will use the new compiler.

In order to update the llvm used in the osx packages we need to upload a pre built package of llvm.

---

<div class="post-metadata">

**Author:** ![jwoertink](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/jwoertink/32/50_2.png) [@jwoertink](https://forum.crystal-lang.org/u/jwoertink)\
**Post date:** [April 9, 2020, 6:53pm UTC](https://forum.crystal-lang.org/t/asdf-crystal-and-llvm-version/1923/3 "2020-04-09T18:53:06Z")

</div>

Ah, I see. Ok, thanks!

I wanted to use brew, but every time I install from brew, it wipes out the previous version. I’ll see how hard it would be to just manage building from source.

---

<div class="post-metadata">

**Author:** ![bcardiff](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/bcardiff/32/3_2.png) [@bcardiff](https://forum.crystal-lang.org/u/bcardiff)\
**Post date:** [April 9, 2020, 9:07pm UTC](https://forum.crystal-lang.org/t/asdf-crystal-and-llvm-version/1923/4 "2020-04-09T21:07:53Z")

</div>

Were you looking for some specific benefit on using llvm 10?

The relevant code for the osx packages is in the omnibus directory of [https://github.com/crystal-lang/distribution-scripts](https://github.com/crystal-lang/distribution-scripts)

---

<div class="post-metadata">

**Author:** ![jwoertink](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/jwoertink/32/50_2.png) [@jwoertink](https://forum.crystal-lang.org/u/jwoertink)\
**Post date:** [April 9, 2020, 9:20pm UTC](https://forum.crystal-lang.org/t/asdf-crystal-and-llvm-version/1923/5 "2020-04-09T21:20:33Z")

</div>

I’m curious about what it would take to make crystal compile WASM. Since the latest LLVM stuff can do it, my thought was that it would be possible to make crystal do it too. I assumed that I would have to compile crystal with the latest version of LLVM for it to work though.

Not really a huge deal though. More of just experimenting without borking my versions I need for work 😆

---

<div class="post-metadata">

**Author:** ![bcardiff](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/bcardiff/32/3_2.png) [@bcardiff](https://forum.crystal-lang.org/u/bcardiff)\
**Post date:** [April 9, 2020, 9:30pm UTC](https://forum.crystal-lang.org/t/asdf-crystal-and-llvm-version/1923/6 "2020-04-09T21:30:49Z")

</div>

Ok, yes, the way to go then is compile the compiler from source.

Eventually the linked llvm can be updated. We went from 3.9.1 to 6.0.1, so it’s about time 😛
