Fix kit detection returning 'unknown vendor' when using clang-cl#4687
Fix kit detection returning 'unknown vendor' when using clang-cl#4687
Conversation
Co-authored-by: snehara99 <113148726+snehara99@users.noreply.github.com>
Co-authored-by: snehara99 <113148726+snehara99@users.noreply.github.com>
Co-authored-by: snehara99 <113148726+snehara99@users.noreply.github.com>
|
@copilot could this cause any regressions? |
The changes are designed to be additive and backward-compatible: Low regression risk because:
Potential edge cases covered by tests:
Manual verification recommended:
|
This change addresses item #4638
This changes visible behavior
The following changes are proposed:
detectVendorFromBinaryPath()helper to detect vendor from compiler binary path (clang-cl, clang, gcc patterns)getKitDetect()to use binary path detection as fallback when kit name patterns don't matchscanDirForClangForMSVCKits()to generate 'Clang-cl' prefixed names for clang-cl.exe kitsThe purpose of this change
${buildKitVendor}expanded to__unknown_vendor__when using clang-cl.exe because vendor detection relied solely on kit names starting with specific patterns ('Clang-cl', 'Clang ', 'GCC '). Manually added kits or auto-scanned kits often had different naming.Before:
After:
Other Notes/Information
Vendor detection patterns supported:
clang-cl,clang-cl-*→ ClangClclang,clang-*→ Clanggcc,gcc-*,*-gcc,*-gcc-*→ GCCUnit tests added for vendor detection from binary paths including versioned compilers and cross-compilers.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.