11/27/2023 0 Comments Android ndk for both arm and intel![]() ![]() Now, define the CFLAGS for NEON: LOCAL_NEON_CFLAGS := -mfloat-abi=softfp -mfpu=neon -march=armv7įinally, add the following magical line to your Android.mk: TARGET-process-src-files-tags += $(call add-src-files-target-cflags, $(LOCAL_NEON_SRC_FILES), $(LOCAL_NEON_CFLAGS)) LOCAL_SRC_FILES += $(LOCAL_NEON_SRC_FILES) I use the following technique: LOCAL_NEON_SRC_FILES := imgproc/neon_utils.c \ neon suffix as described in docs/CPU-ARM-NEON.html because build-binary.mk will find that you are not targeting armeabi-v7a. This is how you do it:įirst, list the neon-specific sources. The trick is to use the existing "tag" mechanism of NDK to specify special CFLAGS for a bunch of files. My case was not related to NEON, but for you the same hack could do the job. I have recently found another way to work around the limitations of NDK. Omitting any part of these requirements totally loses the point of the question 4) NEON code comes from a c/cpp file and is written using neon intrinsics. 3) allow this build to also contain NEON code (which could be executed based on run-time cpu detection cpu detection is outside the scope of the question). 2) make build that runs on armv6 (pre neon devices, e.g. ![]() So, if the android build system wasn't excessively intrusive, I wouldn't have to ask questions, but it seems that there is no way for me to compile one file for armv6 and the other file for arm7-neon.Ĭan anybody give any clues if that's doable?īefore trying to reply and wasting internet-ink, it should be clear that these are the main points: 1) make only ONE lib. The neon code uses neon intrinsics, and to be able to compile it, I must enable armeabi-v7a, but that affects regular c-code (it becomes broken on some low-end devices). I want to build my library for armv6, and there is some neon code that I enable at runtime if the device supports it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |