Merge pull request #2864 from terrelln/linux-opt
[linux-kernel] Don't inline function in zstd_opt.c
This commit is contained in:
@@ -41,7 +41,6 @@ libzstd:
|
|||||||
-DZSTD_MEMORY_SANITIZER=0 \
|
-DZSTD_MEMORY_SANITIZER=0 \
|
||||||
-DZSTD_DATAFLOW_SANITIZER=0 \
|
-DZSTD_DATAFLOW_SANITIZER=0 \
|
||||||
-DZSTD_COMPRESS_HEAPMODE=1 \
|
-DZSTD_COMPRESS_HEAPMODE=1 \
|
||||||
-UZSTD_NO_INLINE \
|
|
||||||
-UNO_PREFETCH \
|
-UNO_PREFETCH \
|
||||||
-U__cplusplus \
|
-U__cplusplus \
|
||||||
-UZSTD_DLL_EXPORT \
|
-UZSTD_DLL_EXPORT \
|
||||||
@@ -55,7 +54,8 @@ libzstd:
|
|||||||
-RZSTD_FALLTHROUGH=fallthrough \
|
-RZSTD_FALLTHROUGH=fallthrough \
|
||||||
-DZSTD_HAVE_WEAK_SYMBOLS=0 \
|
-DZSTD_HAVE_WEAK_SYMBOLS=0 \
|
||||||
-DZSTD_TRACE=0 \
|
-DZSTD_TRACE=0 \
|
||||||
-DZSTD_NO_TRACE
|
-DZSTD_NO_TRACE \
|
||||||
|
-DZSTD_LINUX_KERNEL
|
||||||
mv linux/lib/zstd/zstd.h linux/include/linux/zstd_lib.h
|
mv linux/lib/zstd/zstd.h linux/include/linux/zstd_lib.h
|
||||||
mv linux/lib/zstd/zstd_errors.h linux/include/linux/
|
mv linux/lib/zstd/zstd_errors.h linux/include/linux/
|
||||||
cp linux_zstd.h linux/include/linux/zstd.h
|
cp linux_zstd.h linux/include/linux/zstd.h
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ test_not_present "ZSTD_NO_INTRINSICS"
|
|||||||
test_not_present "ZSTD_NO_UNUSED_FUNCTIONS"
|
test_not_present "ZSTD_NO_UNUSED_FUNCTIONS"
|
||||||
test_not_present "ZSTD_LEGACY_SUPPORT"
|
test_not_present "ZSTD_LEGACY_SUPPORT"
|
||||||
test_not_present "STATIC_BMI2"
|
test_not_present "STATIC_BMI2"
|
||||||
test_not_present "ZSTD_NO_INLINE"
|
|
||||||
test_not_present "ZSTD_DLL_EXPORT"
|
test_not_present "ZSTD_DLL_EXPORT"
|
||||||
test_not_present "ZSTD_DLL_IMPORT"
|
test_not_present "ZSTD_DLL_IMPORT"
|
||||||
test_not_present "__ICCARM__"
|
test_not_present "__ICCARM__"
|
||||||
|
|||||||
@@ -8,6 +8,20 @@
|
|||||||
* You may select, at your option, one of the above-listed licenses.
|
* You may select, at your option, one of the above-listed licenses.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Disable inlining for the optimal parser for the kernel build.
|
||||||
|
* It is unlikely to be used in the kernel, and where it is used
|
||||||
|
* latency shouldn't matter because it is very slow to begin with.
|
||||||
|
* We prefer a ~180KB binary size win over faster optimal parsing.
|
||||||
|
*
|
||||||
|
* TODO(https://github.com/facebook/zstd/issues/2862):
|
||||||
|
* Improve the code size of the optimal parser in general, so we
|
||||||
|
* don't need this hack for the kernel build.
|
||||||
|
*/
|
||||||
|
#ifdef ZSTD_LINUX_KERNEL
|
||||||
|
#define ZSTD_NO_INLINE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "zstd_compress_internal.h"
|
#include "zstd_compress_internal.h"
|
||||||
#include "hist.h"
|
#include "hist.h"
|
||||||
#include "zstd_opt.h"
|
#include "zstd_opt.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user