[Chapel Merge] Fix problem in get_compiler_from_command

Branch: refs/heads/main
Revision: 3fe5e7c
Author: mppf
Link: Fix problem in get_compiler_from_command by mppf · Pull Request #18772 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #18772 from mppf/follow-up-18745

Fix problem in get_compiler_from_command

Follow-up to PR #18745 .

PR #18745 assumed that all calls to it would be passing in just one
command (since the arguments are frequently now stored in a list and so
call sites can just get the first list element). However that's not the
case in get_compiler_from_cc_cxx where this function is called with the
value of CC / CXX environment variables.

  • [x] full local testing

Reviewed by @e-kayrakli - thanks!

Modified Files:
M util/chplenv/chpl_compiler.py

Compare: https://github.com/chapel-lang/chapel/compare/1e0f585348d0...3fe5e7cd6e87