Running RenderScript standalone

It is possible to run RenderScript compiler outside of the Android Studio. In my case (OSX 10.12) the llvm-rs-cc compiler should be invoked like this:

#!/bin/bash
ROOT=~/Library/Android/ndk/toolchains/renderscript/prebuilt/darwin-x86_64
$ROOT/bin/llvm-rs-cc \
	-I $ROOT/renderscript/include/ \
	-I $ROOT/renderscript/clanginclude/ \
	-I $ROOT/platform/rs/scriptc \
	-I $ROOT/clang-include \
	$*

Bitcodes are generated in bc32/bc64 directories, together with Java wrapper classes.

Published:
comments powered by Disqus