-
Notifications
You must be signed in to change notification settings - Fork 993
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
Fix RuntimeLibrary deduced from profile in MSBuildToolchain #17100
Fix RuntimeLibrary deduced from profile in MSBuildToolchain #17100
Conversation
- take into account compiler.runtime_type instead of build_type (and fallback to build_type only if runtime_type is not set) - properly compute runtime_library regardless of compiler (logic was broken for clang-cl for exemple)
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.
Hi @SpaceIm
Many thanks for your contribution.
It would be necessary to add some tests that covers it, I think it is enough to add some integration
tests that checks the resulting toolchain.props file result.
This diff is actually changing 2 different things, and both should be covered by tests:
- The
runtime_type
that is not being honored, which I agree it looks like a gap to solve - The fact that only
msvc
andintel-cc
defineruntime=static/dynamic
, which means that other compilers were not adding a runtime library, becauseMT/MD
are no longer validcompiler.runtime
values in the default settings. This also looks like a gap, but it would be important to explicitly acknowledge it in the tests, making sure that it is fine forclang
compiler toolset in MSVC to add the<RuntimeLibrary>
I agree. I'll try to implement several tests. |
I've extended integration tests in order to cover runtime_type in MSBuildToolchain. |
Thanks for adding the test and your contribution! |
Changelog: Fix: Properly deduce RuntimeLibrary from profile in MSBuildToolchain.
Docs: Omit
closes #17099
develop
branch, documenting this one.