diff --git a/.appveyor.yml b/.appveyor.yml index f1a36d8a0..efc98f555 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,40 +1,51 @@ environment: matrix: - LIB_TYPE: shared - CONFIG: x86_64 + CONFIG: auto + CC: gcc + THREADING: pthreads + CBLAS: no + - LIB_TYPE: static CONFIG: auto + CC: clang + THREADING: no + + - LIB_TYPE: shared + CONFIG: x86_64 + CC: clang + THREADING: pthreads + + - LIB_TYPE: static + CONFIG: auto + CC: clang + THREADING: openmp install: -- set "CONDA_INSTALL_LOCN=C:\\Miniconda36-x64" -- call %CONDA_INSTALL_LOCN%\Scripts\activate.bat -- conda update --yes --quiet conda -- conda config --add channels conda-forge -- conda install --yes clangdev posix m2-make -- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 -- set "LIB=%CONDA_INSTALL_LOCN%\Library\lib;%LIB%" -- set "CPATH=%CONDA_INSTALL_LOCN%\Library\include;%CPATH%" +- set "PATH=C:\msys64\mingw64\bin;C:\msys64\bin;%PATH%" +- if [%CC%]==[clang] set "PATH=C:\Program Files\LLVM\bin;%PATH%" +- if [%CC%]==[clang] set "AR=llvm-ar" +- if [%CC%]==[clang] set "AS=llvm-as" +- if [%CC%]==[clang] call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 build_script: - if [%LIB_TYPE%]==[shared] set "CONFIGURE_OPTS=%CONFIGURE_OPTS% --enable-shared --disable-static" - if [%LIB_TYPE%]==[static] set "CONFIGURE_OPTS=%CONFIGURE_OPTS% --disable-shared --enable-static" -- set CC=clang +- if not [%CBLAS%]==[no] set "CONFIGURE_OPTS=%CONFIGURE_OPTS% --enable-cblas" - set RANLIB=echo -- set AR=llvm-ar -- set AS=llvm-as - set LIBPTHREAD= -- set "PATH=%PATH%;C:\projects\blis\lib\%CONFIG%" +- set "PATH=%PATH%;C:\blis\lib" - set "CFLAGS=-Wno-macro-redefined" -- bash -lc "source activate && cd /c/projects/blis && ./configure %CONFIGURE_OPTS% --enable-cblas --disable-threading --enable-arg-max-hack --prefix=/c/blis %CONFIG%" -- bash -lc "source activate && cd /c/projects/blis && make -j4 V=1" -- bash -lc "source activate && cd /c/projects/blis && make install" +- bash -lc "cd /c/projects/blis && ./configure %CONFIGURE_OPTS% --enable-threading=%THREADING% --enable-arg-max-hack --prefix=/c/blis %CONFIG%" +- bash -lc "cd /c/projects/blis && mingw32-make -j4 V=1" +- bash -lc "cd /c/projects/blis && mingw32-make install" - ps: Compress-Archive -Path C:\blis -DestinationPath C:\blis.zip - ps: Push-AppveyorArtifact C:\blis.zip test_script: - if [%LIB_TYPE%]==[shared] set "TEST_TARGET=checkblis-fast" - if [%LIB_TYPE%]==[static] set "TEST_TARGET=check" -- bash -lc "source activate && cd /c/projects/blis && make %TEST_TARGET% -j4 V=1" +- bash -lc "cd /c/projects/blis && mingw32-make %TEST_TARGET% -j4 V=1" # Enable this to be able to login to the build worker. You can use the # `remmina` program in Ubuntu, use the login information that the line below diff --git a/common.mk b/common.mk index ce5a4e81a..47e0f100f 100644 --- a/common.mk +++ b/common.mk @@ -379,7 +379,11 @@ LIBBLIS := libblis ifeq ($(OS_NAME),Darwin) SHLIB_EXT := dylib else ifeq ($(IS_WIN),yes) +ifeq ($(CC_VENDOR),gcc) +SHLIB_EXT := dll.a +else SHLIB_EXT := lib +endif else SHLIB_EXT := so endif @@ -503,7 +507,7 @@ ifeq ($(IS_WIN),yes) ifeq ($(CC_VENDOR),clang) SOFLAGS += -Wl,-def:build/libblis-symbols.def -Wl,-implib:$(BASE_LIB_PATH)/$(LIBBLIS).lib else -SOFLAGS += build/libblis-symbols.def -Wl,--out-implib,$(LIBBLIS).dll.a +SOFLAGS += -Wl,--export-all-symbols -Wl,--out-implib,$(BASE_LIB_PATH)/$(LIBBLIS).dll.a endif else # Linux shared library link flags. diff --git a/frame/include/bli_system.h b/frame/include/bli_system.h index 689b36303..4b199a702 100644 --- a/frame/include/bli_system.h +++ b/frame/include/bli_system.h @@ -83,11 +83,13 @@ #define VC_EXTRALEAN #include - // Undefine attribute specifiers in Windows. - #define __attribute__(x) + #if !defined(__clang__) && !defined(__GNUC__) + // Undefine attribute specifiers in Windows. + #define __attribute__(x) - // Undefine restrict. - #define restrict + // Undefine restrict. + #define restrict + #endif #endif