Top Ad unit 728 × 90

Breaking

recent

Compile Android (5.x) with Qualcomm LLVM 3.6 for Qualcomm CPU

Use Qualcomm Snapdragon LLVM Compiler 3.6 (https://developer.qualcomm.com/mobil...mpiler-android) for Android Lollipop 5.x for devices with Qualcomm CPU


As far as I know nobody has done that yet. Except me

This changes the toolchain for CLANG from the default one which comes with Android (aCLANG) to the Qualcomm Snapdragon LLVM Compiler 3.6 (qCLANG) mentioned above. The toolchain will be used for almost all places where the default Android CLANG (aCLANG) is used for compiling TARGET MODULES. BUT ONLY if "USE_CLANG_QCOM := true" is set. Otherwise it is using aCLANG. So you can merge this commit and the build will be the same as before except you specifically define "USE_CLANG_QCOM := true".

WARNING: THIS IS NOT FULLY TESTED FOR STABILITY YET. READ CAREFULLY.

I would suggest: IF YOU USE IT DONT MAKE BUG REPORTS FOR YOUR OFFICIAL ROM OR KERNEL OR ANY APPS. Make reports in the development thread. The ROM compiles, boots and starts. Also if Bionic and other modules are compiled with Qualcomm Snapdragon LLVM Compiler 3.6 (qCLANG).
Androbench, Antutu, Basemark 2.0 , Geekbench 3, Vellamo are 'completing' the bechmarks. This is a work in progress. Only tried this on my personal device (Sony Xperia Z Ultra [C6833] with Krait 400).
Now after using it for some months it seems OK f

According to Documentation there is also support for armv8/aarch64 (Snapdragon 810) but support is not yet implemented.

Install instructions:

1. You have to make an account in order to download the toolchain!
2. You need to download the toolchain and extract it to {your android dir}/prebuilts/clang/linux-x86/host/*
3. Add the repo (https://github.com/mustermaxmueller/clanglibs) to your manifest. For example: <project path="vendor/clanglibs" name="mustermaxmueller/clanglibs" remote="github" revision="clang_qcom_3.6"/>
4. Replace the compiler-rt repo with this one https://github.com/mustermaxmueller/compiler-rt in your manifest For example: <project path="external/compiler-rt" name="mustermaxmueller/compiler-rt" remote="github" revision="clang_qcom_3.6"/>
5. Add "USE_CLANG_QCOM := true" to your Boardconfig.mk/BoardconfigCommon.mk of your device.
6. use my build repo https://github.com/mustermaxmueller/android_build/ or merge my changes. For example: <project path="build" name="mustermaxmueller/android_build" remote="github" revision="clang_qcom_3.6"/>
7. make changes to frameworks/rs/driver/runtime/build_bc_lib_internal.mk like stated here: http://forum.xda-developers.com/show...3&postcount=47
8. change following line in following files


9. Set "USE_CLANG_QCOM := true" e.g. in Boardconfig.mk

10. make a clean compile! Also delete ccache!

I could have made the installation easier by uploading the toolchain to Github but I do not know if I am allowed to. And I am no lawyer so...

Annotation:
1. Documentation for the toolchain: {your android dir}/prebuilts/clang/linux-x86/host/llvm-Snapdragon_LLVM_for_Android_3.6/Snapdragon_LLVM_ARM_36_User_Guide.pdf
2. The Flag "-muse-optlibc" is not Documented.
3. "frameworks/rs/driver/runtime/build_bc_lib_internal.mk" still uses aCLANG. There might be some other places I missed.
4. HOST is compiled with aCLANG because qCLANG does not understand x86

TODO:
-Make more performance comparisons to aCLANG and GCC. It seems good even compared to GCC
-Use ccache -Where does it make sense to use qCLANG instead of GCC?
-Compile Android with qCLANG wherever possible. http://www.linuxplumbersconf.org/201...roid-clang.pdf and https://events.linuxfoundation.org/s...-LLVMLinux.pdf
- "-fparallel" where to use? see 3.6.4
Compile Android (5.x) with Qualcomm LLVM 3.6 for Qualcomm CPU Reviewed by Unknown on Sunday, July 05, 2015 Rating: 5

No comments:

All Rights Reserved by Free 3G Unlimited Internet Tricks XDA-Net.Blogspot.IN © 2014 - 2015
Designed by JOJOThemes

Contact Form

Name

Email *

Message *

Powered by Blogger.