How to use custom clang to build UE4

Hi,

Source code version: UE-4.8
OS: Ubuntu 14.04.1

**

Query-1)

**
I have custom build clang as my_compiler_llvm , how to use this for building UE4.
Is it ok , if i just add ‘my_compiler_llvm/bin’ tp $PATH and then run Setup.sh and GenerateProjectFiles.sh ?
Please suggest , my example is given below

Example:
export PATH=my_compiler_llvm/bin:$PATH ;
cd UnrealEngine ;
./Setup.sh ;
./GenerateProjectFiles.sh

**

Query-2)

**
How to increase verbosity of UE4 building , for example i want to see each of commandline compilations steps printed while building UE4Editor ?

Thanks,
pr

Right now native path does not easily allow you to use a different compiler. You could try the above PATH method, but you need to double check that the headers are being taken from your toolchain and not system dirs. Arguably the easier way is to substitute the clang compiler in our Windows-hosted cross-toolchain.

Re:#2, there’s no ready solution that would do what you want. You can run UBT with -xgeexport switch, which will generate an xml file containing all the actions needed to build the engine which you can examine. Or, you can pass -debug to UBT but the output will likely drown in noise. If you want to have compilation steps printed one by one I suggest modifying LocalExecutor.cs (look for the ‘if’ statement in lines ~123-129 that starts with if (Action.bShouldOutputStatusDescription)) and adding the output for Action.CommandPath and Action.CommandArguments.

Hey,

Would it be possible to export the include paths as well, such as:
export PATH=$PATH:~/local/bin
export LD_LIBRARY_PATH=~/local/lib
export C_INCLUDE_PATH=~/local/include
export CPLUS_INCLUDE_PATH=~/local/include

To be able to build unreal engine with a separate compiler? I am developing software on my machine that requires clang3.7 and clang3.7 seems to segfault on compiling the engine.