taka-no-me / android-cmake

CMake toolchain file and other scripts for the Android NDK
1.22k stars 437 forks source link

Pass target triplet to clang compiler. #13

Closed chromaticbum closed 10 years ago

chromaticbum commented 10 years ago

Hey there. I found that I needed to add the target to clang arguments in order to get it working. Otherwise I would get an error: "error: unknown target CPU 'armv7-a'" when compiling for arm. I checked the output of ndk-build and it includes the target parameter. This is for llvm-3.3 on ndk r9c. I am on Mac OS X 10.9.2.

chromaticbum commented 10 years ago

I see that you already have a mechanism to set the triple. I'll close this. But how do I get that code path to run that sets the triplet?

chromaticbum commented 10 years ago

Found the documentation for ANDROID_ABI.

dreamzor commented 10 years ago

Hi, I have the exact situation as you do (osx + r9c + armv7-a), could you please share the actual cmake code to call this stuff?