mirror of
https://github.com/AngelAuraMC/angelauramc-openjdk-build.git
synced 2025-09-09 12:20:29 -04:00
Try wrapped clang with some warning suppressed
Clang works well on compiling OpenJDK 17, however suppressing warnings doesn't work even with `--with-extra-c(xx)flags` so I had to try this.
This commit is contained in:
parent
758c7f23c8
commit
3cd98c8822
1
android-wrapped-clang
Executable file
1
android-wrapped-clang
Executable file
@ -0,0 +1 @@
|
||||
exec $thecc "$@" -Wno-unknown-warning-option -Wno-unused-parameter -Wno-unused
|
1
android-wrapped-clang++
Executable file
1
android-wrapped-clang++
Executable file
@ -0,0 +1 @@
|
||||
exec $thecxx "$@" -Wno-unknown-warning-option -Wno-unused-parameter -Wno-unused
|
@ -27,6 +27,8 @@ export CFLAGS+=" -DLE_STANDALONE -DANDROID" # -I$FREETYPE_DIR -I$CUPS_DI
|
||||
# cp -R /usr/include/fontconfig $ANDROID_INCLUDE/
|
||||
|
||||
if [ "$BUILD_IOS" != "1" ]; then
|
||||
chmod +x android-wrapped-clang
|
||||
chmod +x android-wrapped-clang++
|
||||
ln -s -f /usr/include/X11 $ANDROID_INCLUDE/
|
||||
ln -s -f /usr/include/fontconfig $ANDROID_INCLUDE/
|
||||
AUTOCONF_x11arg="--x-includes=$ANDROID_INCLUDE/X11"
|
||||
|
@ -55,7 +55,7 @@ else
|
||||
export JVM_PLATFORM=linux
|
||||
# Set NDK
|
||||
export API=21
|
||||
export NDK=`pwd`/android-ndk-$NDK_VERSION
|
||||
export NDK=$PWD/android-ndk-$NDK_VERSION
|
||||
export TOOLCHAIN=$NDK/generated-toolchains/android-${TARGET_SHORT}-toolchain
|
||||
# export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64
|
||||
|
||||
@ -64,11 +64,14 @@ export ANDROID_INCLUDE=$TOOLCHAIN/sysroot/usr/include
|
||||
export CPPFLAGS="-I$ANDROID_INCLUDE -I$ANDROID_INCLUDE/$TARGET" # -I/usr/include -I/usr/lib
|
||||
export LDFLAGS="-L$NDK/platforms/android-$API/arch-$TARGET_SHORT/usr/lib"
|
||||
|
||||
export thecc=$TOOLCHAIN/bin/$TARGET-clang
|
||||
export thecxx=$TOOLCHAIN/bin/$TARGET-clang++
|
||||
|
||||
# Configure and build.
|
||||
export AR=$TOOLCHAIN/bin/$TARGET-ar
|
||||
export AS=$TOOLCHAIN/bin/$TARGET-as
|
||||
export CC=$TOOLCHAIN/bin/$TARGET-gcc
|
||||
export CXX=$TOOLCHAIN/bin/$TARGET-g++
|
||||
export CC=$PWD/android-wrapped-clang
|
||||
export CXX=$PWD/android-wrapped-clang++
|
||||
export LD=$TOOLCHAIN/bin/$TARGET-ld
|
||||
export OBJCOPY=$TOOLCHAIN/bin/$TARGET-objcopy
|
||||
export RANLIB=$TOOLCHAIN/bin/$TARGET-ranlib
|
||||
|
Loading…
x
Reference in New Issue
Block a user