-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix error locating llvm-ar during build on Linux #35
Conversation
A note: |
"which llvm-ar" doesn't show anything on my Ubuntu 14.04 with LLVM 3.5 installed. There is no llvm-ar on the system, just llvm-ar-3.5. |
Hmm, it's odd that your llvm-ar executable would be named that. That sounds like a packaging error. Let me see if I can determine a consistent way to locate that file. Are the rest of your llvm tools (i.e. |
Looks like they're packaged without the postfix: http://packages.ubuntu.com/trusty/amd64/llvm/filelist This is pretty weird. |
Yes, all of them have the suffix except of the llvm-clang. The package we install on Linux is called llvm-3.5 |
Thanks for clarifying. That package is a pretty non-standard install of llvm, so some thought will have to be put into how to support it. I'm spinning up an Ubuntu VM now to see what I can do. |
So the package that you have installed is called just llvm? That one on Ubuntu contains an old version (3.4.0-ubuntu1). |
I'm testing it on Arch Linux, which uses llvm 3.5 in the |
This manually locates the llvm toolchain and sets the relevant cmake variables. The _CMAKE_TOOLCHAIN_PREFIX variable is internal and undocumented and should probably be avoided.
@janvorli I have just force pushed an alternative fix. Would you be so kind as to test it under Ubuntu for me? |
Build server seems to have gotten through the cmake configuration part of this ordeal, so presumably this is good to go. |
It works fine on my Ubuntu and the change looks good to me. Thank you very much for fixing the issue! |
Happy to help 😄 |
LGTM |
Fix error locating llvm-ar during build on Linux
Need to lower PHI stores to smash their TYP_SIMD12 types
This explicitly sets the ar to llvm-ar when running cmake. Prior to this
commit, CMake was told that the prefix for all tools is "llvm-", but
this did not affect ar. Explicitly setting CMAKE_AR to "llvm-ar" is a
bit of a workaround considering the rest of the tools are set
automatically, but I cannot think of any negative side effects of doing
so.
This fixes #33.