mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 22:01:37 +08:00
[halide] Update to version 10.0.0 (#13860)
* fix LLVM target-all feature * [halide] bump Halide to version 10.0.0 * Use empty package policy to allow plugins to be located in lib. This is following the recommendations in a conversation I had with Robert Schumacher on the #vcpkg CppLang Slack channel. This recommendation was derived from the fact that "cmake defaults module DLLs into the lib folder, which makes vcpkg's current policy very inconvenient for authors" and that I do not plan to enable build systems other than CMake. * [halide] skip x86-windows due to MSVC bug * [halide] restore x64-windows-static fail status * add usage file to Halide * Update CONTROL version * Remove '!emscripten` from ports/halide/CONTROL Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Co-authored-by: Lily <47812810+LilyWangL@users.noreply.github.com> Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
This commit is contained in:
parent
76031034d5
commit
7e3d3beac5
@ -1,49 +1,63 @@
|
||||
Source: halide
|
||||
Version: master_2020_03_07
|
||||
Version: 10.0.0
|
||||
Homepage: https://github.com/halide/Halide
|
||||
Description: Halide is a programming language designed to make it easier to write high-performance image processing code on modern machines.
|
||||
Build-Depends: llvm[tools], openblas
|
||||
Description: Halide is a programming language designed to make it easier to write high-performance image and array processing code on modern machines.
|
||||
Supports: !uwp
|
||||
Default-Features: jit
|
||||
Build-Depends: llvm[enable-rtti,tools,clang]
|
||||
|
||||
Feature: app
|
||||
Description: app support
|
||||
Feature: jit
|
||||
Description: Include targets required for jit compilation
|
||||
Build-Depends: halide[core,target-x86] (x86|x64), halide[core,target-arm] (arm&!arm64), halide[core,target-aarch64] (arm64), halide[target-all] (!x86&!x64&!arm&!arm64)
|
||||
|
||||
Feature: tutorials
|
||||
Description: tutorials support
|
||||
Feature: target-all
|
||||
Description: Include all targets
|
||||
Build-Depends: halide[core,target-aarch64,target-amdgpu,target-arm,target-d3d12compute,target-hexagon,target-metal,target-mips,target-nvptx,target-opencl,target-opengl,target-powerpc,target-riscv,target-x86]
|
||||
|
||||
Feature: utils
|
||||
Description: utils
|
||||
Feature: target-aarch64
|
||||
Description: Include AArch64 target
|
||||
Build-Depends: llvm[core,target-aarch64]
|
||||
|
||||
Feature: nativeclient
|
||||
Description: nativeclient
|
||||
Feature: target-amdgpu
|
||||
Description: Include AMDGPU target
|
||||
Build-Depends: llvm[core,target-amdgpu]
|
||||
|
||||
Feature: hexagon
|
||||
Description: hexagon
|
||||
Feature: target-arm
|
||||
Description: Include ARM target
|
||||
Build-Depends: llvm[core,target-arm]
|
||||
|
||||
Feature: metal
|
||||
Description: metal support
|
||||
Feature: target-d3d12compute
|
||||
Description: Include Direct3D 12 Compute target
|
||||
|
||||
Feature: mips
|
||||
Description: mips support
|
||||
Feature: target-hexagon
|
||||
Description: Include Hexagon target
|
||||
Build-Depends: llvm[core,target-hexagon]
|
||||
|
||||
Feature: powerpc
|
||||
Description: powerpc support
|
||||
Feature: target-metal
|
||||
Description: Include Metal target
|
||||
|
||||
Feature: ptx
|
||||
Description: ptx support
|
||||
Feature: target-mips
|
||||
Description: Include Mips target
|
||||
Build-Depends: llvm[core,target-mips]
|
||||
|
||||
Feature: opencl
|
||||
Build-Depends: opencl
|
||||
Description: opencl support
|
||||
Feature: target-nvptx
|
||||
Description: Include NVPTX target
|
||||
Build-Depends: llvm[core,target-nvptx]
|
||||
|
||||
Feature: opengl
|
||||
Build-Depends: opengl
|
||||
Description: opengl support
|
||||
Feature: target-opencl
|
||||
Description: Include OpenCL-C target
|
||||
|
||||
Feature: rtti
|
||||
Description: rtti support
|
||||
Feature: target-opengl
|
||||
Description: Include OpenGL/GLSL target
|
||||
|
||||
Feature: docs
|
||||
Description: docs
|
||||
Feature: target-powerpc
|
||||
Description: Include PowerPC target
|
||||
Build-Depends: llvm[core,target-powerpc]
|
||||
|
||||
Feature: test
|
||||
Description: test
|
||||
Feature: target-riscv
|
||||
Description: Include RISCV target
|
||||
Build-Depends: llvm[core,target-riscv]
|
||||
|
||||
Feature: target-x86
|
||||
Description: Include X86 target
|
||||
Build-Depends: llvm[core,target-x86]
|
||||
|
@ -1,35 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 577b61ed2..7c6dd8ac4 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -432,7 +432,7 @@ install(FILES
|
||||
DESTINATION include)
|
||||
|
||||
install(DIRECTORY tutorial
|
||||
- DESTINATION .
|
||||
+ DESTINATION share/halide
|
||||
FILES_MATCHING
|
||||
PATTERN "*.cpp"
|
||||
PATTERN "*.h"
|
||||
@@ -463,10 +463,10 @@ install(FILES
|
||||
README.md
|
||||
README_rungen.md
|
||||
README_webassembly.md
|
||||
- DESTINATION .)
|
||||
+ DESTINATION share/halide)
|
||||
|
||||
# ---- halide.cmake
|
||||
-install(FILES halide.cmake DESTINATION .)
|
||||
+install(FILES halide.cmake DESTINATION share/halide)
|
||||
|
||||
# ---- halide_config
|
||||
file(GLOB FILES "${Halide_SOURCE_DIR}/tools/halide_config.*.tpl")
|
||||
@@ -475,7 +475,7 @@ foreach(F ${FILES})
|
||||
string(REGEX REPLACE "\\.tpl$" "" FNAME "${FNAME}") # Strip .tpl extension
|
||||
configure_file("${F}" "${CMAKE_BINARY_DIR}/${FNAME}" @ONLY)
|
||||
install(FILES "${CMAKE_BINARY_DIR}/${FNAME}"
|
||||
- DESTINATION .)
|
||||
+ DESTINATION share/halide)
|
||||
endforeach()
|
||||
|
||||
add_custom_target(distrib
|
@ -1,73 +1,70 @@
|
||||
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
||||
|
||||
# Halide distributes some loadable modules that belong in lib on all platforms.
|
||||
# CMake defaults module DLLs into the lib folder, which is incompatible with
|
||||
# vcpkg’s current policy. This sidesteps that issue, a bit bluntly.
|
||||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO halide/Halide
|
||||
REF f43293be3725bb959941e38c1b1fa9ae925f7389
|
||||
SHA512 f223185e208acf6c5b73353a6b5be815db5f2598f568596e800c35ea40b0babe4630da44229e14a5607e9d5e78298d07e7b36a9cbc7b71bf3e665bc12caff68e
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-install-path.patch
|
||||
REF fa9d6e1fa40c449883a7d64ca1fbc58ec94259af # refs/tags/v10.0.0
|
||||
SHA512 e6da0b0798d921443a946159a67db8631e423d5bdd738c59ac872c1113cd40223f02f2bc63b3e7d6001eebb4c6b85a9229030f17f6082ae4e7c489d5612b966c
|
||||
HEAD_REF release/10.x
|
||||
)
|
||||
|
||||
set(TARGET_X86 OFF)
|
||||
set(TARGET_ARM OFF)
|
||||
set(TARGET_AARCH64 OFF)
|
||||
if (VCPKG_TARGET_ARCHITECTURE STREQUAL x86 OR VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
|
||||
# llvm x86 components are required for llvm x64
|
||||
set(TARGET_X86 ON)
|
||||
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL arm)
|
||||
set(TARGET_X86 OFF)
|
||||
if (TARGET_TRIPLET STREQUAL arm64)
|
||||
set(TARGET_AARCH64 ON)
|
||||
else()
|
||||
set(TARGET_ARM ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
set(HALIDE_SHARED_LIBRARY ON)
|
||||
else()
|
||||
set(HALIDE_SHARED_LIBRARY OFF)
|
||||
endif()
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
app WITH_APPS
|
||||
test WITH_TESTS
|
||||
tutorials WITH_TUTORIALS
|
||||
docs WITH_DOCS
|
||||
utils WITH_UTILS
|
||||
nativeclient TARGET_NATIVE_CLIENT
|
||||
hexagon TARGET_HEXAGON
|
||||
metal TARGET_METAL
|
||||
mips TARGET_MIPS
|
||||
powerpc TARGET_POWERPC
|
||||
ptx TARGET_PTX
|
||||
opencl TARGET_OPENCL
|
||||
opengl TARGET_OPENGL
|
||||
opengl TARGET_OPENGLCOMPUTE
|
||||
rtti HALIDE_ENABLE_RTTI
|
||||
target-aarch64 TARGET_AARCH64
|
||||
target-amdgpu TARGET_AMDGPU
|
||||
target-arm TARGET_ARM
|
||||
target-d3d12compute TARGET_D3D12COMPUTE
|
||||
target-hexagon TARGET_HEXAGON
|
||||
target-metal TARGET_METAL
|
||||
target-mips TARGET_MIPS
|
||||
target-nvptx TARGET_NVPTX
|
||||
target-opencl TARGET_OPENCL
|
||||
target-opengl TARGET_OPENGL
|
||||
target-powerpc TARGET_POWERPC
|
||||
target-riscv TARGET_RISCV
|
||||
target-x86 TARGET_X86
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS ${FEATURE_OPTIONS}
|
||||
-DTRIPLET_SYSTEM_ARCH=${TRIPLET_SYSTEM_ARCH}
|
||||
-DHALIDE_SHARED_LIBRARY=${HALIDE_SHARED_LIBRARY}
|
||||
-DTARGET_X86=${TARGET_X86}
|
||||
-DTARGET_ARM=${TARGET_ARM}
|
||||
-DTARGET_AARCH64=${TARGET_AARCH64}
|
||||
#-DTARGET_AMDGPU
|
||||
-DWARNINGS_AS_ERRORS=OFF
|
||||
-DWITH_APPS=NO
|
||||
-DWITH_DOCS=NO
|
||||
-DWITH_PYTHON_BINDINGS=NO
|
||||
-DWITH_TESTS=NO
|
||||
-DWITH_TUTORIALS=NO
|
||||
-DWITH_UTILS=NO
|
||||
-DCMAKE_INSTALL_LIBDIR=bin
|
||||
-DCMAKE_INSTALL_DATADIR=share/${PORT}
|
||||
-DHALIDE_INSTALL_CMAKEDIR=share/${PORT}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH share/halide)
|
||||
vcpkg_copy_tools(
|
||||
TOOL_NAMES
|
||||
featurization_to_sample
|
||||
get_host_target
|
||||
retrain_cost_model
|
||||
weightsdir_to_weightsfile
|
||||
AUTO_CLEAN
|
||||
)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/halide_config.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/halide-config.cmake)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/halide_config.make ${CURRENT_PACKAGES_DIR}/share/${PORT}/halide-config.make)
|
||||
vcpkg_fixup_cmake_targets()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/tutorial)
|
||||
|
||||
file(GLOB readmes "${CURRENT_PACKAGES_DIR}/share/${PORT}/*.md")
|
||||
file(REMOVE ${readmes})
|
||||
|
||||
configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
|
||||
configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage COPYONLY)
|
||||
|
14
ports/halide/usage
Normal file
14
ports/halide/usage
Normal file
@ -0,0 +1,14 @@
|
||||
The package halide provides CMake targets:
|
||||
|
||||
find_package(Halide REQUIRED)
|
||||
|
||||
# JIT mode:
|
||||
target_link_libraries(main PRIVATE Halide::Halide)
|
||||
|
||||
# AOT mode:
|
||||
target_link_libraries(gen PRIVATE Halide::Generator)
|
||||
add_halide_library(filter FROM gen)
|
||||
target_link_libraries(main PRIVATE filter)
|
||||
|
||||
For more information see:
|
||||
https://github.com/halide/Halide/blob/v10.0.0/README_cmake.md
|
@ -1,10 +1,10 @@
|
||||
Source: llvm
|
||||
Version: 10.0.0
|
||||
Port-Version: 5
|
||||
Port-Version: 6
|
||||
Homepage: https://llvm.org/
|
||||
Description: The LLVM Compiler Infrastructure
|
||||
Supports: !uwp
|
||||
Default-Features: tools, enable-rtti, disable-assertions, disable-abi-breaking-checks, clang, disable-clang-static-analyzer, lld
|
||||
Default-Features: tools, enable-rtti, disable-assertions, disable-abi-breaking-checks, clang, disable-clang-static-analyzer, lld, default-targets
|
||||
|
||||
Feature: tools
|
||||
Description: Build LLVM tools.
|
||||
@ -12,8 +12,13 @@ Description: Build LLVM tools.
|
||||
Feature: utils
|
||||
Description: Build LLVM utils.
|
||||
|
||||
Feature: default-targets
|
||||
Description: Build with platform-specific default targets
|
||||
Build-Depends: llvm[core,target-x86] (x86|x64), llvm[core,target-arm] (arm&!arm64), llvm[core,target-aarch64] (arm64), llvm[core,target-all] (!x86&!x64&!arm&!arm64)
|
||||
|
||||
Feature: target-all
|
||||
Description: Build with all backends.
|
||||
Build-Depends: llvm[core,target-aarch64,target-amdgpu,target-arm,target-bpf,target-hexagon,target-lanai,target-mips,target-msp430,target-nvptx,target-powerpc,target-riscv,target-sparc,target-systemz,target-webassembly,target-x86,target-xcore]
|
||||
|
||||
Feature: target-aarch64
|
||||
Description: Build with AArch64 backend.
|
||||
|
@ -92,72 +92,18 @@ if("polly" IN_LIST FEATURES)
|
||||
list(APPEND LLVM_ENABLE_PROJECTS "polly")
|
||||
endif()
|
||||
|
||||
set(LLVM_TARGETS_TO_BUILD)
|
||||
if("target-all" IN_LIST FEATURES)
|
||||
set(LLVM_TARGETS_TO_BUILD "all")
|
||||
else()
|
||||
if("target-aarch64" IN_LIST FEATURES)
|
||||
list(APPEND LLVM_TARGETS_TO_BUILD "AArch64")
|
||||
endif()
|
||||
if("target-amdgpu" IN_LIST FEATURES)
|
||||
list(APPEND LLVM_TARGETS_TO_BUILD "AMDGPU")
|
||||
endif()
|
||||
if("target-arm" IN_LIST FEATURES)
|
||||
list(APPEND LLVM_TARGETS_TO_BUILD "ARM")
|
||||
endif()
|
||||
if("target-bpf" IN_LIST FEATURES)
|
||||
list(APPEND LLVM_TARGETS_TO_BUILD "BPF")
|
||||
endif()
|
||||
if("target-hexagon" IN_LIST FEATURES)
|
||||
list(APPEND LLVM_TARGETS_TO_BUILD "Hexagon")
|
||||
endif()
|
||||
if("target-lanai" IN_LIST FEATURES)
|
||||
list(APPEND LLVM_TARGETS_TO_BUILD "Lanai")
|
||||
endif()
|
||||
if("target-mips" IN_LIST FEATURES)
|
||||
list(APPEND LLVM_TARGETS_TO_BUILD "Mips")
|
||||
endif()
|
||||
if("target-msp430" IN_LIST FEATURES)
|
||||
list(APPEND LLVM_TARGETS_TO_BUILD "MSP430")
|
||||
endif()
|
||||
if("target-nvptx" IN_LIST FEATURES)
|
||||
list(APPEND LLVM_TARGETS_TO_BUILD "NVPTX")
|
||||
endif()
|
||||
if("target-powerpc" IN_LIST FEATURES)
|
||||
list(APPEND LLVM_TARGETS_TO_BUILD "PowerPC")
|
||||
endif()
|
||||
if("target-riscv" IN_LIST FEATURES)
|
||||
list(APPEND LLVM_TARGETS_TO_BUILD "RISCV")
|
||||
endif()
|
||||
if("target-sparc" IN_LIST FEATURES)
|
||||
list(APPEND LLVM_TARGETS_TO_BUILD "Sparc")
|
||||
endif()
|
||||
if("target-systemz" IN_LIST FEATURES)
|
||||
list(APPEND LLVM_TARGETS_TO_BUILD "SystemZ")
|
||||
endif()
|
||||
if("target-webassembly" IN_LIST FEATURES)
|
||||
list(APPEND LLVM_TARGETS_TO_BUILD "WebAssembly")
|
||||
endif()
|
||||
if("target-x86" IN_LIST FEATURES)
|
||||
list(APPEND LLVM_TARGETS_TO_BUILD "X86")
|
||||
endif()
|
||||
if("target-xcore" IN_LIST FEATURES)
|
||||
list(APPEND LLVM_TARGETS_TO_BUILD "XCore")
|
||||
endif()
|
||||
endif()
|
||||
set(known_llvm_targets
|
||||
AArch64 AMDGPU ARM BPF Hexagon Lanai Mips
|
||||
MSP430 NVPTX PowerPC RISCV Sparc SystemZ
|
||||
WebAssembly X86 XCore)
|
||||
|
||||
# Detect target to build if not specified
|
||||
if("${LLVM_TARGETS_TO_BUILD}" STREQUAL "")
|
||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
|
||||
set(LLVM_TARGETS_TO_BUILD "X86")
|
||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
|
||||
set(LLVM_TARGETS_TO_BUILD "ARM")
|
||||
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
|
||||
set(LLVM_TARGETS_TO_BUILD "AArch64")
|
||||
else()
|
||||
set(LLVM_TARGETS_TO_BUILD "all")
|
||||
set(LLVM_TARGETS_TO_BUILD "")
|
||||
foreach(llvm_target IN LISTS known_llvm_targets)
|
||||
string(TOLOWER "target-${llvm_target}" feature_name)
|
||||
if(feature_name IN_LIST FEATURES)
|
||||
list(APPEND LLVM_TARGETS_TO_BUILD "${llvm_target}")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Use comma-separated string instead of semicolon-separated string.
|
||||
# See https://github.com/microsoft/vcpkg/issues/4320
|
||||
|
@ -523,6 +523,9 @@ h3:arm64-windows=fail
|
||||
h3:arm-uwp=fail
|
||||
h3:x64-uwp=fail
|
||||
halide:x64-windows-static=fail
|
||||
# Halide depends on LLVM, which is mis-compiled by MSVC in x86-windows-dbg.
|
||||
# See https://developercommunity.visualstudio.com/content/problem/1179643/msvc-copies-overaligned-non-trivially-copyable-par.html
|
||||
halide:x86-windows=skip
|
||||
hdf5:arm64-windows=fail
|
||||
hdf5:arm-uwp=fail
|
||||
hdf5:x64-uwp=fail
|
||||
|
Loading…
Reference in New Issue
Block a user