Skip to content

Commit 8aa90d5

Browse files
Use the static version of libc++ on Android
Remove the runtime dependency on libc++_shared.so for the JIT flavor of beam.smp. This simplifies Erlang deployment on Android as libc++ is not provided as a system library. See https://developer.android.com/ndk/guides/cpp-support
1 parent de83256 commit 8aa90d5

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

xcomp/erl-xcomp-arm64-android.conf

+3-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ CXX="aarch64-linux-$NDK_ABI_PLAT-clang++"
127127
LD="aarch64-linux-android-ld"
128128

129129
# * `LDFLAGS' - Linker flags.
130-
#LDFLAGS=
130+
# Use the static version of libc++ provided by the Android NDK
131+
# when compiling the JIT flavor of the beam.smp executable.
132+
LDFLAGS="-static-libstdc++"
131133

132134
# * `LIBS' - Libraries.
133135
#LIBS=

xcomp/erl-xcomp-x86_64-android.conf

+3-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ CXX=x86_64-linux-$NDK_ABI_PLAT-clang++
101101
LD=x86_64-linux-android-ld.gold
102102

103103
# * `LDFLAGS' - Linker flags.
104-
#LDFLAGS=
104+
# Use the static version of libc++ provided by the Android NDK
105+
# when compiling the JIT flavor of the beam.smp executable.
106+
LDFLAGS="-static-libstdc++"
105107

106108
# * `LIBS' - Libraries.
107109
#LIBS=

0 commit comments

Comments
 (0)