Merge pull request #18194 from bradcray/improve-no-llvm-error-message
Improve behavior when a CHPL_LLVM=none build is used when CHPL_LLVM!=none
When using a compiler built with
CHPL_LLVM=none in an environment
CHPL_LLVM set or inferred to
traditional error message has been short, but not particularly clear.
I keep hitting this error and find the current message difficult
to understand, particularly putting myself in the shoes of someone
who, say, built Chapel with the quickstart build and then is trying to
use it from a new shell that may not set CHPL_LLVM=none. Or
someone piggy-backing off of someone else's installation that was
built without LLVM.
This PR improves things by:
CHPL_LLVM=nonein the compiler's environment in the event
that it is unset and the compiler was built without LLVM support; this
happens early in compilation so that when printchplenv is invoked, an
appropriate back-end compiler will be selected. I also added a note
--print-chpl-settingsto indicate that this setting had been made
by the compiler (and why).
- improving the existing error message so that if someone has explicitly
requested the llvm back-end through
CHPL_LLVMwith a compiler that was built without LLVM, they get
a better message than they used to.
- reordering how we do things early in the compiler so that things like
are handled before we print errors like this one. That way, someone running
chpl --helpwon't immediately get an error about how they can't compile
when they weren't actually trying to.
Modified Files: M compiler/main/driver.cpp Compare: https://github.com/chapel-lang/chapel/compare/c0e3512485d4...46527cf0c710