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
2 changes: 1 addition & 1 deletion .azure-pipelines/azure-pipelines-osx.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions .ci_support/linux_64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ c_stdlib:
- sysroot
c_stdlib_version:
- '2.17'
cdt_name:
- conda
channel_sources:
- conda-forge
channel_targets:
Expand Down
2 changes: 0 additions & 2 deletions .ci_support/linux_aarch64_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ c_stdlib:
- sysroot
c_stdlib_version:
- '2.17'
cdt_name:
- conda
channel_sources:
- conda-forge
channel_targets:
Expand Down
2 changes: 0 additions & 2 deletions .ci_support/linux_ppc64le_.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ c_stdlib:
- sysroot
c_stdlib_version:
- '2.17'
cdt_name:
- conda
channel_sources:
- conda-forge
channel_targets:
Expand Down
1 change: 1 addition & 0 deletions .gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion recipe/install_pkg.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ for /L %%I in (18,1,%PKG_VERSION:~0,2%) do (
:: 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
create-forwarder-dll "%LIBRARY_BIN%\libomp.dll" "%LIBRARY_BIN%\libiomp5md.dll" --no-temp-dir
if %ERRORLEVEL% neq 0 exit 1

:: remove fortran bits from regular llvm-openmp package
if "%PKG_NAME%" NEQ "llvm-openmp-fortran" (
Expand Down
30 changes: 14 additions & 16 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@
# occasionally to see last fully supported openmp ver.
{% set openmp_ver = "4.5" %}

# on osx we need to use cxx_compiler_version, rest can use package version
{% set clang_major = version.split(".")[0]|int %}
{% if cxx_compiler_version is not undefined %}
{% set clang_major = cxx_compiler_version.split(".")[0]|int %} # [osx]
{% endif %}
{% set clang_test_version = "19" %}

package:
name: openmp
Expand All @@ -24,11 +21,8 @@ source:
# 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
Comment on lines -27 to -28
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, I must have been looking at a stale file, because I had been consciously looking to delete that, but couldn't see it.


build:
number: 2
number: 3

requirements:
build:
Expand All @@ -41,7 +35,7 @@ requirements:
host:
- llvmdev {{ version }}
# see https://github.com/llvm/llvm-project/issues/54596
- compiler-rt # [osx and arm64]
- compiler-rt {{ version }} # [osx and arm64]

outputs:
- name: llvm-openmp
Expand All @@ -64,24 +58,25 @@ outputs:
- {{ stdlib("c") }}
- {{ compiler("cxx") }}
- python >=3
- create-forwarder-dll # [win]
host:
run_constrained:
- openmp {{ version }}|{{ version }}.*
- intel-openmp <0.0a0
test:
requires:
# ensure we don't pull in too-new clang (when on maintenance branch),
# which breaks assumption about symlink below
- clangxx <={{ version }}
- clang-{{ clang_test_version }}
- {{ compiler('cxx') }}
- ld64 # [osx]
files:
- omp_hello.c
commands:
# headers
- "@echo on" # [win]
- test -f $PREFIX/include/omp.h # [unix]
- if not exist %LIBRARY_INC%\omp.h exit 1 # [win]
# clang-specific one (symlink on unix; copies on win, see install_pkg.bat)
- test -f $PREFIX/lib/clang/{{ clang_major }}/include/omp.h # [unix]
- test -f $PREFIX/lib/clang/{{ clang_test_version }}/include/omp.h # [unix]
{% for ver in range(18, clang_major + 1) %}
- if not exist %LIBRARY_LIB%\clang\{{ ver }}\include\omp.h exit 1 # [win]
{% endfor %}
Expand All @@ -96,12 +91,14 @@ outputs:
- test -f $PREFIX/lib/libomp.so # [linux]
- test -f $PREFIX/lib/libomp.dylib # [osx]
- if not exist %LIBRARY_BIN%\libomp.dll exit 1 # [win]
- if not exist %LIBRARY_BIN%\libiomp5md.dll exit 1 # [win]
- if not exist %LIBRARY_LIB%\libomp.lib exit 1 # [win]

# compilation test
- export LNK_XTRA="-Wl,--allow-shlib-undefined" # [linux]
- $PREFIX/bin/clang -v -fopenmp -I$PREFIX/include -L$PREFIX/lib -Wl,-rpath,$PREFIX/lib $LNK_XTRA omp_hello.c -o omp_hello # [unix]
- '%LIBRARY_BIN%\clang -v -fopenmp -I%LIBRARY_INC% -L%LIBRARY_LIB% omp_hello.c -o omp_hello.exe' # [win]
- export LNK="-L$PREFIX/lib -Wl,-rpath,$PREFIX/lib" # [unix]
- export LNK="${LNK} -Wl,--allow-shlib-undefined" # [linux]
- $PREFIX/bin/clang-{{ clang_test_version }} -v -fopenmp -I$PREFIX/include $LNK omp_hello.c -o omp_hello # [unix]
- '%LIBRARY_BIN%\clang-{{ clang_test_version }} -v -fopenmp -I%LIBRARY_INC% -L%LIBRARY_LIB% omp_hello.c -o omp_hello.exe' # [win]
- ./omp_hello # [unix]
- '%cd%\omp_hello.exe' # [win]

Expand All @@ -123,6 +120,7 @@ outputs:
- {{ stdlib("c") }}
- {{ compiler("cxx") }}
- {{ compiler("fortran") }} # [linux]
- create-forwarder-dll # [win]
host:
- {{ pin_subpackage("llvm-openmp", exact=True) }}
run:
Expand Down