Skip to content

Clang Kit scanning will accidentally use GCC for C++ #1759

@ProfFan

Description

@ProfFan

Brief Issue Summary

The Clang kit scan is broken with current LLVM 11. It will show as

image

and then call CMake with only the CMAKE_C_COMPILER set. This leads to the mixing of GCC and Clang toolchains

image

This is very subtle and causes a lot of confusion.

Expected:

  1. Kits without a C++ compiler should not show if the project is C++. Or such kits should have a different style to warn users.
  2. LLVM 11.1 Kits should be properly detected

CMake Tools Log

[kit] Found Kit: GCC for aarch64-linux-gnu 10.2.0
[kit] Found Kit: GCC for aarch64-linux-gnu 10.2.0
[kit] Found Kit: GCC for arm-none-eabi 10.2.0
[kit] Found Kit: GCC for arm-none-eabi 10.2.0
[kit] Found Kit: Clang 11.1.0
[kit] Found Kit: Clang 11.1.0
[kit] Found Kit: GCC 10.2.0
[kit] Found Kit: GCC 7.4.1
[kit] Found Kit: GCC 8.4.0
[kit] Found Kit: GCC 9.3.0
[kit] Found Kit: GCC for riscv64-linux-gnu 10.2.0
[kit] Found Kit: GCC for riscv64-linux-gnu 10.2.0
[kit] Found Kit: GCC for riscv64-unknown-elf 8.2.0
[kit] Found Kit: GCC for riscv64-unknown-elf 8.2.0
[kit] Found Kit: GCC for x86_64-pc-linux-gnu 10.2.0
[kit] Found Kit: GCC for x86_64-pc-linux-gnu 10.2.0
[kit] Found Kit: GCC for x86_64-pc-linux-gnu 7.4.1
[kit] Found Kit: GCC for x86_64-pc-linux-gnu 7.4.1
[kit] Found Kit: GCC for x86_64-pc-linux-gnu 8.4.0
[kit] Found Kit: GCC for x86_64-pc-linux-gnu 8.4.0
[kit] Found Kit: GCC for x86_64-pc-linux-gnu 9.3.0
[kit] Found Kit: GCC for x86_64-pc-linux-gnu 9.3.0
[kit] Found Kit: GCC 10.2.0
[kit] Successfully loaded 15 kits from /home/fan/.local/share/CMakeTools/cmake-tools-kits.json

Platform and Versions

  • Operating System: Arch Linux
  • CMake Version: 3.20.1
  • VSCode Version: 1.55.1
  • CMake Tools Extension Version: 1.6.0
  • Compiler/Toolchain: LLVM 11.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions