[Chapel Merge] If PE links with -dynamic, that also means dynamic

Branch: refs/heads/main
Revision: 1d2c4aa
Author: gbtitus
Log Message:

Merge pull request #18484 from gbtitus/dyn-means-dyn

If PE links with -dynamic, that also means dynamic linking.

(Reviewed by @mppf.)

In the PE command line driver's linking arguments, we have only been
recognizing '-Wl,-Bdynamic' as indicating that it will do dynamic
linking, because that's what the driver throws when it uses gcc to
link with. But when it uses clang to link with, it instead throws
'-dynamic'. Here, add recognition for that as well. This fixes a
problem first seen with quite-new PrgEnv installs on an HPE Cray EX
lookalike system at a customer site.

Modified Files:
M compiler/llvm/clangUtil.cpp

M util/config/gather-cray-prgenv-arguments.bash

Compare: https://github.com/chapel-lang/chapel/compare/da30e2764539...1d2c4aaa2911