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
+58-18Lines changed: 58 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -560,6 +560,16 @@ cxx_compiler_version:
560
560
- 21
561
561
```
562
562
563
+
Alternatively, the specific compiler name can be used as an argument to
564
+
the `{{ compiler(...) }}` macro, e.g.:
565
+
566
+
```yaml
567
+
requirements:
568
+
build:
569
+
- {{ compiler('clang') }}
570
+
- {{ stdlib('c') }}
571
+
```
572
+
563
573
### Installing standard compilers manually
564
574
565
575
While the primary use case for conda-forge compiler packages is to provide build tools
@@ -570,17 +580,37 @@ convenience packages to install the respective compilers. For example, [compiler
570
580
C, C++ and Fortran compilers as normally used in build environments, along with their
571
581
activation scripts.
572
582
573
-
For example, to install a C++ compiler, one could invoke:
583
+
For example, to install these three compilers, one could invoke:
584
+
585
+
```bash
586
+
conda install compilers
587
+
```
588
+
589
+
Alternatively, specific compilers can be requested:
574
590
575
591
```bash
576
-
conda install cxx-compiler
592
+
conda install cxx-compiler fortran-compiler
577
593
```
578
594
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.
595
+
Other available convenience packages are listed in the [platform-default
596
+
compilers](#platform-default-compilers) list.
597
+
598
+
Please note that these packages must not be used in a feedstock; instead the macros
599
+
listed in [Using compilers in feedstocks](#using-compilers-in-feedstocks) must be used.
600
+
601
+
### MSVC compiler on Windows
602
+
603
+
Conda-forge is not allowed to redistribute the MSVC compiler used on Windows,
604
+
and therefore only provides the activation scripts for an externally installed
605
+
compiler. Users who wish to compile code using MSVC, both for local use
606
+
and feedstock builds, have to install Microsoft Visual Studio manually.
607
+
For more information, see [Notes on native code](/docs/maintainer/knowledge_base/#notes-on-native-code)
608
+
in Knowledge Base.
581
609
582
610
### Compilers supplied by conda-forge
583
611
612
+
#### Platform-default compilers
613
+
584
614
Currently conda-forge providers compilers for the following languages, that
585
615
can be specified as arguments to the `{{ compiler(...) }}` macro:
586
616
@@ -592,20 +622,6 @@ can be specified as arguments to the `{{ compiler(...) }}` macro:
592
622
- `rust`; see [Rust packages](/docs/maintainer/example_recipes/rust/)
593
623
- `go-cgo`and `go-nocgo`; see [Go packages](/docs/maintainer/example_recipes/go/)
594
624
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
-
Along with these compilers, `stdlib('m2w64_c')` needs to be used. However, this stack 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
-
609
625
The authoritative source of the current compilers and versions for various languages
610
626
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
627
in the [conda-forge/conda-forge-pinning-feedstock](https://github.com/conda-forge/conda-forge-pinning-feedstock) repository
@@ -619,6 +635,30 @@ and Flang on Windows.
619
635
Note that when used in conjunction with CUDA, the GCC version is restricted by the
620
636
maximum version supported by nvcc (which is also reflected in the global pinning).
621
637
638
+
#### clang vs. clang-cl on Windows
639
+
640
+
The `clang` compiler package installs two frontends, and conda-forge
641
+
provides separate activation scripts for Windows, for each of them. Therefore,
642
+
the following arguments can be used in `recipe/conda_build_config.yaml`
643
+
or passed to the `{{ compiler(...) }}` macro:
644
+
645
+
- `clang`to use the `clang` frontend using GCC argument syntax
646
+
- `clang-cl`to use the `clang-cl` frontend with MSVC argument syntax
647
+
648
+
#### MinGW-based compiler stack for Windows
649
+
650
+
There exists an alternative, MinGW-based, compiler stack on Windows:
651
+
652
+
- `m2w64_c`for the C compiler
653
+
- `m2w64_cxx`for the C++ compiler
654
+
- `m2w64_fortran`for the Fortran compiler
655
+
656
+
Along with these compilers, `stdlib('m2w64_c')` needs to be used.
657
+
658
+
However, this stack is falling out of use now that most projects will natively
659
+
support compilation also with MSVC, in addition to several complications
660
+
arising from mixing compiler stacks.
661
+
622
662
### Compiler ABI stability policy
623
663
624
664
Compilers generally strive to maintain ABI-compatibility across versions, meaning that
0 commit comments