-
Notifications
You must be signed in to change notification settings - Fork 464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add default compiler search paths for msys2 default installation paths, fix mingw bugs #3056
Add default compiler search paths for msys2 default installation paths, fix mingw bugs #3056
Conversation
@microsoft-github-policy-service agree |
2050dc3
to
621b001
Compare
Thanks for the contribution! I just kicked off the test runs which found a few linter errors, and I should get a chance to fully review the changes within the next few days. Note that changes in our security policy mean that maintainers now have to manually queue each test run for external contributions, but I'll keep an eye on this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to my other comments, please update the 1.14 section in CHANGELOG.md
with a brief description of your changes and optionally give yourself credit (see the other examples in the file). Otherwise this is looking good. Thanks!
src/kit.ts
Outdated
@@ -389,6 +407,11 @@ export async function kitIfCompiler(bin: string, pr?: ProgressReporter): Promise | |||
// mentions msvc. | |||
return null; | |||
} | |||
if (version.target && version.target.triple.includes('msvc') && clang_cl_res && isMingw(bin)) { | |||
// Skip clang-cl.exe from mingw, as it won't work (correct access to MSCV environment is not granted). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: MSCV -> MSVC
get mingwSearchDirs(): string[] { | ||
return this.configData.mingwSearchDirs; | ||
get additionalCompilerSearchDirs(): string[] { | ||
return this.configData.additionalCompilerSearchDirs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For backwards compatibility, continue returning this.configData.mingwSearchDirs
here if this.configData.additionalCompilerSearchDirs
isn't set (and add mingwSearchDirs
back to ExtensionConfigurationSettings
). We can consider the old setting deprecated and not document it, but I'd like to avoid breaking existing configurations if possible.
…s, fix mingw bugs, fixes microsoft#2880, fixes microsoft#1064, might fix microsoft#460
3cdb534
to
9275919
Compare
This change addresses items #2880, #1064, #2447 and maybe #460 and parts of #2640, #1669
This changes visible behavior
The following changes are proposed:
cmake.mingwSearchDirs
is nowcmake.additionalCompilerSearchDirs
cmake.mingwSearchDirs
/cmake.additionalCompilerSearchDirs
is now correctly used when scanning, no matter how the scan is performed (was only used when the scan was performed from the commandCMake: Scan for kits
)C:\msys64\mingw64\bin\gcc.exe
, the name will include(mingw64)
to prevent removal of different compilers with the exact same name, but different MinGW environments.The purpose of this change
Fixes bugs with MinGW environments.
Allows to more easily use MSYS2-installed MinGW environments.
Allows to use alternative MSYS2 MinGW environments (clang64, ucrt64, etc.)
Other Notes/Information
Feel free to suggest any other improvements ideas concerning MSYS2 and/or MinGW support.