Skip to content

[feature] Add an compiler attribute to settings if clang so that conan client & recipes has a chance to disambiguate between windows clang flavors #13047

@SpaceIm

Description

@SpaceIm

What is your suggestion?

It's more or less related to #12336, and to many issues conan-center is facing from users building recipes with clang-cl, LLVM clang, MinGW clang etc.

Recipes have sometimes to make decision depending on the compiler:

  • raise if not supported
  • build with Autotools, CMake, NMake, MSBuild or Meson depending on the compiler (you can do a build with NMake or MSBuild if compiler is clang-cl, but not if it's clang MinGW).
  • inject options, flags, env vars
  • predict lib name of each component

Currently, it's impossible for a recipe to disambiguate which windows clang flavor a consumer is using, and clang-cl is fundamentally different to MinGW clang. There should be a compiler attribute, or anything else in settings which should be the canonical conan way to express a specific clang flavor on Windows to conan, so that recipes can rely on it for any custom logic (bonus: add helpers like is_clang_cl(), is_mingw() based on settings).

Many conan-center recipes are broken for at least one Windows clang flavor, without any way to fix it without breaking the other.

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions