Skip to content

Commit

Permalink
update infrastructure.rst/compilers with current setup
Browse files Browse the repository at this point in the history
  • Loading branch information
h-vetinari committed Apr 22, 2023
1 parent d4e14e8 commit 61724c8
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions src/maintainer/infrastructure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,77 @@ These compiler generations may have some unofficial names for our internally. We
the existence of these names does not imply any level of support or stability for the compilers
that form the given stack.

The more recent status quo is that compilers can be upgraded in an ABI-compatible manner,
meaning that we can just increase the version in our global pinning, and it will slowly
roll out in a compatible manner to the ecosystem as feedstocks get rerendered.
For such ABI-compatible upgrades, similar but looser principles apply:

* The pins are similarly in the global pinning, see :ref:`globally_pinned_packages`.
* We provide no support of any kind in terms of the long-term availability of a given compiler generation.
* We generally provide notice in the form of an announcement when a compiler is going to be upgraded.
* In general, our compilers on Linux and OSX are using very recent compilers, whereas
on windows, we generally use the last supported VS version.

Despite the lack of explicit support, we try to keep the compilers in their various versions
working also outside of conda-forge, and even provide an easy way to install them
(through the `compilers<https://github.com/conda-forge/compilers-feedstock>`_ feedstock).

In more detail, our default compiler stack is made up very differently on each platform.
More specifically, each compiler needs an _activation_ that makes the difference
between it being merely present in a build environment, and it being used by default.
These will be installed when using `{{ compiler('xyz') }}` in `meta.yaml`, where `'xyz'`
is one of `'c', 'cxx', 'fortran', 'cuda', 'rust', 'go-cgo', 'go-nocgo'`.

Linux:
* [C, C++, Fortran] Activation: https://github.com/conda-forge/ctng-compiler-activation-feedstock/
* [C, C++, Fortran] Implementation: https://github.com/conda-forge/ctng-compilers-feedstock
* Note that when used in conjunction with CUDA, compiler versions are restricted by the
maximum GCC version supported by nvcc (which is also reflected in the global pinning).

OSX:
* [C, C++] Activation: https://github.com/conda-forge/clang-compiler-activation-feedstock/
* [C, C++] Required feedstocks:
`llvmdev<https://github.com/conda-forge/llvmdev-feedstock>`_,
`clangdev<https://github.com/conda-forge/clangdev-feedstock>`_,
`compiler-rt<https://github.com/conda-forge/compiler-rt-feedstock>`_,
`libcxx<https://github.com/conda-forge/libcxx-feedstock>`_,
`openmp<https://github.com/conda-forge/openmp-feedstock>`_,
`lld<https://github.com/conda-forge/lld-feedstock>`_,
`cctools<https://github.com/conda-forge/cctools-and-ld64-feedstock>`_
* [Fortran] Activation: https://github.com/conda-forge/gfortran_osx-64-feedstock/
* [Fortran] Implementation: https://github.com/conda-forge/gfortran_impl_osx-64-feedstock/

Windows:
* [C, C++] Activation: https://github.com/conda-forge/vc-feedstock
* [C, C++] We cannot redistribute the actual MSVC compilers due to licensing constraints
* [Fortran] Activation & Implementation: https://github.com/conda-forge/flang-feedstock

There exists an alternative, MinGW-based, compiler stack on windows, which is available
with a `m2w64_` prefix (e.g. `{{ compiler('m2w64_c') }}`), which is however falling out
of use now that most projects will natively support compilation also with MSVC, in addition
to several complications arising from mixing compiler stacks.

Additionally, there is a possibility to use clang as a compiler also on Linux & Windows:
* Activation (Linux): https://github.com/conda-forge/clang-compiler-activation-feedstock/
* Activation (Windows): https://github.com/conda-forge/clang-win-activation-feedstock/

Aside from the main C/C++ compilers, these are the feedstocks for other compilers:
* [CUDA] https://github.com/conda-forge/nvcc-feedstock (CUDA infra currently being overhauled)
* [Rust] `Activation<https://github.com/conda-forge/rust-activation-feedstock>`_
and `Implementation<https://github.com/conda-forge/rust-feedstock>`_
* [Go] https://github.com/conda-forge/go-feedstock

To upgrade the compiler version of our default compilers in the global pinning for
Linux or OSX, ensure that all the above feedstocks have been rebuilt for the respective
new major version, that all interrelated versions are lifted at the same time,
and obviously that the compilers work (e.g. by testing them on some feedstocks by
specifying the new version through the feedstock-local `conda_build_config.yaml`).

For Windows, we stay on older compilers for longer, because using a newer toolchain
would force everyone wanting to locally develop with conda-forge artefacts to use
a toolchain that's at least as new. A more in-depth explanation can be found
`here<https://github.com/conda-forge/conda-forge.github.io/issues/1732>`_.

CentOS ``sysroot`` for ``linux-*`` Platforms
---------------------------------------------

Expand Down

0 comments on commit 61724c8

Please sign in to comment.