Compiling C++ on various different platforms with as many out of tree
dependencies as we have is volatile at best.
In order to prevent a third party warning from ruining the build for
people who don't care about third party warnings, we remove
warnings-as-errors by default.
They are still enabled by default on CI.
It is unknown if gcc uses the O3 optimization levels passed to the
compilation of individual cpp files, or if it needs O3 passed to the
linker as well.
The hash of the final binaries are different, thus O3 is passed to the
linker.
Qmake attempts to invoke the linker with the default `g++` binary even
when we changed the binary. This will compile error when using LTO.
For clang:
```
/usr/bin/ld.gold: error: /usr/lib/llvm-3.8/bin/../lib/LLVMgold.so: could
not load plugin library: /usr/lib/llvm-3.8/bin/../lib/LLVMgold.so:
cannot open shared object file: No such file or directory
```
For GCC:
```
lto1: fatal error: bytecode stream generated with LTO version 6.0
instead of the expected 4.1
```
The IPolicyConfig file is a third party file and since it describes a
third party API we can't make changes to it. Adding it via the system
includes disables warnings on most compilers.
Encapsulating compiler specific options in a separate file
makes it easier to reason about what is going to happen on
a specific qmake call.
clang-msvc and msvc are separate because they don't support
exactly the same compiler switches.