Skip to content

Commit 37c4001

Browse files
committed
update infrastructure.rst/compilers with current setup
1 parent 2cff82a commit 37c4001

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

src/maintainer/infrastructure.rst

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,82 @@ internal use (e.g. ``comp7``). We note again that the existence of these names
312312
does not imply any level of support or stability for the compilers
313313
that form the given stack.
314314

315+
The more recent status quo is that compilers can be upgraded in an ABI-compatible manner,
316+
meaning that we can just increase the version in our global pinning, and it will slowly
317+
roll out in a compatible manner to the ecosystem as feedstocks get rerendered.
318+
For such ABI-compatible upgrades, similar but looser principles apply:
319+
320+
* The pins are similarly in the global pinning, see :ref:`globally_pinned_packages`.
321+
* We provide no support of any kind in terms of the long-term availability of a given compiler generation.
322+
* We generally provide notice in the form of an announcement when a compiler is going to be upgraded.
323+
* In general, our compilers on Linux and OSX are using very recent compilers, whereas
324+
on windows, we generally use the last supported VS version.
325+
326+
Despite the lack of explicit support, we try to keep the compilers in their various versions
327+
working also outside of conda-forge, and even provide an easy way to install them
328+
(through the `compilers <https://github.com/conda-forge/compilers-feedstock>`_ feedstock).
329+
330+
In more detail, our default compiler stack is made up very differently on each platform.
331+
More specifically, each compiler needs an _activation_ that makes the difference
332+
between it being merely present in a build environment, and it being used by default.
333+
These will be installed when using ``{{ compiler('xyz') }}`` in ``meta.yaml``, where
334+
``'xyz'`` is one of ``'c', 'cxx', 'fortran', 'cuda', 'rust', 'go-cgo', 'go-nocgo'``.
335+
336+
Linux (GCC):
337+
338+
* [C, C++, Fortran] Activation: https://github.com/conda-forge/ctng-compiler-activation-feedstock/
339+
* [C, C++, Fortran] Implementation: https://github.com/conda-forge/ctng-compilers-feedstock
340+
* Note that when used in conjunction with CUDA, compiler versions are restricted by the
341+
maximum GCC version supported by nvcc (which is also reflected in the global pinning).
342+
343+
OSX (Clang):
344+
345+
* [C, C++] Activation: https://github.com/conda-forge/clang-compiler-activation-feedstock/
346+
* [C, C++] Required feedstocks:
347+
`llvmdev <https://github.com/conda-forge/llvmdev-feedstock>`_,
348+
`clangdev <https://github.com/conda-forge/clangdev-feedstock>`_,
349+
`compiler-rt <https://github.com/conda-forge/compiler-rt-feedstock>`_,
350+
`libcxx <https://github.com/conda-forge/libcxx-feedstock>`_,
351+
`openmp <https://github.com/conda-forge/openmp-feedstock>`_,
352+
`lld <https://github.com/conda-forge/lld-feedstock>`_,
353+
`cctools <https://github.com/conda-forge/cctools-and-ld64-feedstock>`_
354+
* [Fortran] Activation: https://github.com/conda-forge/gfortran_osx-64-feedstock/
355+
* [Fortran] Implementation: https://github.com/conda-forge/gfortran_impl_osx-64-feedstock/
356+
357+
Windows (MSVC):
358+
359+
* [C, C++] Activation: https://github.com/conda-forge/vc-feedstock
360+
(we cannot redistribute the actual MSVC compilers due to licensing constraints)
361+
* [Fortran] Activation & Implementation: https://github.com/conda-forge/flang-feedstock
362+
363+
There exists an alternative, MinGW-based, compiler stack on windows, which is available
364+
with a ``m2w64_`` prefix (e.g. ``{{ compiler('m2w64_c') }}``), which is however falling out
365+
of use now that most projects will natively support compilation also with MSVC, in addition
366+
to several complications arising from mixing compiler stacks.
367+
368+
Additionally, there is a possibility to use clang as a compiler also on Linux & Windows:
369+
370+
* Activation (Linux): https://github.com/conda-forge/clang-compiler-activation-feedstock/
371+
* Activation (Windows): https://github.com/conda-forge/clang-win-activation-feedstock/
372+
373+
Aside from the main C/C++/Fortran compilers, these are the feedstocks for the other compilers:
374+
375+
* [CUDA] https://github.com/conda-forge/nvcc-feedstock (CUDA infra currently being overhauled)
376+
* [Rust] `Activation <https://github.com/conda-forge/rust-activation-feedstock>`_
377+
and `Implementation <https://github.com/conda-forge/rust-feedstock>`_
378+
* [Go] https://github.com/conda-forge/go-feedstock
379+
380+
To upgrade the compiler version of our default compilers in the global pinning for
381+
Linux or OSX, ensure that the respective above-mentioned feedstocks have been rebuilt
382+
for the new major version, that all interrelated versions are lifted at the same time,
383+
and obviously that the compilers work (e.g. by testing them on some feedstocks by
384+
specifying the new version through the feedstock-local `conda_build_config.yaml`).
385+
386+
For Windows, we stay on older compilers for longer, because using a newer toolchain
387+
would force everyone wanting to locally develop with conda-forge artefacts to use
388+
a toolchain that's at least as new. A more in-depth explanation can be found
389+
`here <https://github.com/conda-forge/conda-forge.github.io/issues/1732>`_.
390+
315391
CentOS ``sysroot`` for ``linux-*`` Platforms
316392
---------------------------------------------
317393

0 commit comments

Comments
 (0)