crystax / android-platform-ndk

CrystaX NDK - Native Development Kit for Android
https://www.crystax.net/android/ndk
302 stars 52 forks source link

CMake toolchain does not allow LLVM STL static/shared to be used #6

Open rcdailey opened 8 years ago

rcdailey commented 8 years ago

At the moment I am running these parameters:

cmake "$DIR/../../.." -G"Ninja" \
    -DCMAKE_BUILD_TYPE="$configuration" \
    -DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK/cmake/toolchain.cmake" \
    -DBUILD_TESTING=OFF \
    -DANDROID_ABI=armeabi-v7a \
    -DANDROID_NATIVE_API_LEVEL=android-15 \
    -DANDROID_STL=c++_shared \
    -DANDROID_TOOLCHAIN_VERSION=clang3.7 \
    -DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi

Ignore the ANDROID_STL parameter (this is the part that should work). At the moment, GNU STL is selected even though I picked clang. However, it should allow me to select LLVM STL.

Is this already supported? If not, can you add support for it?

rpavlik commented 8 years ago

FYI - I hadn't realized this work was going on at the CrystaX NDK level, and have been maintaining a fork of the upstream android-cmake toolchain repo with CrystaX support, libc++, and more improvements. Right now I have been developing on it, rather than neatly turning commits into nicely upstreamable patches, but the most recent working branch as I post this is https://github.com/OSVR/android-cmake/tree/libcxx

rcdailey commented 8 years ago

Nice, I will look into this. I assume you support LLVM STL library?

rpavlik commented 8 years ago

llvm stl library == libc++

rcdailey commented 8 years ago

Right, but what is the actual value you use for ANDROID_STL?

rpavlik commented 8 years ago

c++_static or c++_shared, as documented in my module, and as used by other Android support in CMake (like nsight tegra)

On Wed, Jun 29, 2016, 4:34 PM Robert Dailey notifications@github.com wrote:

Right, but what is the actual value you use for ANDROID_STL?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/crystax/android-platform-ndk/issues/6#issuecomment-229496012, or mute the thread https://github.com/notifications/unsubscribe/AADuyQq7jhkdC3edbO7Ecyrm8YuiQ9Duks5qQuTXgaJpZM4I_NSI .

rcdailey commented 8 years ago

Thanks I just wanted to clarify. I investigated a lot of forks of android-cmake and most of them didn't update documentation. In fact, the docs for the Crystax-provided CMake script is wrong as well.