Skip to content
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

Feature/set meson b_vscrt with clang-cl #14664

Merged

Conversation

lukester1975
Copy link
Contributor

@lukester1975 lukester1975 commented Sep 5, 2023

Changelog: Feature: Ensure meson toolchain sets b_vscrt with clang-cl.
Docs: Omit

This is a follow up to ##13424 (comment), specifically item 3.

  • The if compiler in ("msvc", "clang") is a bit ugly but as I mentioned in the issue, I couldn't see a way to see if the compiler is really clang-cl at that point. Safe enough given the msvc_runtime_flag implementation (note I changed it to return None for all non-compiler.runtime cases such that _b_vscrt is consistently None; all other usages seem OK with that).
  • Given that, arguably the if compiler in ("msvc", "clang") test could be removed. Intel's cl-like frontend?
  • In the tests I couldn't get the VS17/clang16 pytest.mark.tool working, so they are commented out. I'm sure I'm just missing some magic incantation somewhere despite VS2022 being enable in my env.
  • VS 17.7 has bumped clang from 15 -> 16. So I guess if the test runners aren't updated, these tests may fail. I use a jinja profile for clang-cl with this hack: compiler.version={{ os.popen("clang-cl --version").read().removeprefix("clang version ").split(".")[0] }}. I guess this could do something similar if necessary?
  • Refer to the issue that supports this Pull Request.
  • If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.
  • I've opened another PR in the Conan docs repo to the develop branch, documenting this one.

@CLAassistant
Copy link

CLAassistant commented Sep 5, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution! Please have a look to the comments.

conan/tools/microsoft/visual.py Outdated Show resolved Hide resolved
@lukester1975 lukester1975 force-pushed the feature/meson-clang-cl-vscrt branch from 6981872 to a4d6173 Compare September 5, 2023 18:44
@memsharded memsharded added this to the 2.0.11 milestone Sep 5, 2023
@memsharded memsharded merged commit 95c935a into conan-io:release/2.0 Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants