How can I make use of llvm as clang backend to compile C++ files without using gcc as clang's backend? I am pretty sure clang is using gcc because
$ clang++ --version
clang version 6.0.1 (tags/RELEASE_601/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
it uses gnu as target instead of llvm. My llvm-config output:
$ llvm-config --version --targets-built
6.0.1
X86
I built both clang and llvm from source using standard options for my build target(X86).
EDIT: I think it is using gcc as backend because this code produces error in online ide but works on my machine with clang++ and g++. Code relies on fact that gcc has implementation of policy based data structures which are not part of standard.
GCCas its backend?-Hoption it included all the path asg++includes. And also all policy based data structure which are gcc's implementation shouldn't work in llvm backend (I suppose).Linuxclang usesGCCStandard Librarieslibstdc++. But it doesn't use the compiler.