0

Now I want to add a function into RenderScript to support a new interface by myself.

I wrote the code and add myFunc.c file into "android-4.4-src/frameworks/rs/driver/runtime/", and modify Android.mk(append myFunc.c to clcore_base_files at line 20):

clcore_base_files := \
    rs_allocation.c \
    rs_cl.c \
    rs_core.c \
    rs_element.c \
    rs_mesh.c \
    rs_matrix.c \
    rs_program.c \
    rs_sample.c \
    rs_sampler.c \
    convert.ll \
    allocation.ll \
    rsClamp.ll \
    myFunc.c

Then add myFunc.rsh into "android-4.4-src/frameworks/rs/scriptc/", and include myFunc.rsh in rs_core.rsh which in the same directory:

#include "myFunc.rsh"

And then I rebuild:

$ source build/envsetup.sh
$ lunch sdk-eng
$ make sdk

The weird thing is: libclcore.bc in "out/target/product/generic/system/lib/" is the new version which contains the function I wrote, but the libclcore.bc in "out/host.linux-x86/sdk/androidXXX/build-tools/android-4.4.3.2xxx/renderscript/lib" is the old version.

I want to update the old version in "host" like the one in "target" when rebuild.

Is there some configurations I forgot?

Any suggestions would be appreciated!

gongweixue
  • 155
  • 2
  • 11
  • I don't know what this "host"-side build of libclcore.bc is. That path looks suspicious (even with fixing the "host." part). I think you are looking at the libclcore.bc that a prior SDK release installed in your out/ directory. – Stephen Hines Jan 22 '14 at 03:56
  • Yes. But I don't know why there are two different libclcore.bc in out/host/ and out/target/. Now the SDK works well, so I am sure libclcore.bc in out/target/ is the one being used. So, is another nesessary? – gongweixue Jan 22 '14 at 04:39
  • No. Whatever is in your out/host directory was not put there by AOSP (and is not needed for any AOSP-like builds). – Stephen Hines Jan 22 '14 at 06:05

0 Answers0