summaryrefslogtreecommitdiffstats
path: root/llvm/utils/llvm-lit
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2013-12-03 23:22:18 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2013-12-03 23:22:18 +0000
commit3e32a0f358975aa36f343fe14d16d309f744ca4f (patch)
tree3ea1ef50d47d9a781d069cdee62f7ae7fcd99136 /llvm/utils/llvm-lit
parentbfe7d29f7d4a32984e7ee72bc31fe2a3c6b1b5bd (diff)
downloadbcm5719-llvm-3e32a0f358975aa36f343fe14d16d309f744ca4f.tar.gz
bcm5719-llvm-3e32a0f358975aa36f343fe14d16d309f744ca4f.zip
utils/llvm-lit: Generate "llvm-lit.py" rather than "llvm-lit" on Win32 hosts to let llvm-lit.py --use-processes work.
llvm-lit needs suffix.py for multiprocess to find a main module. llvm-svn: 196328
Diffstat (limited to 'llvm/utils/llvm-lit')
-rw-r--r--llvm/utils/llvm-lit/CMakeLists.txt7
-rw-r--r--llvm/utils/llvm-lit/Makefile9
2 files changed, 13 insertions, 3 deletions
diff --git a/llvm/utils/llvm-lit/CMakeLists.txt b/llvm/utils/llvm-lit/CMakeLists.txt
index b535eaecde7..585753427ac 100644
--- a/llvm/utils/llvm-lit/CMakeLists.txt
+++ b/llvm/utils/llvm-lit/CMakeLists.txt
@@ -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}
)
diff --git a/llvm/utils/llvm-lit/Makefile b/llvm/utils/llvm-lit/Makefile
index 77021bbc243..ce1cac9c32e 100644
--- a/llvm/utils/llvm-lit/Makefile
+++ b/llvm/utils/llvm-lit/Makefile
@@ -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
OpenPOWER on IntegriCloud