Merge pull request #4554 from facebook/no_legacy
Remove legacy support by default
This commit is contained in:
@@ -57,7 +57,7 @@ cxx_library(
|
||||
srcs=glob(['legacy/*.c']),
|
||||
deps=[':common'],
|
||||
exported_preprocessor_flags=[
|
||||
'-DZSTD_LEGACY_SUPPORT=4',
|
||||
'-DZSTD_LEGACY_SUPPORT=0',
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
+4
-3
@@ -12,8 +12,9 @@ including commands variables, staged install, directory variables and standard t
|
||||
- `make` : generates both static and dynamic libraries
|
||||
- `make install` : install libraries, headers and pkg-config in local system directories
|
||||
|
||||
`libzstd` default scope is extensive, including compression, decompression, dictionary builder,
|
||||
and support for decoding legacy formats >= v0.5.0 by default.
|
||||
`libzstd` default scope includes compression, decompression, and dictionary builder.
|
||||
Note: starting v1.6.0, support for decoding legacy formats is disabled by default.
|
||||
See _modular build_ below to learn how to enable it.
|
||||
The scope can be reduced on demand (see paragraph _modular build_).
|
||||
|
||||
#### Multiarch Support
|
||||
@@ -99,7 +100,7 @@ The file structure is designed to make this selection manually achievable for an
|
||||
Specifying a number limits versions supported to that version onward.
|
||||
For example, `ZSTD_LEGACY_SUPPORT=2` means : "support legacy formats >= v0.2.0".
|
||||
Conversely, `ZSTD_LEGACY_SUPPORT=0` means "do __not__ support legacy formats".
|
||||
By default, this build macro is set as `ZSTD_LEGACY_SUPPORT=5`.
|
||||
By default, this build macro is set as `ZSTD_LEGACY_SUPPORT=0` (disabled).
|
||||
Decoding supported legacy format is a transparent capability triggered within decompression functions.
|
||||
It's also allowed to invoke legacy API directly, exposed in `lib/legacy/zstd_legacy.h`.
|
||||
Each version does also provide its own set of advanced API.
|
||||
|
||||
+2
-6
@@ -28,12 +28,8 @@ LIB_BINDIR ?= $(LIB_SRCDIR)
|
||||
# configures a bunch of other variables to space-optimized defaults.
|
||||
ZSTD_LIB_MINIFY ?= 0
|
||||
|
||||
# Legacy support
|
||||
ifneq ($(ZSTD_LIB_MINIFY), 0)
|
||||
ZSTD_LEGACY_SUPPORT ?= 0
|
||||
else
|
||||
ZSTD_LEGACY_SUPPORT ?= 5
|
||||
endif
|
||||
# Legacy support disabled by default
|
||||
ZSTD_LEGACY_SUPPORT ?= 0
|
||||
ZSTD_LEGACY_MULTITHREADED_API ?= 0
|
||||
|
||||
# Build size optimizations
|
||||
|
||||
+2
-2
@@ -110,8 +110,8 @@ extern "C" {
|
||||
|
||||
/*------ Version ------*/
|
||||
#define ZSTD_VERSION_MAJOR 1
|
||||
#define ZSTD_VERSION_MINOR 5
|
||||
#define ZSTD_VERSION_RELEASE 8
|
||||
#define ZSTD_VERSION_MINOR 6
|
||||
#define ZSTD_VERSION_RELEASE 0
|
||||
#define ZSTD_VERSION_NUMBER (ZSTD_VERSION_MAJOR *100*100 + ZSTD_VERSION_MINOR *100 + ZSTD_VERSION_RELEASE)
|
||||
|
||||
/*! ZSTD_versionNumber() :
|
||||
|
||||
Reference in New Issue
Block a user