microsoft / microsoft/vscode-cmake-tools

Scan for Kits can't detect different MinGW compilers if they have the same version

Open
#2,640 3 comments 0 reactions 0 assignees View on GitHub
enhancement Feature: kits
Dominant language
TypeScript
Stars
1.7k
Forks
546
Avg merge
2d 16h
Merged PRs (30d)
32

Description

### Brief Issue Summary

When building C/C++ project on windows using MinGW compiler you have several options for a given version.
Let's say I use MinGW 8.1.0 x86_64, so GCC 8.1.0 64 bits.

There are several implementation of the corresponding MinGW on windows:
- using **posix** or **win32** thread
- using **seh** or **sjlj** exception handling

Some projects will use one or the other depending on the final target or also on the libraries they are using (if the library is built with sjlj, can't compile your program with seh exception handling).

As a consequence some people might want to put in their path for example :
- MinGW-x86_64-8.1.0-release-win32-sjlj-rt_v6-rev0
- MinGW-x86_64-8.1.0-release-win32-seh-rt_v6-rev0
- MinGW-x86_64-8.1.0-release-posix-sjlj-rt_v6-rev0

The problem is that the "Scan for kits" command only displays "GCC 8.1.0 x86_64-w64-mingw32" for each one, and because of that, in the final list of kits displayed, we only see the last one of the path (the others probably getting overridden).

Suggestion:
- separate kits from the path
- or go a little bit further in the details (for MinGW particularly as using the wrong kit can have consequences)

### CMake Tools Diagnostics

_No response_

### Debug Log

_No response_

### Additional Information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the Scan for kits command and reproduce the issue using the four MinGW paths listed in the report. Trace how the detected kits are identified and displayed; done means same-version MinGW variants remain distinct and their relevant compiler details are visible.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cmake, cpp, typescript
Domain
build-system, developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.