From 92390cfbe6dd5ce3218ba50b25b63c9e77829a9c Mon Sep 17 00:00:00 2001 From: Yann Sionneau Date: Wed, 26 Aug 2015 11:12:48 +0200 Subject: [PATCH 1/2] py2llvm: allow the unit test to run on Windows --- artiq/test/py2llvm.py | 3 ++- conda/llvmdev-or1k/bld.bat | 2 +- conda/llvmlite-artiq/meta.yaml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/artiq/test/py2llvm.py b/artiq/test/py2llvm.py index 6026d3797..a56c7f410 100644 --- a/artiq/test/py2llvm.py +++ b/artiq/test/py2llvm.py @@ -4,6 +4,7 @@ import inspect from fractions import Fraction from ctypes import CFUNCTYPE, c_int, c_int32, c_int64, c_double import struct +import os import llvmlite_artiq.binding as llvm @@ -16,7 +17,7 @@ from artiq.py2llvm.module import Module llvm.initialize() llvm.initialize_native_target() llvm.initialize_native_asmprinter() -if struct.calcsize("P") < 8: +if struct.calcsize("P") < 8 and os.name != "nt": from ctypes import _dlopen, RTLD_GLOBAL _dlopen("libgcc_s.so", RTLD_GLOBAL) diff --git a/conda/llvmdev-or1k/bld.bat b/conda/llvmdev-or1k/bld.bat index 2c93638ee..654b44d64 100644 --- a/conda/llvmdev-or1k/bld.bat +++ b/conda/llvmdev-or1k/bld.bat @@ -9,7 +9,7 @@ set CMAKE_GENERATOR=Visual Studio 12 2013 Win64 ) set CMAKE_GENERATOR_TOOLSET=v120_xp @rem Reduce build times and package size by removing unused stuff -set CMAKE_CUSTOM=-DLLVM_TARGETS_TO_BUILD=OR1K -DLLVM_INCLUDE_TESTS=OFF ^ +set CMAKE_CUSTOM=-DLLVM_TARGETS_TO_BUILD="OR1K;X86" -DLLVM_INCLUDE_TESTS=OFF ^ -DLLVM_INCLUDE_TOOLS=OFF -DLLVM_INCLUDE_UTILS=OFF ^ -DLLVM_INCLUDE_DOCS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF ^ -DLLVM_ENABLE_ASSERTIONS=ON diff --git a/conda/llvmlite-artiq/meta.yaml b/conda/llvmlite-artiq/meta.yaml index af5253bea..e22929410 100644 --- a/conda/llvmlite-artiq/meta.yaml +++ b/conda/llvmlite-artiq/meta.yaml @@ -15,7 +15,7 @@ requirements: - python build: - number: 2 + number: 3 test: imports: From 7b0b1d686013691fb5a492b3691715c6611cf2ab Mon Sep 17 00:00:00 2001 From: Yann Sionneau Date: Wed, 26 Aug 2015 14:22:13 +0200 Subject: [PATCH 2/2] manual: Windows (32 and 64-bit) users should install 32-bit miniconda/anaconda --- doc/manual/installing.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/manual/installing.rst b/doc/manual/installing.rst index 9d7523205..da2b6a893 100644 --- a/doc/manual/installing.rst +++ b/doc/manual/installing.rst @@ -15,7 +15,11 @@ Installing Anaconda or Miniconda * You can either install Anaconda (chose Python 3.4) from https://store.continuum.io/cshop/anaconda/ -* Or install the more minimalistic Miniconda (chose Python3.4) from http://conda.pydata.org/miniconda.html +* Or install the more minimalistic Miniconda (chose Python 3.4) from http://conda.pydata.org/miniconda.html + +.. warning:: + If you are installing on Windows, chose the Windows 32-bit version regardless of whether you have + a 32-bit or 64-bit Windows. After installing either Anaconda or Miniconda, open a new terminal and make sure the following command works::