Use CMake's built-in toolchain detection#23998
Conversation
…let CMake resolve the toolchain itself.
|
@janvorli understands the cmake plumbing |
|
I've looked why we have added the stuff that is now being removed. It comes from the ancient #35 and it looks like it was fixing a problem related to building with clang 3.4 or 3.5. |
|
@janvorli sounds good. If you can take a look at that when you have some free cycles that'd be great! |
|
Unfortunately, the results of my testing show this change is problematic. With your change, the cmake variables are set as follows for all versions of clang: Without your change, the correct llvm versions of the tools are used. Example - clang 4.0: |
|
Ah well. Guess this isn’t gonna work without some additional work to preserve the behavior. I’ll close this for now and take another stab at it some time. |
|
It causes the same issue for cross build. For example alpine arm32 build while the state before your change was the same as for x64. |
Try removing manual resolution of toolchain for non-cross builds and let CMake resolve the toolchain itself.