[CMake] Properly handle the LTO cache arguments for MinGW
authorTobias Hieta <tobias@hieta.se>
Mon, 25 May 2020 07:28:17 +0000 (10:28 +0300)
committerMartin Storsjö <martin@martin.st>
Mon, 25 May 2020 07:34:09 +0000 (10:34 +0300)
commit760f45eacadbabf9634fb81d7ccaa16c269cf19e
tree8328617b2dc7aa2e21b9148fc47cbad4cb0651a6
parent1b79509f97b6c9595027b53d3d67f174d0ae1c78
[CMake] Properly handle the LTO cache arguments for MinGW

We want to make sure that LINKER_IS_LLD_LINK is properly set - in
this case it shouldn't be set when building for MinGW.

Then we want to make the test for it correct and finally include
the option to build with thinlto cache since the MinGW driver now
supports that.

Differential Revision: https://reviews.llvm.org/D80493
llvm/cmake/modules/HandleLLVMOptions.cmake