Force SHELL to be cmd.exe on Windows for the test suite

Summary:
Windows make will search for other shells and choose those over cmd
if available (e.g. C:\cygdrive\bin\sh.exe). This shell has numerous
issues with path handling (/ vs \\ vs \ and C:). So default to using
cmd.exe which is known to work.

Reviewers: zturner, sas, xiaobai

Reviewed By: zturner

Differential Revision: https://reviews.llvm.org/D54510

llvm-svn: 346993
This commit is contained in:
Nathan Lanza
2018-11-15 20:56:44 +00:00
parent 8d5a36a839
commit 5cc7de09ef

View File

@@ -50,6 +50,17 @@ ifeq "$(OS)" ""
OS = $(HOST_OS)
endif
#----------------------------------------------------------------------
# If OS is Windows, force SHELL to be cmd
#
# Some versions of make on Windows will search for other shells such as
# C:\cygwin\bin\sh.exe. This shell fails for numerous different reasons
# so default to using cmd.exe.
#----------------------------------------------------------------------
ifeq "$(OS)" "Windows_NT"
SHELL = $(WINDIR)\system32\cmd.exe
endif
#----------------------------------------------------------------------
# If TRIPLE is not defined try to set the ARCH, CC, CFLAGS, and more
# from the triple alone