Setup build environment - YOCAP/documentation GitHub Wiki
Qualcom provides a snapdragon optimized version of the clang compiler. If you're interested in building the CAF tree, then you might as well used the optimized compiler as well.
You have to register with the Qualcomm Developer Network to obtain it.
Look under Downloads -> Software Development for the" Snapdragon LLVM Compiler - Linux 64bit".
Once you have it, copy the toolchain into your build tree:
croot
cd prebuilts/clang/host/linux-x86/
cp -r <download dir>/snapdragon-llvm-8.0.6-linux64/toolchains/llvm-Snapdragon_LLVM_for_Android_8.0/prebuilt/linux-x86_64/ ./clang-8.0.6
create a sdclang.json file that sets your SDCLANG parameters. I placed mine in the root of the build tree:
croot
vi sdclang.json
contents should be:
{
"default": {
"SDCLANG": true,
"SDCLANG_PATH": "prebuilts/clang/host/linux-x86/clang-8.0.6/bin",
"SDCLANG_PATH_2": "prebuilts/clang/host/linux-x86/clang-8.0.6/bin",
"SDCLANG_FLAGS": "-Wno-vectorizer-no-neon",
"SDCLANG_FLAGS_2": "-Wno-vectorizer-no-neon"
}
}
set an environment variable to point to this config file:
export SDCLANG_CONFIG=<path to config file>
Import other utilities int your environment with:
$ croot
$ . ./build/envsetup.sh
Choose your target device. For now i'm using the built-in msm8998-userdebug:
$ lunch msm8998-userdebug
For convenience put all this in your .profile or similar so it all gets setup on login.