Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

Commit

Permalink
utils/llvm-lit: Generate "llvm-lit.py" rather than "llvm-lit" on Win3…
Browse files Browse the repository at this point in the history
…2 hosts to let llvm-lit.py --use-processes work.

llvm-lit needs suffix.py for multiprocess to find a main module.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196328 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
chapuni committed Dec 3, 2013
1 parent d38749b commit e0c0a71
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
7 changes: 6 additions & 1 deletion utils/llvm-lit/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
if (WIN32 AND NOT CYGWIN)
# llvm-lit needs suffix.py for multiprocess to find a main module.
set(suffix .py)
endif ()

configure_file(
llvm-lit.in
${LLVM_TOOLS_BINARY_DIR}/llvm-lit
${LLVM_TOOLS_BINARY_DIR}/llvm-lit${suffix}
)
9 changes: 7 additions & 2 deletions utils/llvm-lit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@ LEVEL = ../..

include $(LEVEL)/Makefile.common

all:: $(ToolDir)/llvm-lit
# llvm-lit needs suffix.py for multiprocess to find a main module.
ifeq ($(HOST_OS),MingW)
Suffix := .py
endif

$(ToolDir)/llvm-lit: llvm-lit.in Makefile $(ToolDir)/.dir
all:: $(ToolDir)/llvm-lit$(Suffix)

$(ToolDir)/llvm-lit$(Suffix): llvm-lit.in Makefile $(ToolDir)/.dir
$(Echo) "Creating 'llvm-lit' script..."
$(Verb)$(ECHOPATH) s=@LLVM_SOURCE_DIR@=$(LLVM_SRC_ROOT)=g > lit.tmp
$(Verb)$(ECHOPATH) s=@LLVM_BINARY_DIR@=$(LLVM_OBJ_ROOT)=g >> lit.tmp
Expand Down

0 comments on commit e0c0a71

Please sign in to comment.