Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,9 @@ jobs:
run: |
mkdir downloads
pushd downloads
curl -OL https://dl.google.com/android/repository/android-ndk-r25b-linux.zip
curl -OL https://dl.google.com/android/repository/android-ndk-r28c-linux.zip
mkdir -p $NDK
unzip android-ndk-r25b-linux.zip -d $NDK && f=("$NDK"/*) && mv "$NDK"/*/* "$NDK" && rmdir "${f[@]}"
unzip android-ndk-r28c-linux.zip -d $NDK && f=("$NDK"/*) && mv "$NDK"/*/* "$NDK" && rmdir "${f[@]}"
- name: Build
run: |
Expand Down Expand Up @@ -546,7 +546,7 @@ jobs:
arch: x86_64
api-level: 30
target: google_apis
ndk: 25.1.8937393
ndk: 28.2.13676358
emulator-options: -no-window -noaudio -no-boot-anim -camera-back none -port 5554
emulator-boot-timeout: 900
script: |
Expand All @@ -559,13 +559,13 @@ jobs:
arch: x86_64
api-level: 30
target: google_apis
ndk: 25.1.8937393
ndk: 28.2.13676358
emulator-options: -no-snapshot-save -no-window -noaudio -no-boot-anim -camera-back none -port 5554
emulator-boot-timeout: 900
script: |
adb wait-for-device
adb root
NDK=/usr/local/lib/android/sdk/ndk/25.1.8937393 builds/install/arch-specific/android/BuildFinalPackage.sh $ARCH
NDK=/usr/local/lib/android/sdk/ndk/28.2.13676358 builds/install/arch-specific/android/BuildFinalPackage.sh $ARCH
- name: Upload installer
uses: actions/upload-artifact@v4
Expand Down
8 changes: 4 additions & 4 deletions builds/posix/make.android.arm64
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ endif

NDK_TOOLCHAIN ?= $(NDK)/toolchains/llvm/prebuilt/linux-x86_64

CROSS_PREFIX24:=$(NDK_TOOLCHAIN)/bin/aarch64-linux-android24-
CROSS_PREFIX29:=$(NDK_TOOLCHAIN)/bin/aarch64-linux-android29-
CROSS_PREFIX:=$(NDK_TOOLCHAIN)/bin/llvm-

CROSS_FLAGS:=-I$(ROOT)/gen/cross

CXX:=$(CROSS_PREFIX24)clang++
CC:=$(CROSS_PREFIX24)clang
CXX:=$(CROSS_PREFIX29)clang++
CC:=$(CROSS_PREFIX29)clang
AR:=$(CROSS_PREFIX)ar
AS:=$(CROSS_PREFIX)as
LD:=$(CROSS_PREFIX)ld
Expand Down Expand Up @@ -49,7 +49,7 @@ DEV_FLAGS=$(COMMON_FLAGS) $(WARN_FLAGS)

CROSS_CONFIG=android.arm64

LDFLAGS += -static-libstdc++
LDFLAGS += -static-libstdc++ -Wl,-z,max-page-size=16384
DroidLibs := -lm -ldl -llog $(DECLIB) $(I128LIB)
UDR_SUPPORT_LIBS :=

Expand Down
8 changes: 4 additions & 4 deletions builds/posix/make.android.arme
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ endif

NDK_TOOLCHAIN ?= $(NDK)/toolchains/llvm/prebuilt/linux-x86_64

CROSS_PREFIX24:=$(NDK_TOOLCHAIN)/bin/armv7a-linux-androideabi24-
CROSS_PREFIX29:=$(NDK_TOOLCHAIN)/bin/armv7a-linux-androideabi29-
CROSS_PREFIX:=$(NDK_TOOLCHAIN)/bin/llvm-

CROSS_FLAGS:=-I$(ROOT)/gen/cross

CXX:=$(CROSS_PREFIX24)clang++
CC:=$(CROSS_PREFIX24)clang
CXX:=$(CROSS_PREFIX29)clang++
CC:=$(CROSS_PREFIX29)clang
AR:=$(CROSS_PREFIX)ar
AS:=$(CROSS_PREFIX)as
LD:=$(CROSS_PREFIX)ld
Expand Down Expand Up @@ -49,7 +49,7 @@ DEV_FLAGS=$(COMMON_FLAGS) $(WARN_FLAGS)

CROSS_CONFIG=android.arme

LDFLAGS += -static-libstdc++
LDFLAGS += -static-libstdc++ -Wl,-z,max-page-size=16384
DroidLibs := -lm -ldl -llog $(DECLIB) $(I128LIB)
UDR_SUPPORT_LIBS :=

Expand Down
8 changes: 4 additions & 4 deletions builds/posix/make.android.x86
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ endif

NDK_TOOLCHAIN ?= $(NDK)/toolchains/llvm/prebuilt/linux-x86_64

CROSS_PREFIX24:=$(NDK_TOOLCHAIN)/bin/i686-linux-android24-
CROSS_PREFIX29:=$(NDK_TOOLCHAIN)/bin/i686-linux-android29-
CROSS_PREFIX:=$(NDK_TOOLCHAIN)/bin/llvm-

CROSS_FLAGS:=-I$(ROOT)/gen/cross

CXX:=$(CROSS_PREFIX24)clang++
CC:=$(CROSS_PREFIX24)clang
CXX:=$(CROSS_PREFIX29)clang++
CC:=$(CROSS_PREFIX29)clang
AR:=$(CROSS_PREFIX)ar
AS:=$(CROSS_PREFIX)as
LD:=$(CROSS_PREFIX)ld
Expand Down Expand Up @@ -49,7 +49,7 @@ DEV_FLAGS=$(COMMON_FLAGS) $(WARN_FLAGS)

CROSS_CONFIG=android.x86

LDFLAGS += -static-libstdc++
LDFLAGS += -static-libstdc++ -Wl,-z,max-page-size=16384
DroidLibs := -lm -ldl -llog $(DECLIB) $(I128LIB)
UDR_SUPPORT_LIBS :=

Expand Down
8 changes: 4 additions & 4 deletions builds/posix/make.android.x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ endif

NDK_TOOLCHAIN ?= $(NDK)/toolchains/llvm/prebuilt/linux-x86_64

CROSS_PREFIX24:=$(NDK_TOOLCHAIN)/bin/x86_64-linux-android24-
CROSS_PREFIX29:=$(NDK_TOOLCHAIN)/bin/x86_64-linux-android29-
CROSS_PREFIX:=$(NDK_TOOLCHAIN)/bin/llvm-

CROSS_FLAGS:=-I$(ROOT)/gen/cross

CXX:=$(CROSS_PREFIX24)clang++
CC:=$(CROSS_PREFIX24)clang
CXX:=$(CROSS_PREFIX29)clang++
CC:=$(CROSS_PREFIX29)clang
AR:=$(CROSS_PREFIX)ar
AS:=$(CROSS_PREFIX)as
LD:=$(CROSS_PREFIX)ld
Expand Down Expand Up @@ -49,7 +49,7 @@ DEV_FLAGS=$(COMMON_FLAGS) $(WARN_FLAGS)

CROSS_CONFIG=android.x86_64

LDFLAGS += -static-libstdc++
LDFLAGS += -static-libstdc++ -Wl,-z,max-page-size=16384
DroidLibs := -lm -ldl -llog $(DECLIB) $(I128LIB)
UDR_SUPPORT_LIBS :=

Expand Down
180 changes: 180 additions & 0 deletions extern/icu/android/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
FROM debian:bookworm AS builder

ENV NDK=/opt/android-ndk
ENV NDK_TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64
ENV PATH=$NDK_TOOLCHAIN/bin:$PATH

ADD https://dl.google.com/android/repository/android-ndk-r28c-linux.zip /tmp/android-ndk.zip
ADD https://github.com/unicode-org/icu/releases/download/release-77-1/icu4c-77_1-src.tgz /tmp/icu4c-77_1-src.tgz

RUN apt-get update && \
apt-get install -y \
cmake \
g++ \
unzip \
xz-utils && \
rm -rf /var/cache/apt/archives /var/lib/apt/lists/* && \
\
unzip /tmp/android-ndk.zip -d $NDK && for d in "$NDK"/*; do mv "$d"/* "$NDK"/; rmdir "$d"; done && \
mkdir /src && \
tar -xzf /tmp/icu4c-77_1-src.tgz -C /src --one-top-level=linux && \
rm /tmp/android-ndk.zip /tmp/icu4c-77_1-src.tgz && \
\
cd /src/linux/icu/source && \
./runConfigureICU Linux --prefix=$PWD/prebuilt \
CFLAGS="-Os" \
CXXFLAGS="--std=c++20" \
--enable-static \
--enable-shared=no \
--enable-extras=no \
--enable-strict=no \
--enable-icuio=no \
--enable-layout=no \
--enable-layoutex=no \
--enable-tools \
--enable-tests=no \
--enable-samples=no \
--enable-dyload \
--with-data-packaging=archive && \
make -j15 && \
make install && \
\
cp -a /src/linux /src/x86 && \
cd /src/x86/icu/source && \
./configure --prefix=/build/x86 \
--host=i686-android-linux \
--enable-static=no \
--enable-shared \
--enable-extras=no \
--enable-strict=no \
--enable-icuio=no \
--enable-layout=no \
--enable-layoutex=no \
--enable-tools=no \
--enable-tests=no \
--enable-samples=no \
--enable-renaming \
--enable-dyload \
--with-cross-build=/src/linux/icu/source \
CFLAGS='-Os' \
CXXFLAGS='--std=c++20' \
LDFLAGS='-static-libstdc++ -Wl,-z,max-page-size=16384 -Wl,-rpath=\$$ORIGIN' \
CC=i686-linux-android29-clang \
CXX=i686-linux-android29-clang++ \
AR=llvm-ar \
RANLIB=llvm-ranlib \
--with-data-packaging=archive && \
make -j15 && \
make install && \
\
cp -a /src/linux /src/x64 && \
cd /src/x64/icu/source && \
./configure --prefix=/build/x64 \
--host=x86_64-android-linux \
--enable-static=no \
--enable-shared \
--enable-extras=no \
--enable-strict=no \
--enable-icuio=no \
--enable-layout=no \
--enable-layoutex=no \
--enable-tools=no \
--enable-tests=no \
--enable-samples=no \
--enable-renaming \
--enable-dyload \
--with-cross-build=/src/linux/icu/source \
CFLAGS='-Os' \
CXXFLAGS='--std=c++20' \
LDFLAGS='-static-libstdc++ -Wl,-z,max-page-size=16384 -Wl,-rpath=\$$ORIGIN' \
CC=x86_64-linux-android29-clang \
CXX=x86_64-linux-android29-clang++ \
AR=llvm-ar \
RANLIB=llvm-ranlib \
--with-data-packaging=archive && \
make -j15 && \
make install && \
\
cp -a /src/linux /src/arm32 && \
cd /src/arm32/icu/source && \
./configure --prefix=/build/arm32 \
--host=arm-linux-androideabi \
--enable-static=no \
--enable-shared \
--enable-extras=no \
--enable-strict=no \
--enable-icuio=no \
--enable-layout=no \
--enable-layoutex=no \
--enable-tools=no \
--enable-tests=no \
--enable-samples=no \
--enable-renaming \
--enable-dyload \
--with-cross-build=/src/linux/icu/source \
CFLAGS='-Os -march=armv7-a -mfloat-abi=softfp -mfpu=neon' \
CXXFLAGS='--std=c++20 -march=armv7-a -mfloat-abi=softfp -mfpu=neon' \
LDFLAGS='-static-libstdc++ -Wl,-z,max-page-size=16384 -march=armv7-a -Wl,--fix-cortex-a8 -Wl,-rpath=\$$ORIGIN' \
CC=armv7a-linux-androideabi29-clang \
CXX=armv7a-linux-androideabi29-clang++ \
AR=llvm-ar \
RANLIB=llvm-ranlib \
--with-data-packaging=archive && \
make -j15 && \
make install && \
\
cp -a /src/linux /src/arm64 && \
cd /src/arm64/icu/source && \
./configure --prefix=/build/arm64 \
--host=aarch64-android-linux \
--enable-static=no \
--enable-shared \
--enable-extras=no \
--enable-strict=no \
--enable-icuio=no \
--enable-layout=no \
--enable-layoutex=no \
--enable-tools=no \
--enable-tests=no \
--enable-samples=no \
--enable-renaming \
--enable-dyload \
--with-cross-build=/src/linux/icu/source \
CFLAGS='-Os' \
CXXFLAGS='--std=c++20' \
LDFLAGS='-static-libstdc++ -Wl,-z,max-page-size=16384 -Wl,-rpath=\$$ORIGIN' \
CC=aarch64-linux-android29-clang \
CXX=aarch64-linux-android29-clang++ \
AR=llvm-ar \
RANLIB=llvm-ranlib \
--with-data-packaging=archive && \
make -j15 && \
make install && \
\
mkdir -p /out/x86 /out/x64 /out/arm32 /out/arm64 && \
cd /out && \
\
cp /build/x86/lib/libicudata.so.77.1 x86/libicudata.77.1.so && \
cp /build/x86/lib/libicui18n.so.77.1 x86/libicui18n.77.1.so && \
cp /build/x86/lib/libicuuc.so.77.1 x86/libicuuc.77.1.so && \
\
cp /build/x64/lib/libicudata.so.77.1 x64/libicudata.77.1.so && \
cp /build/x64/lib/libicui18n.so.77.1 x64/libicui18n.77.1.so && \
cp /build/x64/lib/libicuuc.so.77.1 x64/libicuuc.77.1.so && \
\
cp /build/arm32/lib/libicudata.so.77.1 arm32/libicudata.77.1.so && \
cp /build/arm32/lib/libicui18n.so.77.1 arm32/libicui18n.77.1.so && \
cp /build/arm32/lib/libicuuc.so.77.1 arm32/libicuuc.77.1.so && \
\
cp /build/arm64/lib/libicudata.so.77.1 arm64/libicudata.77.1.so && \
cp /build/arm64/lib/libicui18n.so.77.1 arm64/libicui18n.77.1.so && \
cp /build/arm64/lib/libicuuc.so.77.1 arm64/libicuuc.77.1.so && \
\
tar cfJ /out/icu-android.tar.xz x86 x64 arm32 arm64 && \
\
rm -rf x86 x64 arm32 arm64 /src /build


FROM scratch

COPY --from=builder /out/icu-android.tar.xz /out/icu-android.tar.xz
27 changes: 0 additions & 27 deletions extern/icu/android/aarch64/config.sh

This file was deleted.

6 changes: 0 additions & 6 deletions extern/icu/android/aarch64/mk.sh

This file was deleted.

27 changes: 0 additions & 27 deletions extern/icu/android/armv7a/config.sh

This file was deleted.

6 changes: 0 additions & 6 deletions extern/icu/android/armv7a/mk.sh

This file was deleted.

Loading
Loading