Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-12-24 23:30:26 +01:00
Fix native compile as libdeflate moved to CMake
Fixes #890 correctly. Also rebuild the compression/encryption natives on macOS and Linux ARM64.
Dieser Commit ist enthalten in:
Ursprung
ef7ad150c2
Commit
f62768be9a
@ -13,13 +13,13 @@ fi
|
||||
|
||||
echo "Compiling libdeflate..."
|
||||
cd libdeflate || exit
|
||||
CFLAGS="-fPIC -O2 -fomit-frame-pointer" make
|
||||
cmake -B build && cmake --build build --target libdeflate_static
|
||||
cd ..
|
||||
|
||||
CFLAGS="-O2 -I$JAVA_HOME/include/ -I$JAVA_HOME/include/linux/ -fPIC -shared -Wl,-z,noexecstack -Wall -Werror -fomit-frame-pointer"
|
||||
ARCH=$(uname -m)
|
||||
mkdir -p src/main/resources/linux_$ARCH
|
||||
$CC $CFLAGS -Ilibdeflate src/main/c/jni_util.c src/main/c/jni_zlib_deflate.c src/main/c/jni_zlib_inflate.c \
|
||||
libdeflate/libdeflate.a -o src/main/resources/linux_$ARCH/velocity-compress.so
|
||||
libdeflate/build/libdeflate.a -o src/main/resources/linux_$ARCH/velocity-compress.so
|
||||
$CC $CFLAGS -shared src/main/c/jni_util.c src/main/c/jni_cipher_openssl.c \
|
||||
-o src/main/resources/linux_$ARCH/velocity-cipher.so -lcrypto
|
@ -11,13 +11,13 @@ fi
|
||||
|
||||
echo "Compiling libdeflate..."
|
||||
cd libdeflate || exit
|
||||
CFLAGS="-fPIC -O2 -fomit-frame-pointer" make
|
||||
cmake -B build && cmake --build build --target libdeflate_static
|
||||
cd ..
|
||||
|
||||
CFLAGS="-O2 -I$JAVA_HOME/include/ -I$JAVA_HOME/include/darwin/ -fPIC -shared -Wall -Werror -fomit-frame-pointer"
|
||||
ARCH=$(uname -m)
|
||||
mkdir -p src/main/resources/macos_$ARCH
|
||||
$CC $CFLAGS -Ilibdeflate src/main/c/jni_util.c src/main/c/jni_zlib_deflate.c src/main/c/jni_zlib_inflate.c \
|
||||
libdeflate/libdeflate.a -o src/main/resources/macos_$ARCH/velocity-compress.dylib
|
||||
libdeflate/build/libdeflate.a -o src/main/resources/macos_$ARCH/velocity-compress.dylib
|
||||
$CC $CFLAGS -shared src/main/c/jni_util.c src/main/c/jni_cipher_macos.c \
|
||||
-o src/main/resources/macos_$ARCH/velocity-cipher.dylib -lSystem
|
Binäre Datei nicht angezeigt.
Binäre Datei nicht angezeigt.
Binäre Datei nicht angezeigt.
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren