Use -? instead of /? to test compiler for MSVC-like command-line support

MS-style command-line tools accept either `/` or `-` for command-line
options.  Prefer `-` over `/` so that non-MS tools do not treat it as a
path.

Fixes: #18941
3 files changed