Don't export ZSTD_ symbols (reduce wasm size)
This commit is contained in:
parent
714105a7bc
commit
e6c725bf54
1
Makefile
1
Makefile
|
@ -207,6 +207,7 @@ build/zstddeclib.o: lib/zstd/zstddeclib.c
|
|||
mkdir -p build
|
||||
clang -c -Wall \
|
||||
--target=wasm32 -O3 -flto -nostdlib -fvisibility=hidden -ffunction-sections -fdata-sections \
|
||||
-DZSTDLIB_VISIBILITY="" \
|
||||
-o build/zstddeclib.o \
|
||||
lib/zstd/zstddeclib.c
|
||||
|
||||
|
|
|
@ -198,7 +198,7 @@ CPU.prototype.create_jit_imports = function()
|
|||
|
||||
for(let name of Object.keys(this.wm.exports))
|
||||
{
|
||||
if(name.startsWith("_") || name.startsWith("ZSTD") || name.startsWith("zstd") || name.endsWith("_js"))
|
||||
if(name.startsWith("_") || name.startsWith("zstd") || name.endsWith("_js"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue