[Chapel Merge] Tighten check-no-dash-o test

Branch: refs/heads/main
Revision: fa3360f
Author: mppf
Link: Tighten check-no-dash-o test by mppf · Pull Request #19030 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #19030 from mppf/fix-check-dash-o

Tighten check-no-dash-o test

This PR improves a test added in #18985 to check for accidental -O in
compiler or linker flags.

We saw this test fail in one nightly testing configuration. I think we
were lucky enough to get a temporary directory for the source code files
of something like /tmp/chpl-user.deleteme-OigbDV. Anyway this PR
adjusts the prediff to look for " -O" (including the space) and to
print out the whole line that matched in case this comes up again.

Test change only - not reviewed.

Modified Files:
M test/compflags/ferguson/check-no-dash-o.prediff

Compare: https://github.com/chapel-lang/chapel/compare/348118e941d8...fa3360f2875f