Unable to compile ROMS with SnapDragon Clang !

Search This thread

Manav Bhagia

Senior Member
May 1, 2015
160
462
93
Mumbai
I am unable make use of the SDClang compiler on my
oneplus3 even after setting TARGET_USE_SDCLANG=true in my device's Boardconfig.mk and placing the sdclang-3.8 toolchain in prebuilts/clang/linux-x86/host . any help would be highly appreciated .
The image I'm providing should show the compiler used as sdclang-3.8.7 llvm , but instead of using qClang , it is using aClang (that is the default compiler for CM14.1)
 

Attachments

  • Screenshot_20161129-231020.png
    Screenshot_20161129-231020.png
    95.3 KB · Views: 898

WhyOrean

Senior Member
Jan 20, 2014
717
3,040
133
25
Bangalore
1. Download the Qualcomm LLVM Compiler here: https://developer.qualcomm.com/download/sdllvm/snapdragon-llvm-compiler-...

2. Extract Snapdragon-llvm-3.8.4-toolchain.tar.gz

3. Move toolchains\llvm-Snapdragon_LLVM_for_Android_3.8\prebuilt\linux-x86_64 to prebuilts/clang/linux-x86/host/sdclang-3.8 within your Android build environment.

4. Add the following lines to your device's BoardConfig:

ifneq ($(HOST_OS),darwin)

SDCLANG := true

SDCLANG_PATH := prebuilts/clang/linux-x86/host/sdclang-3.8/bin

SDCLANG_LTO_DEFS := device/qcom/common/sdllvm-lto-defs.mk

endif

5. Compile Android