Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions recipe/install_pkg.bat
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ for /L %%I in (18,1,%PKG_VERSION:~0,2%) do (
if %ERRORLEVEL% neq 0 exit 1
)

:: this package creates a copy of 'libomp.dll' and installs it as 'libiomp5md.dll' to
:: replace Intel's openmp library. The issue with copying is that if a process loads
:: both 'libimp5md.dll' and 'libomp.dll', one of them will complain that another OpenMP
:: runtime is being loaded even though they are literally the same.
:: To avoid this, let's make 'libiomp5md.dll' a DLL that forwards to 'libomp.dll'
del /q "%LIBRARY_BIN%\\libiomp5md.dll"
python %SRC_DIR%\\create_forwarder_dll.py "%LIBRARY_BIN%\libomp.dll" "%LIBRARY_BIN%\libiomp5md.dll" --no-temp-dir

:: remove fortran bits from regular llvm-openmp package
if "%PKG_NAME%" NEQ "llvm-openmp-fortran" (
del /s /q %LIBRARY_INC%\omp_lib.mod
Expand Down
26 changes: 16 additions & 10 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,21 @@ package:
version: {{ version }}

source:
url: https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-{{ version.replace(".rc", "-rc") }}.tar.gz
sha256: a6cbad9b2243b17e87795817cfff2107d113543a12486586f8a055a2bb044963
# name folder for easier deletion; we do the equivalent of downloading
# the subproject sources, so the work folder then has openmp in it;
# for details see build scripts
folder: llvm-project
patches:
# fix for https://github.com/llvm/llvm-project/issues/54596
- patches/0001-link-libomp-to-compiler-rt-on-osx-arm.patch
- url: https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-{{ version.replace(".rc", "-rc") }}.tar.gz
sha256: a6cbad9b2243b17e87795817cfff2107d113543a12486586f8a055a2bb044963
# name folder for easier deletion; we do the equivalent of downloading
# the subproject sources, so the work folder then has openmp in it;
# for details see build scripts
folder: llvm-project
patches:
# fix for https://github.com/llvm/llvm-project/issues/54596
- patches/0001-link-libomp-to-compiler-rt-on-osx-arm.patch

- url: https://github.com/isuruf/create-forwarder-dll/archive/refs/tags/v0.3.tar.gz
sha256: d96f5386685a1b6f4b6ba041181a0b5df39f4fa7dbc93efc3f72c5fe19fa9983

build:
number: 1
number: 2

requirements:
build:
Expand All @@ -48,6 +51,7 @@ outputs:
ignore_run_exports_from:
- {{ compiler("cxx") }}
- {{ compiler("fortran") }}
- python *
run_exports:
strong:
- {{ pin_subpackage("llvm-openmp", max_pin=None) }}
Expand All @@ -59,6 +63,8 @@ outputs:
# for run-exports
- {{ stdlib("c") }}
- {{ compiler("cxx") }}
- python >=3
host:
run_constrained:
- openmp {{ version }}|{{ version }}.*
- intel-openmp <0.0a0
Expand Down