You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/maintainer/infrastructure.md
+26-12Lines changed: 26 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -502,12 +502,12 @@ is to ensure that packages stay compatible with each other. This is due to how c
502
502
packages have a so-called [Application Binary Interface](../glossary.md#abi)
503
503
(ABI), and how changes in the compiler infrastructure may break this ABI, leading
504
504
to crashes, miscalculations, etc. Generally speaking, using a consistent compiler
505
-
version greatly reduces the risk of ABI breaks.
505
+
setup greatly reduces the risk of ABI breaks.
506
506
507
507
### Using compilers in feedstocks
508
508
509
-
Each set of compilers is split into two kinds of packages: the implementation packages
510
-
that install the compiler itself, and an _activation_package that installs scripts
509
+
There are two kinds of compiler-related packages in Conda-forge: implementation packages
510
+
that install the compiler itself, and _activation_packages that install scripts
511
511
that set the build environment to use the respective compiler by default. These
512
512
scripts set up a number of standard environment variables such as `CC`, and perform
513
513
setup actions for the common build systems such as CMake and Meson.
@@ -567,14 +567,18 @@ for feedstocks, we try to keep the compilers in their various versions
567
567
working also for direct usage in Conda environments. In fact, we also provide a few
568
568
convenience packages to install the respective compilers. For example, [compilers feedstock
569
569
](https://github.com/conda-forge/compilers-feedstock) provides packages installing the same
570
-
C, C++ and Fortran compilers as normally used in build environments.
570
+
C, C++ and Fortran compilers as normally used in build environments, along with their
571
+
activation scripts.
571
572
572
573
For example, to install a C++ compiler, one could invoke:
573
574
574
575
```bash
575
576
conda install cxx-compiler
576
577
```
577
578
579
+
Please note that these packages must not be used in feedstock; instead the macros
580
+
listed in `Using compilers in feedstocks`\_ must be used.
581
+
578
582
### Compilers supplied by conda-forge
579
583
580
584
Currently conda-forge providers compilers for the following languages, that
@@ -588,9 +592,23 @@ can be specified as arguments to the `{{ compiler(...) }}` macro:
588
592
- `rust`; see [Rust packages](/docs/maintainer/example_recipes/rust/)
589
593
- `go-cgo`and `go-nocgo`; see [Go packages](/docs/maintainer/example_recipes/go/)
590
594
595
+
There exists an alternative, MinGW-based, compiler stack on Windows:
596
+
597
+
- `m2w64_c`for the C compiler
598
+
- `m2w64_cxx`for the C++ compiler
599
+
- `m2w64_fortran`for the Fortran compiler
600
+
601
+
However, it is falling out
602
+
of use now that most projects will natively support compilation also with MSVC, in addition
603
+
to several complications arising from mixing compiler stacks.
604
+
605
+
Furthermore, compiler names can also be passed explicitly to the `compiler()` macro,
606
+
for example `compiler('clang')` or `compiler('gcc')`, in which case they override
607
+
the platform defaults.
608
+
591
609
The authoritative source of the current compilers and versions for various languages
592
-
and platforms is the [conda_build_config.yaml](https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/master/recipe/conda_build_config.yaml)
593
-
in the [conda-forge/conda-forge-pinning-feedstock](https://github.com/conda-forge/conda-forge-pinning-feedstock)
610
+
and platforms is the [conda_build_config.yaml](https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/master/recipe/conda_build_config.yaml) file
611
+
in the [conda-forge/conda-forge-pinning-feedstock](https://github.com/conda-forge/conda-forge-pinning-feedstock) repository
594
612
as described in [Globally pinned packages](pinning_deps.md#globally-pinned-packages).
595
613
596
614
The default C and C++ compilers are GCC on Linux, Clang on macOS and VS2022
@@ -659,7 +677,8 @@ For such ABI-compatible upgrades, similar but looser principles apply:
659
677
660
678
The compiler activation and implementation packages are built by two separate
661
679
feedstocks, with a few exceptions. The activation packages install scripts
662
-
into `/etc/conda/activate.d` and `/etc/conda/deactivate.d` directories. These
680
+
into `/etc/conda/activate.d` and `/etc/conda/deactivate.d` directories, which
681
+
are invoked automatically by the conda-build tool when those environments are activated. These
663
682
scripts are then used by the build tool to respectively prepare for building
664
683
with the given compiler, and clean up afterwards. The implementation packages
665
684
install the compilers themselves. More details can be found in the [Anaconda compiler tools
@@ -695,11 +714,6 @@ Windows (MSVC + Flang):
695
714
(we cannot redistribute the actual MSVC compilers due to licensing constraints)
0 commit comments