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
6 changes: 5 additions & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ source:
# backport of zlib patches, can be dropped for v>15.0.3, see
# https://reviews.llvm.org/D135457 & https://reviews.llvm.org/D136065
- patches/0002-CMake-Fix-Findzstd-module-for-shared-DLL-on-Windows.patch
- patches/no-windows-symlinks.patch

build:
number: 0
number: 1
merge_build_host: false

requirements:
Expand Down Expand Up @@ -65,8 +66,11 @@ outputs:
- test -f $PREFIX/include/llvm/Pass.h # [not win]
- test -f $PREFIX/lib/libLLVMCore.a # [not win]
- $PREFIX/libexec/llvm/not false # [not win]
- $PREFIX/bin/llvm-nm --help # [not win]
- if not exist %LIBRARY_INC%\\llvm\\Pass.h exit 1 # [win]
- if not exist "%LIBRARY_PREFIX%"\\libexec\llvm\not.exe exit 1 # [win]
- if not exist "%LIBRARY_BIN%"\\llvm-nm.exe exit 1 # [win]
- llvm-nm.exe --help # [win]

# Contains the shared libraries. To make different LLVM libraries co-installable
# soversion is appended to the package name.
Expand Down
27 changes: 27 additions & 0 deletions recipe/patches/no-windows-symlinks.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
commit ca5eab8b706d4307b954f39254efdfa6cad47cb5
Author: Isuru Fernando <idf2@illinois.edu>
Date: Tue Nov 8 13:34:20 2022 -0600

Always copy on windows

The conda package build machine may have permissions to
create symlinks, but conda doesn't handle symlinks on windows
properly

diff --git a/llvm/cmake/modules/LLVMInstallSymlink.cmake b/llvm/cmake/modules/LLVMInstallSymlink.cmake
index e9be04aceb3d..1ff77f28385a 100644
--- a/llvm/cmake/modules/LLVMInstallSymlink.cmake
+++ b/llvm/cmake/modules/LLVMInstallSymlink.cmake
@@ -13,10 +13,11 @@ function(install_symlink name target outdir)

message(STATUS "Creating ${name}")

+ if(NOT CMAKE_HOST_WIN32)
execute_process(
COMMAND "${CMAKE_COMMAND}" -E create_symlink "${target}" "${name}"
WORKING_DIRECTORY "${outdir}" ERROR_VARIABLE has_err)
- if(CMAKE_HOST_WIN32 AND has_err)
+ else()
execute_process(
COMMAND "${CMAKE_COMMAND}" -E copy "${target}" "${name}"
WORKING_DIRECTORY "${outdir}")