SysTools: Only apply Windows-specific workaround on Windows

Issue #1110 was apparently due to a bug in Vista which prevented GCC
from finding its binaries unless we explicitly added it to PATH.
However, this workaround was incorrectly applied on non-Windows
platforms as well, resulting in ill-formed PATHs (#17266).

Fixes #17266.
22 jobs for master in 519 minutes and 36 seconds (queued for 5 seconds)
Name Stage Failure
failed
doc-tarball Packaging
Submodule path 'utils/hsc2hs': checked out '4c65964de3ca1a002901cae95217ad10b95edeeb'
$ git checkout .gitmodules
$ git fetch https://gitlab.haskell.org/ghc/ghc-performance-notes.git refs/notes/perf:refs/notes/perf || true
warning: no common commits
From https://gitlab.haskell.org/ghc/ghc-performance-notes
* [new ref] refs/notes/perf -> refs/notes/perf
$ if [ ! -f "$LINUX_BINDIST" ]; then # collapsed multi-line command
Error: ghc-x86_64-mingw32.tar.xz does not exist. Did the 64-bit Windows job fail?
ERROR: Job failed: exit code 1
failed
validate-armv7-linux-deb9 Full Build
Uploading artifacts...
ghc-armv7-linux-deb9.tar.xz: found 1 matching files
junit.xml: found 1 matching files

performance-metrics.tsv: found 1 matching files

Uploading artifacts to coordinator... ok
id=191893 responseStatus=201 Created token=izV5ndBs
Uploading artifacts...
junit.xml: found 1 matching files

Uploading artifacts to coordinator... ok
id=191893 responseStatus=201 Created token=izV5ndBs
ERROR: Job failed: exit code 1
failed
validate-x86_64-windows-hadrian Full Build
Runtime platform                                    arch=amd64 os=windows pid=1088 revision=1f513601 version=11.10.1
WARNING: ghc.tar.xz: no matching files
WARNING: junit.xml: no matching files
ERROR: No files to upload
Uploading artifacts...
Runtime platform
arch=amd64 os=windows pid=4368 revision=1f513601 version=11.10.1
WARNING: junit.xml: no matching files
ERROR: No files to upload
ERROR: Job failed: exit status 1
failed
pages Deploy
Synchronizing submodule url for 'utils/hsc2hs'
$ git submodule update --init --recursive
$ git checkout .gitmodules
$ git fetch https://gitlab.haskell.org/ghc/ghc-performance-notes.git refs/notes/perf:refs/notes/perf || true
$ mkdir -p public/doc
$ tar -xf haddock.html.tar.xz -C public/doc
tar: haddock.html.tar.xz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
ERROR: Job failed: exit code 1
failed
validate-x86_64-windows Full Build
Runtime platform                                    arch=amd64 os=windows pid=188 revision=1f513601 version=11.10.1
WARNING: $BIN_DIST_PREP_TAR_COMP: no matching files
WARNING: junit.xml: no matching files
ERROR: No files to upload
Uploading artifacts...
Runtime platform
arch=amd64 os=windows pid=3228 revision=1f513601 version=11.10.1
WARNING: junit.xml: no matching files
ERROR: No files to upload
ERROR: Job failed: exit status 2
failed
validate-aarch64-linux-deb9 Full Build
Uploading artifacts...
ghc-aarch64-linux-deb9.tar.xz: found 1 matching files
junit.xml: found 1 matching files

performance-metrics.tsv: found 1 matching files

Uploading artifacts to coordinator... ok
id=191892 responseStatus=201 Created token=np5J_phJ
Uploading artifacts...
junit.xml: found 1 matching files

Uploading artifacts to coordinator... ok
id=191892 responseStatus=201 Created token=np5J_phJ
ERROR: Job failed: exit code 1