Apply -std=c++11 to openal-soft build on android

openal-soft assumes that aligned_alloc is available with c++17. Newer
android ndks set c++17 by default, however they do not expose
aligned_alloc without setting min sdk version to 28.

We can avoid this issue by forcing openal to be compiled with c++11.

Also note, we have HXCPP_CPP11 defined, however, hxcpp ignores this for
the android toolchain.  This means we must set it explicitly

See:
f5e0eef34d/common/almalloc.cpp (L15)
This commit is contained in:
Tobiasz Laskowski
2025-03-14 10:04:25 +00:00
parent 20c9bec3bc
commit 52072d1f21
2 changed files with 3 additions and 2 deletions

View File

@@ -55,8 +55,7 @@
<set name="NATIVE_TOOLKIT_SDL_ANGLE" value="1" if="LIME_SDL_ANGLE" />
<files id="lime">
<compilerflag value="-std=c++11" />
<compilerflag value="-Iinclude" />
<file name="src/ExternalInterface.cpp" />

View File

@@ -2,6 +2,8 @@
<files id="native-toolkit-openal">
<compilerflag value="-std=c++11" if="android" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/openal/" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/custom/openal/alc/" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/openal/alc/" />