On Windows, use 'del' instead of 'rm' to delete the test executable.

This is a nasty hack to work around the issue described in
https://llvm.org/pr24589

llvm-svn: 246062
This commit is contained in:
Zachary Turner 2015-08-26 19:44:45 +00:00
parent 893b09e1af
commit 0844d8db4c
1 changed files with 7 additions and 3 deletions

View File

@ -533,7 +533,7 @@ endif
dsym: $(DSYM)
all: $(EXE) $(DSYM)
clean::
$(RM) "$(EXE)" $(OBJECTS) $(PREREQS) $(PREREQS:.d=.d.tmp) $(ARCHIVE_NAME) $(ARCHIVE_OBJECTS)
$(RM) $(OBJECTS) $(PREREQS) $(PREREQS:.d=.d.tmp) $(ARCHIVE_NAME) $(ARCHIVE_OBJECTS)
ifneq "$(DYLIB_NAME)" ""
$(RM) -r $(DYLIB_FILENAME).dSYM
$(RM) $(DYLIB_OBJECTS) $(DYLIB_PREREQS) $(DYLIB_PREREQS:.d=.d.tmp) $(DYLIB_FILENAME) $(DYLIB_FILENAME).debug
@ -542,10 +542,14 @@ ifneq "$(DSYM)" ""
$(RM) -r "$(DSYM)"
endif
ifeq "$(OS)" "Windows_NT"
# http://llvm.org/pr24589
IF EXIST "$(EXE)" del "$(EXE)"
$(RM) $(wildcard *.manifest *.pdb *.ilk)
ifneq "$(DYLIB_NAME)" ""
$(RM) $(DYLIB_NAME).lib $(DYLIB_NAME).exp
endif
else
$(RM) "$(EXE)"
endif
#----------------------------------------------------------------------