Skip to content

feature: Optional version of Clang module map requires declaration #163965

@torarnv

Description

@torarnv

As described in https://discourse.llvm.org/t/module-map-requires-as-non-hard-requirement/88589 we're looking for a way to provide Clang module maps for Qt for use with Swift, in a way that guarantees these module maps are not accidentally picked up when building C++/Objective-C code (to avoid #158249 and other possible issues).

I initially thought requires would solve this, where Clang would ignore the module if the compilation unit doesn't match the required environment, but I now understand it's a hard error.

It would be nice if there was a syntax to declare a module map as having non-fatal requirements, that effectively hides the module (or submodule) if those are not met.

Thanks! 🙂

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:modulesC++20 modules and Clang Header Modules

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions