16325, “bradcray”, “Make uses of system LLVM dummy-proof”, “2020-09-02T22:08:49Z”
As of recent versions of Chapel (say chpl version 1.23.0 pre-release (f475765222)
), I’m finding that my traditional Chapel workspaces on Mac no longer work, where I’ve typically used CHPL_LLVM=system
. Specifically, the compile goes fine, but when linking chpl
, I get a number of link errors (where it appears that my system installation of LLVM is version 9?). This makes me wonder what we could/should do in order to make this a bit more dummy-proof. Say, at the outset of compilation, if the system LLVM version is too old, it would complain, saying something like:
Chapel requires LLVM version x.yz or later. Your system LLVM seems to be version 9. Please either upgrade your system-installed version or set CHPL_LLVM to 'llvm' or 'none'.
Once we go to LLVM being on by default and (presumably) having CHPL_LLVM default to system
I think we’d want this same behavior. We could instead have CHPL_LLVM default to llvm
if the system version is too old, but given the time required to build it, I’d think we’d never want to do this without a user explicitly opting into it (or opting out of using LLVM).
In discussing this with @mppf on chat, he suggested modifying find-llvm-config.sh
to run llvm-config.... --version
.