(1) Use ALL_CAPS name for the environment variable with the C/C++ compilation
flags: MY_LIBTEXTCLASSIFIER_CFLAGS According to https://developer.android.com/ndk/guides/android_mk.html#var, lower-case names are reserved. From there: "If you need to define your own convenience variables in an Android.mk file, we recommend prepending MY_ to their names." (2) Use env variable $(LIBTEXTCLASSIFIER_STRIP_OPTS) and document it. One can use e.g., mmma -j16 LIBTEXTCLASSIFIER_STRIP_OPTS=keep_symbols external/libtextclassifier to build with all symbols in, such that treemap output is meaningful. Then, inside Google, one can run /home/build/google3/geo/render/mirth/tools/binary_size_treemap.sh \ -b /usr/local/google/home/salcianu/android2/master/out/target/product/bullhead/obj_arm/lib/libtextclassifier.so \ -o /tmp/bar and next open file:///tmp/bar/index.html in a browser. (3) Rearrange a bit some of the lines. E.g., LOCAL_PATH := $(call my-dir) should be at the top of the file, not in the section for a specific module, so I moved it before the comment for the first module. Change-Id: I7c705b19ef29e1900b68f6bdf3a7d58d8ee17cc3 Test: build with symbols and then run treemap (see point 2 above)
Loading
Please sign in to comment