Skip to content

Commit 64d6e39

Browse files
authored
Merge pull request #115 from regro-cf-autotick-bot/18.1.0_h098063
openmp v18.1.1
2 parents 260231e + 79b17e1 commit 64d6e39

10 files changed

Lines changed: 109 additions & 21 deletions

.gitignore

Lines changed: 23 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.scripts/build_steps.sh

Lines changed: 3 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.scripts/run_docker_build.sh

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.scripts/run_osx_build.sh

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.scripts/run_win_build.bat

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build-locally.py

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

recipe/build-llvm-openmp.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ fi
4242
if [[ "${PKG_VERSION}" == *rc* ]]; then
4343
export PKG_VERSION=${PKG_VERSION::${#PKG_VERSION}-4}
4444
fi
45+
# used in patch to construct path to libclang_rt.builtins
46+
export PKG_VERSION_MAJOR=$(echo ${PKG_VERSION} | cut -d "." -f1)
4547

4648
cmake -G Ninja \
4749
${CMAKE_ARGS} \

recipe/meta.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% set version = "17.0.6" %}
1+
{% set version = "18.1.1" %}
22
# check https://clang.llvm.org/docs/OpenMPSupport.html
33
# occasionally to see last fully supported openmp ver.
44
{% set openmp_ver = "4.5" %}
@@ -9,11 +9,16 @@ package:
99

1010
source:
1111
url: https://github.com/llvm/llvm-project/releases/download/llvmorg-{{ version.replace(".rc", "-rc") }}/llvm-project-{{ version.replace(".rc", "rc") }}.src.tar.xz
12-
sha256: 58a8818c60e6627064f312dbf46c02d9949956558340938b71cf731ad8bc0813
12+
sha256: 8f34c6206be84b186b4b31f47e1b52758fa38348565953fad453d177ef34c0ad
1313
# name folder for easier deletion; we do the equivalent of downloading
1414
# the subproject sources, so the work folder then has openmp in it;
1515
# for details see build scripts
1616
folder: llvm-project
17+
patches:
18+
# backport https://github.com/llvm/llvm-project/pull/80174
19+
- patches/0001-openmp-On-Windows-fix-standalone-cmake-build.patch
20+
# intermediate fix for https://github.com/llvm/llvm-project/issues/54596
21+
- patches/0002-link-libomp-to-compiler-rt-on-osx-arm.patch
1722

1823
build:
1924
number: 0
@@ -43,6 +48,8 @@ outputs:
4348
- llvmdev {{ version }}|{{ version }}.*
4449
- zlib # [linux]
4550
- zstd # [linux]
51+
# see https://github.com/llvm/llvm-project/issues/54596
52+
- compiler-rt # [osx and arm64]
4653
run_constrained:
4754
- openmp {{ version }}|{{ version }}.*
4855
test:
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
From c553881877d57c30693ede93684851210ea78d30 Mon Sep 17 00:00:00 2001
2+
From: Alexandre Ganea <[email protected]>
3+
Date: Wed, 31 Jan 2024 13:22:19 -0500
4+
Subject: [PATCH 1/2] [openmp] On Windows, fix standalone cmake build
5+
6+
This fixes: https://github.com/llvm/llvm-project/issues/80117
7+
---
8+
openmp/cmake/HandleOpenMPOptions.cmake | 8 ++++++++
9+
1 file changed, 8 insertions(+)
10+
11+
diff --git a/openmp/cmake/HandleOpenMPOptions.cmake b/openmp/cmake/HandleOpenMPOptions.cmake
12+
index 201aeabbd3df..71346201129b 100644
13+
--- a/openmp/cmake/HandleOpenMPOptions.cmake
14+
+++ b/openmp/cmake/HandleOpenMPOptions.cmake
15+
@@ -9,6 +9,14 @@ if (NOT COMMAND append_if)
16+
endfunction()
17+
endif()
18+
19+
+if (NOT COMMAND append)
20+
+ function(append value)
21+
+ foreach(variable ${ARGN})
22+
+ set(${variable} "${${variable}} ${value}" PARENT_SCOPE)
23+
+ endforeach(variable)
24+
+ endfunction()
25+
+endif()
26+
+
27+
# MSVC and clang-cl in compatibility mode map -Wall to -Weverything.
28+
# TODO: LLVM adds /W4 instead, check if that works for the OpenMP runtimes.
29+
if (NOT MSVC)
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
From 9fd9c8c26219bf8995321b7786e853d6c51e1dc8 Mon Sep 17 00:00:00 2001
2+
From: "H. Vetinari" <[email protected]>
3+
Date: Thu, 1 Feb 2024 12:29:07 +0100
4+
Subject: [PATCH 2/2] link libomp to compiler-rt on osx-arm
5+
6+
---
7+
openmp/runtime/src/CMakeLists.txt | 6 ++++++
8+
1 file changed, 6 insertions(+)
9+
10+
diff --git a/openmp/runtime/src/CMakeLists.txt b/openmp/runtime/src/CMakeLists.txt
11+
index 619d4f7ba458..11d9c969e381 100644
12+
--- a/openmp/runtime/src/CMakeLists.txt
13+
+++ b/openmp/runtime/src/CMakeLists.txt
14+
@@ -161,6 +161,12 @@ if(OPENMP_STANDALONE_BUILD OR (NOT OPENMP_ENABLE_LIBOMP_PROFILING))
15+
add_library(omp ${LIBOMP_LIBRARY_KIND} ${LIBOMP_SOURCE_FILES})
16+
# Linking command will include libraries in LIBOMP_CONFIGURED_LIBFLAGS
17+
target_link_libraries(omp ${LIBOMP_CONFIGURED_LIBFLAGS} ${LIBOMP_DL_LIBS})
18+
+ if(APPLE AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
19+
+ cmake_path(SET CLANG_RT_BUILTINS_LIBRARY
20+
+ NORMALIZE
21+
+ "$ENV{PREFIX}/lib/clang/$ENV{PKG_VERSION_MAJOR}/lib/libclang_rt.builtins_arm64_osx.a")
22+
+ target_link_libraries(omp ${CLANG_RT_BUILTINS_LIBRARY})
23+
+ endif()
24+
else()
25+
add_llvm_library(omp ${LIBOMP_LIBRARY_KIND} ${LIBOMP_SOURCE_FILES} PARTIAL_SOURCES_INTENDED
26+
LINK_LIBS ${LIBOMP_CONFIGURED_LIBFLAGS} ${LIBOMP_DL_LIBS}

0 commit comments

Comments
 (0)