aboutsummaryrefslogtreecommitdiff
path: root/ports/llvm
diff options
context:
space:
mode:
authorAlex Reinking <alex_reinking@berkeley.edu>2020-10-13 17:54:46 -0700
committerGitHub <noreply@github.com>2020-10-13 17:54:46 -0700
commit7e3d3beac5ca6fe8aab4599d4e1d8ce270ccdea8 (patch)
tree77e688dd24556753a024ac0863a3984c65ed5fda /ports/llvm
parent76031034d55566d4ef91899fbf07cf26f1d60940 (diff)
downloadvcpkg-7e3d3beac5ca6fe8aab4599d4e1d8ce270ccdea8.tar.gz
vcpkg-7e3d3beac5ca6fe8aab4599d4e1d8ce270ccdea8.zip
[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>
Diffstat (limited to 'ports/llvm')
-rw-r--r--ports/llvm/CONTROL9
-rw-r--r--ports/llvm/portfile.cmake78
2 files changed, 19 insertions, 68 deletions
diff --git a/ports/llvm/CONTROL b/ports/llvm/CONTROL
index f461f1cb5..28de43699 100644
--- a/ports/llvm/CONTROL
+++ b/ports/llvm/CONTROL
@@ -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.
diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake
index 305e6bf78..56209147a 100644
--- a/ports/llvm/portfile.cmake
+++ b/ports/llvm/portfile.cmake
@@ -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()
-
-# 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")
- endif()
-endif()
+set(known_llvm_targets
+ AArch64 AMDGPU ARM BPF Hexagon Lanai Mips
+ MSP430 NVPTX PowerPC RISCV Sparc SystemZ
+ WebAssembly X86 XCore)
+
+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()
+endforeach()
# Use comma-separated string instead of semicolon-separated string.
# See https://github.com/microsoft/vcpkg/issues/4320