[PATCH] utils/llvm-lit: Generate "llvm-lit.py" rather than "llvm-lit" on Win32 hosts to let llvm-lit.py --use-processes work.
Daniel Dunbar
daniel at zuster.org
Tue Dec 3 10:22:25 PST 2013
Looks ok to me. I suspect there is another way around this too by figuring
out how to change what module the multiprocess module wants to import on
child process start up, but I don't know exactly what it would be, nor have
a Windows machine handy at the moment to check.
On Mon, Dec 2, 2013 at 11:26 PM, NAKAMURA Takumi <geek4civic at gmail.com>wrote:
> Hi ddunbar,
>
> llvm-lit needs suffix.py for multiprocess to find a main module with
> Python win32.
>
> http://llvm-reviews.chandlerc.com/D2313
>
> Files:
> llvm/utils/llvm-lit/CMakeLists.txt
> llvm/utils/llvm-lit/Makefile
>
> Index: llvm/utils/llvm-lit/CMakeLists.txt
> ===================================================================
> --- llvm/utils/llvm-lit/CMakeLists.txt
> +++ 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}
> )
> Index: llvm/utils/llvm-lit/Makefile
> ===================================================================
> --- llvm/utils/llvm-lit/Makefile
> +++ llvm/utils/llvm-lit/Makefile
> @@ -11,9 +11,14 @@
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131203/d2fcf981/attachment.html>
More information about the llvm-commits
mailing list