mirror of
https://github.com/facebook/zstd.git
synced 2025-12-07 00:02:39 -05:00
Avoid xxHash Dependency by Inlining
xxHash symbols are present in `libzstd.so`, but they are local and therefore unavailable outside the lib. There are two possible solutions to the problem. We could make those symbols global, or we could remove the dependency. This commit chooses the latter approach. I suppose this comes at the cost of code size / build time. I'm open to comments on whether this is a good thing to do, especially since this will apply even when we are statically linking everything.
This commit is contained in:
parent
fc946d131b
commit
4bd96a61f1
@ -31,9 +31,14 @@
|
|||||||
#include "timefn.h" /* UTIL_time_t */
|
#include "timefn.h" /* UTIL_time_t */
|
||||||
#include "benchfn.h"
|
#include "benchfn.h"
|
||||||
#include "../lib/common/mem.h"
|
#include "../lib/common/mem.h"
|
||||||
|
#ifndef ZSTD_STATIC_LINKING_ONLY
|
||||||
#define ZSTD_STATIC_LINKING_ONLY
|
#define ZSTD_STATIC_LINKING_ONLY
|
||||||
|
#endif
|
||||||
#include "../lib/zstd.h"
|
#include "../lib/zstd.h"
|
||||||
#include "datagen.h" /* RDG_genBuffer */
|
#include "datagen.h" /* RDG_genBuffer */
|
||||||
|
#ifndef XXH_INLINE_ALL
|
||||||
|
#define XXH_INLINE_ALL
|
||||||
|
#endif
|
||||||
#include "../lib/common/xxhash.h"
|
#include "../lib/common/xxhash.h"
|
||||||
#include "benchzstd.h"
|
#include "benchzstd.h"
|
||||||
#include "../lib/zstd_errors.h"
|
#include "../lib/zstd_errors.h"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user