Skip to content

Commit 7baa53a

Browse files
committed
android compile with clang++
1 parent c518d2b commit 7baa53a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
configure:
3939
--host aarch64-linux-android26
4040
--with-openssl=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr
41-
LIBS="-lssl -lcrypto"
41+
LIBS="-lssl -lcrypto -lc++"
4242
AR=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar
4343
AS=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-as
4444
CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android26-clang
@@ -49,13 +49,13 @@ jobs:
4949
name: android
5050
make:
5151
PLATFORM=android
52-
CC=$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android26-clang
52+
CC=$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android26-clang++
5353
- os: ubuntu-latest
5454
arch: x86_64
5555
configure:
5656
--host x86_64-linux-android26
5757
--with-openssl=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr
58-
LIBS="-lssl -lcrypto"
58+
LIBS="-lssl -lcrypto -lc++"
5959
AR=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar
6060
AS=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-as
6161
CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android26-clang
@@ -66,7 +66,7 @@ jobs:
6666
name: android
6767
make:
6868
PLATFORM=android
69-
CC=$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android26-clang
69+
CC=$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android26-clang++
7070
sqlite-amalgamation-zip: https://sqlite.org/2025/sqlite-amalgamation-3490100.zip
7171
- os: macos-latest
7272
configure:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ else ifeq ($(PLATFORM),android)
6666
$(error "CC must be set to the Android NDK's Clang compiler")
6767
endif
6868
TARGET := $(DIST_DIR)/cloudsync.so
69-
LDFLAGS += -shared -lcrypto -lssl
69+
LDFLAGS += -shared -lcrypto -lssl -lc++
7070
else ifeq ($(PLATFORM),ios)
7171
TARGET := $(DIST_DIR)/cloudsync.dylib
7272
SDK := -isysroot $(shell xcrun --sdk iphoneos --show-sdk-path) -miphoneos-version-min=11.0

0 commit comments

Comments
 (0)