-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[build] Fix ZSTD_LIB_MINIFY build option
`ZSTD_LIB_MINIFY` broke in 8bf699a. This commit fixes the macro and the static library shrinks from ~600K to 324K with ZSTD_LIB_MINIFY set. Fixes #3066.
- Loading branch information
Showing
3 changed files
with
69 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env python3 | ||
# ################################################################ | ||
# Copyright (c) Facebook, Inc. | ||
# All rights reserved. | ||
# | ||
# This source code is licensed under both the BSD-style license (found in the | ||
# LICENSE file in the root directory of this source tree) and the GPLv2 (found | ||
# in the COPYING file in the root directory of this source tree). | ||
# You may select, at your option, one of the above-listed licenses. | ||
# ################################################################ | ||
|
||
import os | ||
import subprocess | ||
import sys | ||
|
||
if len(sys.argv) != 3: | ||
print(f"Usage: {sys.argv[0]} FILE SIZE_LIMIT") | ||
sys.exit(1) | ||
|
||
file = sys.argv[1] | ||
limit = int(sys.argv[2]) | ||
|
||
if not os.path.exists(file): | ||
print(f"{file} does not exist") | ||
sys.exit(1) | ||
|
||
size = os.path.getsize(file) | ||
|
||
if size > limit: | ||
print(f"file {file} is {size} bytes, which is greater than the limit of {limit} bytes") | ||
sys.exit(1) |