[Chapel Merge] Improve compiler configuration

Branch: refs/heads/main
Revision: 2d9afa0
Author: mppf
Log Message:

Merge pull request #18485 from mppf/compiler-env-adj

Improve compiler configuration

This PR takes several steps to improve the configuration visible in printchplenv.

It is intended to resolve the following issues:

It takes the following steps:

  • Adjusts make/compiler/Makefile.clang to avoid running the compiler when CHPL_TARGET_COMPILER=llvm in order to avoid problems with make clobber with CHPL_LLVM=bundled. We can avoid running the compiler since we only build with LLVM 11+ and the associated clang defaults to C17 and C++14. In the future, it would be nice to move this logic to the Python scripts, but I did not take that on here.
  • Removes CPU feature tables since these have not been properly updated in a long time and have limited benefit. This reduces maintenance and the likelihood a user will run into problems when using an architecture not specifically tested. However, removing these feature tables means we can no longer give warnings/errors when the configuration requested appears to be something that could not run.
  • Uses a simple table to map PrgEnv CPU names to clang/llvm architecture names. This is a stopgap solution until we find a better way.
  • Changes CC/CXX support (added in PR #17923) to make setting these variables have less of a confusing impact (per discussion in #18450):
    • they do not prevent CHPL_TARGET_COMPILER defaulting to llvm when that makes sense
    • they are unused if other CHPL_*_COMPILER / CHPL_*_CC / CHPL_*_CXX are set
    • they apply only to the host configuration when working on a system using a PrgEnv compiler

Reviewed by @daviditen - thanks!

  • [x] test on a Cray PrgEnv system

  • [x] full local testing

    Modified Files:
    M doc/rst/usingchapel/chplenv.rst
    M make/compiler/Makefile.clang
    M util/chplenv/chpl_arch.py
    M util/chplenv/chpl_compiler.py
    M util/chplenv/chpl_cpu.py
    M util/chplenv/overrides.py
    M util/chplenv/printchplenv.py

    Compare: Comparing acd390f888b0...2d9afa04e471 · chapel-lang/chapel · GitHub