Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions docs/maintainer/knowledge_base.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -782,8 +782,8 @@ corresponding compilers in `requirements/build` as normal.

The default OpenMP runtime used depends on the compiler and platform used. GCC (on Linux and the Windows MinGW
toolchain) uses the `libgomp` runtime. Clang (on all platforms) and GNU Fortran on macOS default to the `llvm-openmp`
runtime. MSVC may use its own runtime or `llvm-openmp`. However, individual projects may force building against
a different runtime through their build system configuration.
runtime. For MSVC `llvm-openmp` is recommended, though `llvm-openmp` requires use of the `/openmp:llvm` option.
However, individual projects may force building against a different runtime through their build system configuration.

On Linux, building against `libgomp` is recommended as the other OpenMP providers are backwards compatible with it.
When packages are built against `libgomp`, it is possible to use both `libgomp` and `llvm-openmp` provider at runtime.
Expand All @@ -794,19 +794,31 @@ to the defaults, though individual packages may require a different set:
<RecipeTabs>

```recipe
build:
script:
- set "CXXFLAGS=%CXXFLAGS% /openmp:llvm" # [win]

...

requirements:
host:
- llvm-openmp # [osx]
- libgomp # [linux]
- llvm-openmp # [not linux]
```

```recipe
build:
script:
- if: win
then: set "CXXFLAGS=%CXXFLAGS% /openmp:llvm"

...

requirements:
host:
- if: osx
then: llvm-openmp
- if: linux
then: libgomp
else: llvm-openmp
```

</RecipeTabs>
Expand Down
Loading