summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--utils/llvm-lit/CMakeLists.txt7
-rw-r--r--utils/llvm-lit/Makefile9
2 files changed, 13 insertions, 3 deletions
diff --git a/utils/llvm-lit/CMakeLists.txt b/utils/llvm-lit/CMakeLists.txt
index b535eaecde..585753427a 100644
--- a/utils/llvm-lit/CMakeLists.txt
+++ b/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/utils/llvm-lit/Makefile b/utils/llvm-lit/Makefile
index 77021bbc24..ce1cac9c32 100644
--- a/utils/llvm-lit/Makefile
+++ b/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