From 929608146a439c4bd28b989a5af47cb9afce2af5 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Fri, 23 Mar 2018 15:00:04 -0700 Subject: [PATCH 1/4] create .tar.zst source package --- appveyor.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 7d6ca99bb..1f092574c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -80,12 +80,17 @@ SET "LDFLAGS=../../zlib/libz.a" && sh -c "%SCRIPT%" && ( if [%COMPILER%]==[gcc] if [%ARTIFACT%]==[true] + ECHO Creating artifacts && + ECHO %cd% && + make clean && 7z a -ttar -so zstd-src.tar * && lib\dll\example\build_package.bat && - make -C programs DEBUGFLAGS= clean zstd && - cd programs\ && 7z a -tzip -mx9 zstd-win-binary-%PLATFORM%.zip zstd.exe && + cd programs\ && make DEBUGFLAGS= clean zstd && + 7z a -tzip -mx9 zstd-win-binary-%PLATFORM%.zip zstd.exe && appveyor PushArtifact zstd-win-binary-%PLATFORM%.zip && cp zstd.exe ..\bin\zstd.exe && - cd ..\bin\ && 7z a -tzip -mx9 zstd-win-release-%PLATFORM%.zip * && + cd .. && zstd --ultra -22 zstd-src.tar && + appveyor PushArtifact zstd-src.tar.zst && + cd bin\ && 7z a -tzip -mx9 zstd-win-release-%PLATFORM%.zip * && appveyor PushArtifact zstd-win-release-%PLATFORM%.zip ) ) From f991897bb1dbf6d55b9a1d3879f8ae34b6fed7cf Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Fri, 23 Mar 2018 18:39:42 -0700 Subject: [PATCH 2/4] Revert "create .tar.zst source package" This reverts commit 929608146a439c4bd28b989a5af47cb9afce2af5. --- appveyor.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 1f092574c..7d6ca99bb 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -80,17 +80,12 @@ SET "LDFLAGS=../../zlib/libz.a" && sh -c "%SCRIPT%" && ( if [%COMPILER%]==[gcc] if [%ARTIFACT%]==[true] - ECHO Creating artifacts && - ECHO %cd% && - make clean && 7z a -ttar -so zstd-src.tar * && lib\dll\example\build_package.bat && - cd programs\ && make DEBUGFLAGS= clean zstd && - 7z a -tzip -mx9 zstd-win-binary-%PLATFORM%.zip zstd.exe && + make -C programs DEBUGFLAGS= clean zstd && + cd programs\ && 7z a -tzip -mx9 zstd-win-binary-%PLATFORM%.zip zstd.exe && appveyor PushArtifact zstd-win-binary-%PLATFORM%.zip && cp zstd.exe ..\bin\zstd.exe && - cd .. && zstd --ultra -22 zstd-src.tar && - appveyor PushArtifact zstd-src.tar.zst && - cd bin\ && 7z a -tzip -mx9 zstd-win-release-%PLATFORM%.zip * && + cd ..\bin\ && 7z a -tzip -mx9 zstd-win-release-%PLATFORM%.zip * && appveyor PushArtifact zstd-win-release-%PLATFORM%.zip ) ) From 52ca7c6c565579bfc732184597a30fa904656493 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Fri, 23 Mar 2018 18:45:42 -0700 Subject: [PATCH 3/4] make DYNAMIC_BMI2 support of clang conditional to __has_attribute() to support older clang versions such as 3.4 --- lib/common/compiler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common/compiler.h b/lib/common/compiler.h index bb8730126..a6044c861 100644 --- a/lib/common/compiler.h +++ b/lib/common/compiler.h @@ -74,7 +74,7 @@ * Enabled for clang & gcc >=4.8 on x86 when BMI2 isn't enabled by default. */ #ifndef DYNAMIC_BMI2 - #if defined(__clang__) \ + #if (defined(__clang__) && __has_attribute(__target__)) \ || (defined(__GNUC__) \ && (__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))) \ && (defined(__x86_64__) || defined(_M_X86)) \ From ad15c1b724f4c853ba7f23e234c85ef176ad2e27 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Fri, 23 Mar 2018 19:04:48 -0700 Subject: [PATCH 4/4] added __has_attribute() define for non-clang compilers --- lib/common/compiler.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/common/compiler.h b/lib/common/compiler.h index a6044c861..e90a3bcde 100644 --- a/lib/common/compiler.h +++ b/lib/common/compiler.h @@ -64,6 +64,9 @@ #endif /* target attribute */ +#ifndef __has_attribute + #define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ +#endif #if defined(__GNUC__) # define TARGET_ATTRIBUTE(target) __attribute__((__target__(target))) #else