Switch windows to clang (#7407)

* Switch over to clang for deepseek on windows

The patch for deepseek requires clang on windows. gcc on windows
has a buggy c++ library and can't handle the unicode characters

* Fail fast with wrong compiler on windows

Avoid users mistakenly building with GCC when we need clang
This commit is contained in:
Daniel Hiltgen
2024-10-29 13:15:04 -07:00
committed by GitHub
parent 078f666f73
commit c9ca386131
2 changed files with 10 additions and 3 deletions

View File

@@ -57,6 +57,10 @@ ifeq ($(OS),windows)
EXE_EXT := .exe
SHARED_PREFIX :=
CPU_FLAG_PREFIX := /arch:
_GCC_TEST:=$(findstring clang,$(shell gcc --version))
ifneq ($(_GCC_TEST),clang)
$(error WRONG COMPILER DETECTED $(shell type gcc) - gcc must be a clang compat compiler on windows - see docs/development.md for setup instructions)
endif
ifneq ($(HIP_PATH),)
# If HIP_PATH has spaces, hipcc trips over them when subprocessing
HIP_PATH := $(shell cygpath -m -s "$(patsubst %\,%,$(HIP_PATH))")