Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release ZStandard v1.4.9 #2515

Merged
merged 124 commits into from
Mar 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
f78917c
streamline zlibwrapper makefile
Cyan4973 Dec 20, 2020
eacf1b3
streamlined github action test
Cyan4973 Dec 20, 2020
9648bf0
try to keep libzstd.a "as is" once created
Cyan4973 Dec 21, 2020
f988403
fixed zstd recipe
Cyan4973 Dec 21, 2020
9a9d3f7
fixed zstd+sanitizer build
Cyan4973 Dec 21, 2020
52aa7f4
updated clang+msan test
Cyan4973 Dec 21, 2020
8233f55
verbose cross-compile tests on circleci
Cyan4973 Dec 21, 2020
5851963
fix ppc64 build on circleci
Cyan4973 Dec 21, 2020
7e11bd0
Implement skippable frame function
senhuang42 Dec 21, 2020
339d8ba
Add unit test
senhuang42 Dec 21, 2020
5c41490
Use pre-defined constants
senhuang42 Dec 21, 2020
8429525
Merge pull request #2437 from facebook/zlibwrap_make
Cyan4973 Dec 21, 2020
f2ac2b7
try to fix cross-compiler tests
Cyan4973 Dec 21, 2020
f1225b1
try to fix 32-bit test on github actions
Cyan4973 Dec 21, 2020
20afffe
Merge pull request #2440 from facebook/fixga32
Cyan4973 Dec 22, 2020
d4f7d75
Merge pull request #2438 from facebook/makej
Cyan4973 Dec 22, 2020
dd1a7e4
Add ifndef guards for _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE
indygreg Dec 26, 2020
f1585fe
remove flackey msan ossfuzz test
Cyan4973 Dec 28, 2020
603829d
Merge pull request #2444 from indygreg/dict-ifndef-guards
Cyan4973 Dec 28, 2020
cfff4c1
Merge pull request #2439 from senhuang42/skippable_frame_api
Cyan4973 Dec 28, 2020
7f8be04
fixed minor warnings introduced in #2439
Cyan4973 Dec 28, 2020
3fd21d5
Merge branch 'dev' into nomsanfuzz
Cyan4973 Dec 28, 2020
ff2f888
fixed one more minor cast issue
Cyan4973 Dec 29, 2020
a0835b5
Merge branch 'dev' into nomsanfuzz
Cyan4973 Dec 29, 2020
bc0a1e4
Merge pull request #2445 from facebook/nomsanfuzz
Cyan4973 Jan 3, 2021
66e811d
[license] Update year to 2021
terrelln Jan 4, 2021
e856052
Merge pull request #2452 from terrelln/2021
terrelln Jan 4, 2021
a98a6e2
[test][regression] Add no source size with dictionary test
terrelln Jan 4, 2021
9d31c70
Don't shrink window log when streaming with a dictionary
terrelln Jan 4, 2021
58476bc
Don't shrink window log in ZSTD_getCParams()
terrelln Jan 4, 2021
a077a6a
Merge pull request #2451 from terrelln/adjust-dict-2
terrelln Jan 5, 2021
0d793a6
removed internal dependency from CLI
Cyan4973 Jan 6, 2021
f011f63
Merge pull request #2454 from facebook/cycleLog_noDeps
Cyan4973 Jan 6, 2021
9866148
removed redundant tests
Cyan4973 Jan 6, 2021
890d85b
removed CLI dependency to legacy unsafe function
Cyan4973 Jan 7, 2021
cefdc02
The CLI can be linked to libzstd dynamic library
Cyan4973 Jan 7, 2021
f933668
Implement hashset for dictIDs
senhuang42 Dec 23, 2020
fd5b608
Add parameter to control multiple DDicts
senhuang42 Dec 23, 2020
5a6d3ee
Allocate memory for DDict hash set when parameter is set
senhuang42 Dec 23, 2020
d1a6a9d
Reference requested dict ID at decompression time
senhuang42 Dec 28, 2020
7c1a79f
Add debuglog statements
senhuang42 Dec 28, 2020
ea52fc3
Use XXHash for hash function, create a sensible public interface
senhuang42 Dec 28, 2020
22b7bff
Add unit test, improve documentation
senhuang42 Dec 28, 2020
c2c9b8a
Address comments, clean up interface/internals
senhuang42 Jan 7, 2021
1722265
Add streaming decompression to unit test
senhuang42 Jan 7, 2021
4f7584e
Allow freestanding lib script regex to detect XXH64(
senhuang42 Jan 7, 2021
f9802d8
fix typos (work done by Andrea Gelmini)
ThomasWaldmann Jan 7, 2021
7a620b1
Merge pull request #2455 from facebook/lessTests
Cyan4973 Jan 7, 2021
2901b5e
Merge branch 'dev' into cli-dll
Cyan4973 Jan 7, 2021
3324e87
Added library version check
Cyan4973 Jan 7, 2021
92a2b5c
fixup: lits means literals
ThomasWaldmann Jan 7, 2021
9ae0dd9
Fix Visual and staticanalyze warnings
senhuang42 Jan 7, 2021
c416015
Merge pull request #2459 from ThomasWaldmann/fix-typos
Cyan4973 Jan 8, 2021
33b73db
Merge pull request #2457 from facebook/cli-dll
Cyan4973 Jan 8, 2021
69085db
Merge pull request #2446 from senhuang42/multiple_ddicts_v3
senhuang42 Jan 8, 2021
821d9ac
Fix visibility of symbols in .so (#2441)
yumeyao Jan 8, 2021
0766540
cmake: use configure_file() for creating the .pc file
lazka Jan 9, 2021
1d6d64a
Change year to 2021 for compression format file
senhuang42 Jan 11, 2021
e7b7820
Merge pull request #2462 from lazka/cmake-fix-pc-escaping
terrelln Jan 11, 2021
7e6c53c
Merge pull request #2465 from senhuang42/cformat_2021
senhuang42 Jan 11, 2021
8b6a4b5
Allow Input From Console When `--force` is Passed
felixhandte Jan 11, 2021
927859f
Also Update Man Page Documentation
felixhandte Jan 11, 2021
b45d22c
[contrib][recovery] Add recovery_directory program
terrelln Jan 15, 2021
649a766
Merge pull request #2473 from terrelln/recovery
terrelln Jan 15, 2021
7c2a17e
Merge pull request #2466 from felixhandte/force-stdin-console
Cyan4973 Jan 18, 2021
0bad3e5
parallel make build on linux
Cyan4973 Jan 18, 2021
7e67290
Merge pull request #2475 from facebook/parallel_build
Cyan4973 Jan 19, 2021
1e65711
a couple performance improvement changes for ldm
mpu Jan 8, 2021
e0d5eca
fix forgotten numTagBits in getTagMask
mpu Jan 11, 2021
d6e3de7
fix warning and remove one more occurrence of makeEntryAndInsertByTag
mpu Jan 20, 2021
aee3dc8
fix a variable name to reflect its nature
mpu Jan 22, 2021
f5b3f64
Merge pull request #2464 from mpu/ldmfixes
terrelln Jan 22, 2021
9f327c0
new core ldm algorithm
mpu Jan 11, 2021
874a590
deal safely with short inputs in ZSTD_ldm_generateSequences
mpu Feb 4, 2021
134be27
removed flackey gcc6 tests
Cyan4973 Feb 5, 2021
b974875
fixed minor cast warning
Cyan4973 Feb 5, 2021
b5e990d
Merge pull request #2487 from facebook/fixcast
Cyan4973 Feb 5, 2021
824dff4
Merge pull request #2486 from facebook/nogcc6
Cyan4973 Feb 5, 2021
f9b1e71
[zstd] Fix NULL pointer addition in ZSTD_checkContinuity()
terrelln Feb 5, 2021
e926e9c
Merge pull request #2488 from terrelln/continuity
terrelln Feb 6, 2021
54a4998
Add basic tracing functionality
terrelln Feb 4, 2021
856f38e
Merge pull request #2482 from terrelln/tracing
terrelln Feb 6, 2021
2636f53
CMake: Enable only C for lib and programs projects
concatime Feb 8, 2021
e2ad174
fix some compiler warnings
mpu Feb 8, 2021
e59c945
[trace] Keep track of a uint64_t tracing context
terrelln Feb 9, 2021
a294a19
Merge pull request #2490 from terrelln/tracing
terrelln Feb 9, 2021
552efca
relocate large arrays from the stack to ldmState_t
mpu Feb 10, 2021
74f8581
Use standard md5 tool on NetBSD.
alarixnia Feb 11, 2021
8884cb8
Merge pull request #2483 from mpu/ldmgear
Cyan4973 Feb 11, 2021
f520f6d
[trace] Minor fixes found during integration
terrelln Feb 12, 2021
3ac842d
Merge pull request #2496 from terrelln/tracing
terrelln Feb 12, 2021
c62eb05
[lib] Set appliedParams.compressionLevel correctly
terrelln Feb 12, 2021
f39178b
Merge pull request #2497 from terrelln/tracing
terrelln Feb 13, 2021
7736549
[bug-fix] Make simple single-pass functions ignore advanced parameters
terrelln Feb 13, 2021
bb6ca68
Merge pull request #2498 from terrelln/old-api-fix
terrelln Feb 16, 2021
444c465
Add newline to end of cli help message
senhuang42 Feb 17, 2021
b2bff75
Merge pull request #2500 from senhuang42/add_cli_newline
Cyan4973 Feb 17, 2021
a774c57
Use umask() to Constrain Created File Permissions
felixhandte Feb 11, 2021
a2adc6d
Merge pull request #2495 from felixhandte/umask
felixhandte Feb 17, 2021
9b07721
fix ubsan test errors
Cyan4973 Feb 19, 2021
91e6480
[fuzz] Fix compiler detection & update ubsan flags
terrelln Feb 19, 2021
f7cffb5
Merge pull request #2503 from terrelln/fuzz-ubsan
Cyan4973 Feb 20, 2021
f2c0312
removing signed integer overflow exception from ubsan tests
Cyan4973 Feb 20, 2021
c79411a
Merge pull request #2502 from facebook/ubsanfix
Cyan4973 Feb 20, 2021
08fef03
update FreeBSD image to latest 12.2
Cyan4973 Feb 23, 2021
adb5429
Stop using deprecated reset?Stream functions
skitt Feb 20, 2021
3d91ab7
disabled icc tests on Github Actions
Cyan4973 Feb 23, 2021
d1c0ae9
Merge pull request #2504 from skitt/stop-using-resetxstream
Cyan4973 Feb 23, 2021
99dde00
Merge pull request #2507 from facebook/freebsd12_2
Cyan4973 Feb 23, 2021
59b2c59
[regression] Update results.csv
terrelln Feb 23, 2021
390e050
Merge pull request #2508 from terrelln/regression
terrelln Feb 24, 2021
c03e130
Merge pull request #2489 from concatime/cmake-c-lib-programs
Cyan4973 Feb 24, 2021
61b63e9
Merge pull request #2492 from niacat/dev
Cyan4973 Feb 25, 2021
04139c3
[regression] Update results.csv
terrelln Feb 25, 2021
aad85f1
Merge pull request #2510 from terrelln/regression
terrelln Feb 25, 2021
61db590
Detect `..` in Paths Correctly
felixhandte Feb 26, 2021
9b7f9d2
Cover These Edge Cases in Tests
felixhandte Feb 26, 2021
221e465
Avoid Using `stat -c` on NetBSD
felixhandte Feb 26, 2021
45ee23f
Merge pull request #2512 from felixhandte/fix-2509
felixhandte Feb 26, 2021
aec1e8c
Merge pull request #2513 from felixhandte/fix-2493
felixhandte Feb 26, 2021
d7db928
Bump Library Version 1.4.8 -> 1.4.9
felixhandte Mar 1, 2021
0f1a52b
Documentation Rebuild
felixhandte Mar 1, 2021
3835957
Update CHANGELOG
felixhandte Mar 1, 2021
74d65ea
Merge pull request #2514 from felixhandte/v1.4.9
felixhandte Mar 2, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ jobs:
command: |
make gnu90build; make clean
make gnu99build; make clean
make ppc64build; make clean
make ppcbuild ; make clean
make armbuild ; make clean
make ppc64build V=1; make clean
make ppcbuild V=1; make clean
make armbuild V=1; make clean
make -C tests test-legacy test-longmatch; make clean
make -C lib libzstd-nomt; make clean
# This step is only run on release tags.
Expand Down
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ task:
name: FreeBSD (shortest)
freebsd_instance:
matrix:
image_family: freebsd-12-1
image_family: freebsd-12-2
# The stable 11.3 image causes "Agent is not responding" so use a snapshot
image_family: freebsd-11-3-snap
install_script: pkg install -y gmake coreutils
Expand Down
95 changes: 42 additions & 53 deletions .github/workflows/generic-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,17 @@ jobs:
- uses: actions/checkout@v2
- name: make check on 32-bit
run: |
make libc6install
sudo apt update
APT_PACKAGES="gcc-multilib" make apt-install
CFLAGS="-m32 -O1 -fstack-protector" make check V=1

gcc-6-7-libzstd:
gcc-7-libzstd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: gcc-6 + gcc-7 + libzstdmt compilation
- name: gcc-7 + libzstdmt compilation
run: |
make gcc6install gcc7install
CC=gcc-6 CFLAGS=-Werror make -j all
make clean
make gcc7install
CC=gcc-7 CFLAGS=-Werror make -j all
make clean
LDFLAGS=-Wl,--no-undefined make -C lib libzstd-mt
Expand All @@ -71,30 +70,28 @@ jobs:
make gcc8install
CC=gcc-8 CFLAGS="-Werror" make -j all
make clean
CC=gcc-8 make -j uasan-test-zstd </dev/null
CC=gcc-8 make -j uasan-test-zstd </dev/null V=1

gcc-6-asan-ubsan-testzstd-32bit:
gcc-asan-ubsan-testzstd-32bit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: gcc-6 + ASan + UBSan + Test Zstd, 32bit mode
- name: ASan + UBSan + Test Zstd, 32bit mode
run: |
make gcc6install libc6install
CC=gcc-6 CFLAGS="-Werror -m32" make -j all32
make libc6install
CFLAGS="-Werror -m32" make -j all32
make clean
CC=gcc-6 make -j uasan-test-zstd32
make -j uasan-test-zstd32 V=1

clang-38-msan-testzstd:
runs-on: ubuntu-16.04 # fails on 18.04
clang-msan-testzstd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: clang-3.8 + MSan + Test Zstd
- name: clang + MSan + Test Zstd
run: |
# make clang38install (doesn't work)
sudo apt-add-repository "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.8 main"
sudo apt-get update
sudo apt-get install clang-3.8
CC=clang-3.8 make clean msan-test-zstd HAVE_ZLIB=0 HAVE_LZ4=0 HAVE_LZMA=0
sudo apt-get install clang
CC=clang make msan-test-zstd HAVE_ZLIB=0 HAVE_LZ4=0 HAVE_LZMA=0 V=1

# Note : external libraries must be turned off when using MSAN tests,
# because they are not msan-instrumented,
Expand All @@ -120,26 +117,14 @@ jobs:
make gcc8install
CC=gcc-8 FUZZER_FLAGS="--long-tests" make clean uasan-fuzztest

gcc-6-asan-ubsan-fuzz32:
gcc-asan-ubsan-fuzz32:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: gcc-6 + ASan + UBSan + Fuzz Test 32bit
run: |
make gcc6install libc6install
CC=gcc-6 CFLAGS="-O2 -m32" FUZZER_FLAGS="--long-tests" make uasan-fuzztest

clang-38-msan-fuzz:
runs-on: ubuntu-16.04 # fails on 18.04
steps:
- uses: actions/checkout@v2
- name: clang-3.8 + MSan + Fuzz Test
- name: ASan + UBSan + Fuzz Test 32bit
run: |
# make clang38install (doesn't work)
sudo apt-add-repository "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.8 main"
sudo apt-get update
sudo apt-get install clang-3.8
CC=clang-3.8 make clean msan-fuzztest
make libc6install
CFLAGS="-O2 -m32" FUZZER_FLAGS="--long-tests" make uasan-fuzztest

asan-ubsan-msan-regression:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -205,21 +190,25 @@ jobs:
tar -xf shellcheck-v0.7.1.linux.x86_64.tar.xz
shellcheck-v0.7.1/shellcheck --shell=sh --severity=warning --exclude=SC2010 tests/playTests.sh

icc:
name: icc-check
runs-on: ubuntu-latest
steps:
- name: install icc
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-get -qqq update
sudo apt-get install -y wget build-essential pkg-config cmake ca-certificates gnupg
sudo wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
sudo apt-get update
sudo apt-get install -y intel-basekit intel-hpckit
- uses: actions/checkout@v2
- name: make check
run: |
make CC=/opt/intel/oneapi/compiler/latest/linux/bin/intel64/icc check
# For reference : icc tests
# icc tests are currently failing on Github Actions, likely to issues during installation stage
# To be fixed later
#
# icc:
# name: icc-check
# runs-on: ubuntu-latest
# steps:
# - name: install icc
# run: |
# export DEBIAN_FRONTEND=noninteractive
# sudo apt-get -qqq update
# sudo apt-get install -y wget build-essential pkg-config cmake ca-certificates gnupg
# sudo wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
# sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
# sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
# sudo apt-get update
# sudo apt-get install -y intel-basekit intel-hpckit
# - uses: actions/checkout@v2
# - name: make check
# run: |
# make CC=/opt/intel/oneapi/compiler/latest/linux/bin/intel64/icc check
11 changes: 4 additions & 7 deletions .github/workflows/generic-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,21 @@ jobs:
make -C tests test-zbuff

tsan:
runs-on: ubuntu-16.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: thread sanitizer
run: |
sudo apt-add-repository "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.8 main"
sudo apt-get update
sudo apt-get install clang-3.8
CC=clang-3.8 make tsan-test-zstream
CC=clang-3.8 make tsan-fuzztest
CC=clang make tsan-test-zstream
CC=clang make tsan-fuzztest

zlib-wrapper:
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v2
- name: zlib wrapper test
run: |
make gpp6install valgrindinstall
make valgrindinstall
make -C zlibWrapper test
make -C zlibWrapper valgrindTest

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
strategy:
fail-fast: false
matrix:
sanitizer: [address, undefined, memory]
sanitizer: [address, undefined]
steps:
- name: Build Fuzzers (${{ matrix.sanitizer }})
id: build
Expand Down
5 changes: 0 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ matrix:
script:
- make check

- name: make test (complete)
script:
# DEVNULLRIGHTS : will request sudo rights to test permissions on /dev/null
- DEVNULLRIGHTS=test make test

- name: Minimal Decompressor Macros # ~5mn
script:
- make clean && make -j all ZSTD_LIB_MINIFY=1 MOREFLAGS="-Werror"
Expand Down
26 changes: 26 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
v1.4.9 (Mar 1, 2021)
bug: Use `umask()` to Constrain Created File Permissions (#2495, @felixhandte)
bug: Make Simple Single-Pass Functions Ignore Advanced Parameters (#2498, @terrelln)
api: Add (De)Compression Tracing Functionality (#2482, @terrelln)
api: Support References to Multiple DDicts (#2446, @senhuang42)
api: Add Function to Generate Skippable Frame (#2439, @senhuang42)
perf: New Algorithms for the Long Distance Matcher (#2483, @mpu)
perf: Performance Improvements for Long Distance Matcher (#2464, @mpu)
perf: Don't Shrink Window Log when Streaming with a Dictionary (#2451, @terrelln)
cli: Fix `--output-dir-mirror`'s Rejection of `..`-Containing Paths (#2512, @felixhandte)
cli: Allow Input From Console When `-f`/`--force` is Passed (#2466, @felixhandte)
cli: Improve Help Message (#2500, @senhuang42)
tests: Remove Flaky Tests (#2455, #2486, #2445, @Cyan4973)
tests: Correctly Invoke md5 Utility on NetBSD (#2492, @niacat)
tests: Avoid Using `stat -c` on NetBSD (#2513, @felixhandte)
build: Zstd CLI Can Now be Linked to Dynamic `libzstd` (#2457, #2454 @Cyan4973)
build: Hide and Avoid Using Static-Only Symbols (#2501, #2504, @skitt)
build: CMake: Enable Only C for lib/ and programs/ Projects (#2498, @concatime)
build: CMake: Use `configure_file()` to Create the `.pc` File (#2462, @lazka)
build: Fix Fuzzer Compiler Detection & Update UBSAN Flags (#2503, @terrelln)
build: Add Guards for `_LARGEFILE_SOURCE` and `_LARGEFILE64_SOURCE` (#2444, @indygreg)
build: Improve `zlibwrapper` Makefile (#2437, @Cyan4973)
contrib: Add `recover_directory` Program (#2473, @terrelln)
doc: Change License Year to 2021 (#2452 & #2465, @terrelln & @senhuang42)
doc: Fix Typos (#2459, @ThomasWaldmann)

v1.4.8 (Dec 18, 2020)
hotfix: wrong alignment of an internal buffer

Expand Down
24 changes: 11 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ################################################################
# Copyright (c) 2015-2020, Yann Collet, Facebook, Inc.
# Copyright (c) 2015-2021, Yann Collet, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under both the BSD-style license (found in the
Expand Down Expand Up @@ -48,7 +48,7 @@ allmost: allzstd zlibwrapper

# skip zwrapper, can't build that on alternate architectures without the proper zlib installed
.PHONY: allzstd
allzstd: lib-all
allzstd: lib
$(Q)$(MAKE) -C $(PRGDIR) all
$(Q)$(MAKE) -C $(TESTDIR) all

Expand All @@ -57,9 +57,8 @@ all32:
$(MAKE) -C $(PRGDIR) zstd32
$(MAKE) -C $(TESTDIR) all32

.PHONY: lib lib-release libzstd.a
lib-all : lib
lib lib-release lib-all :
.PHONY: lib lib-release
lib lib-release :
$(Q)$(MAKE) -C $(ZSTDDIR) $@

.PHONY: zstd zstd-release
Expand Down Expand Up @@ -225,10 +224,10 @@ aarch64build: clean
CC=aarch64-linux-gnu-gcc CFLAGS="-Werror" $(MAKE) allzstd

ppcbuild: clean
CC=powerpc-linux-gnu-gcc CFLAGS="-m32 -Wno-attributes -Werror" $(MAKE) allzstd
CC=powerpc-linux-gnu-gcc CFLAGS="-m32 -Wno-attributes -Werror" $(MAKE) -j allzstd

ppc64build: clean
CC=powerpc-linux-gnu-gcc CFLAGS="-m64 -Werror" $(MAKE) allzstd
CC=powerpc-linux-gnu-gcc CFLAGS="-m64 -Werror" $(MAKE) -j allzstd

armfuzz: clean
CC=arm-linux-gnueabi-gcc QEMU_SYS=qemu-arm-static MOREFLAGS="-static" FUZZER_FLAGS=--no-big-tests $(MAKE) -C $(TESTDIR) fuzztest
Expand Down Expand Up @@ -287,12 +286,11 @@ uasanregressiontest:
msanregressiontest:
$(MAKE) -C $(FUZZDIR) regressiontest CC=clang CXX=clang++ CFLAGS="-O3 -fsanitize=memory" CXXFLAGS="-O3 -fsanitize=memory"

# run UBsan with -fsanitize-recover=signed-integer-overflow
# due to a bug in UBsan when doing pointer subtraction
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63303
# run UBsan with -fsanitize-recover=pointer-overflow
# this only works with recent compilers such as gcc 8+

usan: clean
$(MAKE) test CC=clang MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize-recover=signed-integer-overflow -fsanitize=undefined -Werror"
$(MAKE) test CC=clang MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize-recover=pointer-overflow -fsanitize=undefined -Werror"

asan: clean
$(MAKE) test CC=clang MOREFLAGS="-g -fsanitize=address -Werror"
Expand All @@ -310,10 +308,10 @@ asan32: clean
$(MAKE) -C $(TESTDIR) test32 CC=clang MOREFLAGS="-g -fsanitize=address"

uasan: clean
$(MAKE) test CC=clang MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize-recover=signed-integer-overflow -fsanitize=address,undefined -Werror"
$(MAKE) test CC=clang MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize-recover=pointer-overflow -fsanitize=address,undefined -Werror"

uasan-%: clean
LDFLAGS=-fuse-ld=gold MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize-recover=signed-integer-overflow -fsanitize=address,undefined -Werror" $(MAKE) -C $(TESTDIR) $*
LDFLAGS=-fuse-ld=gold MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize-recover=pointer-overflow -fsanitize=address,undefined -Werror" $(MAKE) -C $(TESTDIR) $*

tsan-%: clean
LDFLAGS=-fuse-ld=gold MOREFLAGS="-g -fno-sanitize-recover=all -fsanitize=thread -Werror" $(MAKE) -C $(TESTDIR) $* FUZZER_FLAGS=--no-big-tests
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
- COMPILER: "clang"
HOST: "mingw"
PLATFORM: "x64"
SCRIPT: "MOREFLAGS='--target=x86_64-w64-mingw32 -Werror -Wconversion -Wno-sign-conversion' make allzstd"
SCRIPT: "MOREFLAGS='--target=x86_64-w64-mingw32 -Werror -Wconversion -Wno-sign-conversion' make -j allzstd V=1"
BUILD: "true"

- COMPILER: "gcc"
Expand Down Expand Up @@ -204,7 +204,7 @@
- COMPILER: "clang"
HOST: "mingw"
PLATFORM: "x64"
SCRIPT: "CFLAGS='--target=x86_64-w64-mingw32 -Werror -Wconversion -Wno-sign-conversion' make -j allzstd"
SCRIPT: "CFLAGS='--target=x86_64-w64-mingw32 -Werror -Wconversion -Wno-sign-conversion' make -j allzstd V=1"

- COMPILER: "visual"
HOST: "visual"
Expand Down
4 changes: 4 additions & 0 deletions build/VS2008/zstd/zstd.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,10 @@
RelativePath="..\..\..\programs\zstdcli.c"
>
</File>
<File
RelativePath="..\..\..\programs\zstdcli_trace.c"
>
</File>
<File
RelativePath="..\..\..\lib\compress\zstdmt_compress.c"
>
Expand Down
1 change: 1 addition & 0 deletions build/VS2010/zstd/zstd.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
<ClCompile Include="..\..\..\programs\dibio.c" />
<ClCompile Include="..\..\..\programs\fileio.c" />
<ClCompile Include="..\..\..\programs\zstdcli.c" />
<ClCompile Include="..\..\..\programs\zstdcli_trace.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\lib\common\pool.h" />
Expand Down
21 changes: 5 additions & 16 deletions build/cmake/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# in the COPYING file in the root directory of this source tree).
# ################################################################

project(libzstd)
project(libzstd C)

set(CMAKE_INCLUDE_CURRENT_DIR TRUE)
option(ZSTD_BUILD_STATIC "BUILD STATIC LIBRARIES" ON)
Expand Down Expand Up @@ -137,7 +137,7 @@ endif ()
if (UNIX OR MINGW)
# pkg-config
set(PREFIX "${CMAKE_INSTALL_PREFIX}")
set(EXEC_PREFIX "\\$$\{prefix}")
set(EXEC_PREFIX "\${prefix}")
set(LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}")
set(INCLUDEDIR "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
set(VERSION "${zstd_VERSION}")
Expand All @@ -149,24 +149,13 @@ if (UNIX OR MINGW)
string(SUBSTRING "${INCLUDEDIR}" ${PREFIX_LENGTH} -1 INCLUDEDIR_SUFFIX)

if ("${INCLUDEDIR_PREFIX}" STREQUAL "${PREFIX}")
set(INCLUDEDIR_PREFIX "\\$$\{prefix}")
set(INCLUDEDIR "\${prefix}${INCLUDEDIR_SUFFIX}")
endif()
if ("${LIBDIR_PREFIX}" STREQUAL "${PREFIX}")
set(LIBDIR_PREFIX "\\$$\{exec_prefix}")
set(LIBDIR "\${exec_prefix}${LIBDIR_SUFFIX}")
endif()

add_custom_target(libzstd.pc ALL
${CMAKE_COMMAND}
-DIN=${LIBRARY_DIR}/libzstd.pc.in
-DOUT="libzstd.pc"
-DPREFIX="${PREFIX}"
-DEXEC_PREFIX="${EXEC_PREFIX}"
-DINCLUDEDIR="${INCLUDEDIR_PREFIX}${INCLUDEDIR_SUFFIX}"
-DLIBDIR="${LIBDIR_PREFIX}${LIBDIR_SUFFIX}"
-DVERSION="${VERSION}"
-P ${CMAKE_CURRENT_SOURCE_DIR}/pkgconfig.cmake
COMMENT "Creating pkg-config file")

configure_file("${LIBRARY_DIR}/libzstd.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libzstd.pc" @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libzstd.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
endif ()

Expand Down
1 change: 0 additions & 1 deletion build/cmake/lib/pkgconfig.cmake

This file was deleted.

Loading