Skip to content

Flags in compiler activation vs. out-of-conda-forge usage #2002

@h-vetinari

Description

@h-vetinari

Part of the success of conda-forge is that many upstream projects have adopted (or at least support) development environments based on conda-forge packages. Almost inevitably, this ends up pulling in compilers as well - either through the explicit compilers package, or through other means (like directly depending on gcc_linux-64 or clang_osx-64).

This runs into the question whether this is something we can or want to support. The status quo following Hyrum's law is of course that they're being used in several ways.

This "off-label" compiler use then runs into issues, like that the flags we inject into our compiler activation create problems for development. Anything from -DNDEBUG / -O2, etc. etc., see:

Latest comment to this effect:

@rgommers: Polluting CFLAGS & co gives so many problems, isn't there an issue/plan somewhere to get rid of unnecessary flags and insert the desired ones for package building only inside conda-build/mamba-build?

In this same release cycle we also already had to add this warning:
image

Assuming we want to make our support explicit (for the usage of our compilers outside of conda-forge), we could potentially have both an internal & external compiler activation; the conda-forge internal one would add all the necessary flags (as now), and the external one would be reduced to a minimum.

Thoughts?

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