Forums - For Android NDK r9

6 posts / 0 new
Last post
For Android NDK r9
pvrtisrp
Join Date: 28 Sep 13
Posts: 47
Posted: Wed, 2013-10-02 04:59

Dear all,

I want to use this compiler for Android NDK r9 (I had installed it). So I did the following steps but it did not work, could you help me?

1. Because Android NDK r9 do not need Cygwin but LLVM compiler need, I downloaded and installed the newest version of Cygwin (I have VC2010).

2. I copied and pasted all files to "C:/android-ndk/toolchains/"

Now I have C:\android-ndk\toolchains\arm-linux-androideabi-snapdragonclang3.3\...

3. I added two lines to the top of my "Application.mk"

NDK_TOOLCHAIN_VERSION=snapdragonclang3.3
SNAPDRAGON_LLVM_PATH=C:/android-ndk/toolchains/arm-linux-androideabi-snapdragonclang3.3/Snapdragon_LLVM_for_Android_3.3/bin
 

4. I modified my Android.mk

LOCAL_ARM_MODE  := arm
LOCAL_ARM_NEON  := true
 
LOCAL_CFLAGS       += -Ofast -mcpu=krait2 -marm \
                                         -Wreturn-type -Wimplicit-function-declaration -Wcast-align
LOCAL_CPPFLAGS  += -std=c++11 \
                                         -Ofast -mcpu=krait2 -marm \
                                         -Wreturn-type -Wimplicit-function-declaration -Wcast-align
 
LOCAL_SRC_FILES := test1.c.arm.neon test2.cpp.arm.neon
... ...
 
Unfortunately, it does not work...
I trace the error message:

 

process_begin: CreateProcess(NULL, 

bash C:\android-ndk\toolchains\arm-linux-androideabi-snapdragonclang3.3\snapdragon-clang++ 
-MMD -MP -MF 
./obj/local/armeabi-v7a/objs/myTest/myTest.o.d 
-gcc-toolchain 
C:/android-ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/windows-x86_64 
-fpic 
-ffunction-sections 
....
 
I think I may miss some steps or I have misunderstandings, but "readme-install.pdf" really does not provide much information... ...
Please help me use this compiler then achieve the fastest performance of my app.
 
Thank you very much!
Cathy

 

  • Up0
  • Down0
pvrtisrp
Join Date: 28 Sep 13
Posts: 47
Posted: Wed, 2013-10-02 05:35

I do a further test but it is still failed.

I directly copy the whole folder to toolchains, now I have

C:\android-ndk\toolchains\arm-linux-androideabi-snapdragonclang3.3

it shows different error message...

process_begin: CreateProcess(NULL, 
bash C:\android-ndk\toolchains\arm-linux-androideabi-snapdragonclang3.3\snapdragon-clang++ 
-MMD -MP -MF 
./obj/local/armeabi-v7a/objs/alDE/alDE.o.d 
-gcc-toolchain 
C:/android-ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/windows-x86_64 
-fpic 
-ffunction-sections 
-funwind-tables 
-fstack-protector 
-no-canonical-prefixes 
-target armv7-none-linux-androideabi 
-march=armv7-a 
-mfloat-abi=softfp 
-fno-exceptions 
-fno-rtti 
-O2 
-g 
-DNDEBUG 
-fomit-frame-pointer 
-fstrict-aliasing 
-mfpu=neon 
....
  • Up0
  • Down0
pvrtisrp
Join Date: 28 Sep 13
Posts: 47
Posted: Wed, 2013-10-02 06:19

Please help me delete my last reply (further test with different error messages)....

Please... it contains some my private information... Please....

Thank you.

  • Up0
  • Down0
Mandeep
Join Date: 19 Jun 13
Posts: 6
Posted: Wed, 2013-10-02 10:47
Cathy,
 
Could you please post the entire error message that you are seeing?
 
LLVM does not require Cygwin but Android NDK requires it for Windows. For a complete list of dependencies for Android NDK please refer the "Required development tools" section on:
 
Please *DO NOT* set the SNAPDRAGON_LLVM_PATH variable in your Application.mk file. This variable does not need to be set.
 
Also if you want to use -Ofast flag (or any other O flag) for your compilation please remove all O0, O2 and Os flags from <NDK_ROOT>/toolchains/arm-linux-androideabi-snapdragonclang3.3/setup.mk file.
 
Thanks,
Mandeep
  • Up0
  • Down0
pvrtisrp
Join Date: 28 Sep 13
Posts: 47
Posted: Thu, 2013-10-03 18:27

No anyone can help me delete my private message?

  • Up0
  • Down0
pvrtisrp
Join Date: 28 Sep 13
Posts: 47
Posted: Wed, 2013-10-09 10:15

Cannot I edit or delete my comment?

Anyone can help me?

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.