mirror of
https://github.com/libtom/libtomcrypt
synced 2026-08-25 20:26:07 -04:00
Merge pull request #786 from libtom/pr/appveyor-clang-cl
appveyor + clang-cl
This commit is contained in:
commit
459bd79006
8 changed files with 45 additions and 13 deletions
18
appveyor.yml
18
appveyor.yml
|
|
@ -11,6 +11,18 @@ image:
|
|||
- Visual Studio 2019
|
||||
- Visual Studio 2017
|
||||
- Visual Studio 2015
|
||||
environment:
|
||||
matrix:
|
||||
- LTC_CC: cl
|
||||
- LTC_CC: clang-cl
|
||||
matrix:
|
||||
exclude:
|
||||
- image: Visual Studio 2019
|
||||
LTC_CC: clang-cl
|
||||
- image: Visual Studio 2017
|
||||
LTC_CC: clang-cl
|
||||
- image: Visual Studio 2015
|
||||
LTC_CC: clang-cl
|
||||
build_script:
|
||||
- cmd: >-
|
||||
if "Visual Studio 2022"=="%APPVEYOR_BUILD_WORKER_IMAGE%" call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
|
||||
|
|
@ -18,6 +30,8 @@ build_script:
|
|||
if "Visual Studio 2017"=="%APPVEYOR_BUILD_WORKER_IMAGE%" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
|
||||
if "Visual Studio 2015"=="%APPVEYOR_BUILD_WORKER_IMAGE%" call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64
|
||||
if "Visual Studio 2015"=="%APPVEYOR_BUILD_WORKER_IMAGE%" call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64
|
||||
if "clang-cl"=="%LTC_CC%" set "PATH=C:\Program Files\LLVM\bin;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\x64\bin;%PATH%"
|
||||
if "clang-cl"=="%LTC_CC%" clang-cl --version
|
||||
cd..
|
||||
git clone https://github.com/libtom/libtommath.git --branch=master
|
||||
cp libtomcrypt\.ci\cmake.bat libtommath\cmake.bat
|
||||
|
|
@ -27,11 +41,11 @@ build_script:
|
|||
cd..
|
||||
cd libtomcrypt
|
||||
.ci\cmake.bat
|
||||
nmake -f makefile.msvc all
|
||||
nmake -f makefile.msvc all CC=%LTC_CC%
|
||||
cp test.exe test-stock.exe
|
||||
cp timing.exe timing-stock.exe
|
||||
nmake -f makefile.msvc clean
|
||||
nmake -f makefile.msvc all CFLAGS="/Ox /DUSE_LTM /DLTM_DESC /DLTC_NO_ACCEL /I../libtommath"
|
||||
nmake -f makefile.msvc all CC=%LTC_CC% CFLAGS="/Ox /DUSE_LTM /DLTM_DESC /DLTC_NO_ACCEL /I../libtommath"
|
||||
test_script:
|
||||
- cmd: >-
|
||||
test-stock.exe
|
||||
|
|
|
|||
|
|
@ -287,25 +287,25 @@ $(LIBMAIN_S): $(OBJECTS)
|
|||
|
||||
#Demo tools/utilities
|
||||
hashsum.exe: demos/hashsum.c tests/common.c $(LIBMAIN_S)
|
||||
cl $(LTC_CFLAGS) demos/hashsum.c tests/common.c $(LIBMAIN_S) $(LTC_LDFLAGS) /Fe$@
|
||||
$(CC) $(LTC_CFLAGS) demos/hashsum.c tests/common.c $(LIBMAIN_S) $(LTC_LDFLAGS) /Fe$@
|
||||
crypt.exe: demos/crypt.c $(LIBMAIN_S)
|
||||
cl $(LTC_CFLAGS) demos/crypt.c tests/common.c $(LIBMAIN_S) $(LTC_LDFLAGS) /Fe$@
|
||||
$(CC) $(LTC_CFLAGS) demos/crypt.c tests/common.c $(LIBMAIN_S) $(LTC_LDFLAGS) /Fe$@
|
||||
small.exe: demos/small.c $(LIBMAIN_S)
|
||||
cl $(LTC_CFLAGS) demos/small.c tests/common.c $(LIBMAIN_S) $(LTC_LDFLAGS) /Fe$@
|
||||
$(CC) $(LTC_CFLAGS) demos/small.c tests/common.c $(LIBMAIN_S) $(LTC_LDFLAGS) /Fe$@
|
||||
tv_gen.exe: demos/tv_gen.c $(LIBMAIN_S)
|
||||
cl $(LTC_CFLAGS) demos/tv_gen.c tests/common.c $(LIBMAIN_S) $(LTC_LDFLAGS) /Fe$@
|
||||
$(CC) $(LTC_CFLAGS) demos/tv_gen.c tests/common.c $(LIBMAIN_S) $(LTC_LDFLAGS) /Fe$@
|
||||
sizes.exe: demos/sizes.c $(LIBMAIN_S)
|
||||
cl $(LTC_CFLAGS) demos/sizes.c tests/common.c $(LIBMAIN_S) $(LTC_LDFLAGS) /Fe$@
|
||||
$(CC) $(LTC_CFLAGS) demos/sizes.c tests/common.c $(LIBMAIN_S) $(LTC_LDFLAGS) /Fe$@
|
||||
constants.exe: demos/constants.c $(LIBMAIN_S)
|
||||
cl $(LTC_CFLAGS) demos/constants.c tests/common.c $(LIBMAIN_S) $(LTC_LDFLAGS) /Fe$@
|
||||
$(CC) $(LTC_CFLAGS) demos/constants.c tests/common.c $(LIBMAIN_S) $(LTC_LDFLAGS) /Fe$@
|
||||
timing.exe: demos/timing.c $(LIBMAIN_S)
|
||||
cl $(LTC_CFLAGS) demos/timing.c tests/common.c $(LIBMAIN_S) $(LTC_LDFLAGS) /Fe$@
|
||||
$(CC) $(LTC_CFLAGS) demos/timing.c tests/common.c $(LIBMAIN_S) $(LTC_LDFLAGS) /Fe$@
|
||||
der_print_flexi.exe: demos/der_print_flexi.c $(LIBMAIN_S)
|
||||
cl $(LTC_CFLAGS) demos/der_print_flexi.c tests/common.c $(LIBMAIN_S) $(LTC_LDFLAGS) /Fe$@
|
||||
$(CC) $(LTC_CFLAGS) demos/der_print_flexi.c tests/common.c $(LIBMAIN_S) $(LTC_LDFLAGS) /Fe$@
|
||||
|
||||
#Tests
|
||||
test.exe: $(LIBMAIN_S) $(TOBJECTS)
|
||||
cl $(LTC_CFLAGS) $(TOBJECTS) $(LIBMAIN_S) $(LTC_LDFLAGS) /Fe$@
|
||||
$(CC) $(LTC_CFLAGS) $(TOBJECTS) $(LIBMAIN_S) $(LTC_LDFLAGS) /Fe$@
|
||||
@echo NOTICE: start the tests by launching test.exe
|
||||
|
||||
ALL_TEST=hashsum.exe crypt.exe small.exe tv_gen.exe sizes.exe constants.exe timing.exe test.exe
|
||||
|
|
|
|||
|
|
@ -11,6 +11,10 @@
|
|||
|
||||
#if defined(LTC_ARCH_X86) && (defined(LTC_AES_NI) || !defined(ENCRYPT_ONLY))
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#include <intrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined (LTC_S_X86_CPUID)
|
||||
#define LTC_S_X86_CPUID
|
||||
static LTC_INLINE void s_x86_cpuid(int* regs, int leaf)
|
||||
|
|
|
|||
|
|
@ -24,6 +24,10 @@ const struct ltc_hash_descriptor sha1_desc =
|
|||
|
||||
#if defined LTC_SHA1_X86
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#include <intrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined (LTC_S_X86_CPUID)
|
||||
#define LTC_S_X86_CPUID
|
||||
static LTC_INLINE void s_x86_cpuid(int* regs, int leaf)
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@
|
|||
#pragma GCC diagnostic ignored "-Wdeclaration-after-statement"
|
||||
#pragma GCC diagnostic ignored "-Wuninitialized"
|
||||
#pragma GCC diagnostic ignored "-Wunused-function"
|
||||
#elif defined(_MSC_VER)
|
||||
#endif
|
||||
#if defined(_MSC_VER)
|
||||
#include <intrin.h>
|
||||
#endif
|
||||
#include <emmintrin.h> /* SSE2 _mm_loadu_si128 _mm_storeu_si128 _mm_set_epi32 _mm_set_epi64x _mm_setzero_si128 _mm_xor_si128 _mm_add_epi32 _mm_shuffle_epi32 */
|
||||
|
|
|
|||
|
|
@ -29,6 +29,10 @@ const struct ltc_hash_descriptor sha224_desc =
|
|||
|
||||
#if defined LTC_SHA224_X86
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#include <intrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined (LTC_S_X86_CPUID)
|
||||
#define LTC_S_X86_CPUID
|
||||
static LTC_INLINE void s_x86_cpuid(int* regs, int leaf)
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@
|
|||
|
||||
#if defined LTC_ARCH_X86
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#include <intrin.h>
|
||||
#endif
|
||||
|
||||
#if !defined (LTC_S_X86_CPUID)
|
||||
#define LTC_S_X86_CPUID
|
||||
static LTC_INLINE void s_x86_cpuid(int* regs, int leaf)
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@
|
|||
#pragma GCC diagnostic ignored "-Wdeclaration-after-statement"
|
||||
#pragma GCC diagnostic ignored "-Wuninitialized"
|
||||
#pragma GCC diagnostic ignored "-Wunused-function"
|
||||
#elif defined(_MSC_VER)
|
||||
#endif
|
||||
#if defined(_MSC_VER)
|
||||
#include <intrin.h>
|
||||
#endif
|
||||
#include <emmintrin.h> /* SSE2 _mm_load_si128 _mm_loadu_si128 _mm_storeu_si128 _mm_set_epi64x _mm_add_epi32 _mm_shuffle_epi32 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue