[Chapel Merge] Build LLVMSupport even with CHPL_LLVM=none

Branch: refs/heads/main
Revision: 21c49d1
Author: mppf
Link: Build LLVMSupport even with CHPL_LLVM=none by mppf · Pull Request #19565 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #19565 from mppf/chpl-llvm-none-build-support

Build LLVMSupport even with CHPL_LLVM=none

This PR adjusts the make process for building chpl to build the
bundled LLVMSupport library in order to allow the compiler source code to
use LLVM ADTs in order to achieve performance improvement (#19561) and to
benefit from the existing work.

This implies that cmake is now a dependency for Chapel. This PR updates
prereqs.rst to make cmake 3.13.4 or later an unconditional prerequisite.
However, as of this PR, it is only newly used with CHPL_LLVM=none.
Additionally, this PR doesn't actually use the LLVM support library in
this configuration - it only builds it. PR #19561 will use it.

We investigated and abandoned several alternative strategies to allow use
of the LLVM ADTs. This strategy is the simplest and most maintainable.

Note that this PR builds more of LLVM than is strictly necessary:

  • it installs all LLVM headers because I didn't see a build target to
    just install the headers for the support library. In order to do so,
    it builds TableGen.
  • it builds LLVMDemangle because otherwise the built llvm-config does
    not function, and our build system uses llvm-config.

On my system, in a quickstart configuration, a make -j4 after a make clobber takes:

  • 116 seconds before this PR
  • 195 seconds after this PR

See also:

Reviewed by @daviditen - thanks!