Skip to content
Merged
25 changes: 21 additions & 4 deletions ports/llvm/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
set(LLVM_VERSION "14.0.3")
set(LLVM_VERSION "14.0.4")

vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO llvm/llvm-project
REF llvmorg-${LLVM_VERSION}
SHA512 511e93fd9b1c414c38fe9e2649679ac0b16cb04f7f7838569d187b04c542a185e364d6db73e96465026e3b2533649eb75ac95507d12514af32b28bdfb66f2646
HEAD_REF master
SHA512 e14e6c3a1915a96e9ddc609f16ca3a398ca6f7fd0a691dadaa24490078a661340e845cb2d18f3679de4f47300bb822c33ae69548af6a0370d55737831a28b959
HEAD_REF main
PATCHES
0002-fix-install-paths.patch # This patch fixes paths in ClangConfig.cmake, LLVMConfig.cmake, LLDConfig.cmake etc.
0004-fix-dr-1734.patch
Expand Down Expand Up @@ -180,6 +180,7 @@ if("libunwind" IN_LIST FEATURES)
list(APPEND LLVM_ENABLE_RUNTIMES "libunwind")
endif()

# this is for normal targets
set(known_llvm_targets
AArch64
AMDGPU
Expand Down Expand Up @@ -209,10 +210,25 @@ foreach(llvm_target IN LISTS known_llvm_targets)
endif()
endforeach()

# this is for experimental targets
set(known_llvm_experimental_targets
SPRIV
)

set(LLVM_EXPERIMENTAL_TARGETS_TO_BUILD "")
foreach(llvm_target IN LISTS known_llvm_experimental_targets)
string(TOLOWER "target-${llvm_target}" feature_name)
if(feature_name IN_LIST FEATURES)
list(APPEND LLVM_EXPERIMENTAL_TARGETS_TO_BUILD "${llvm_target}")
endif()
endforeach()

vcpkg_find_acquire_program(PYTHON3)
get_filename_component(PYTHON3_DIR ${PYTHON3} DIRECTORY)
vcpkg_add_to_path(${PYTHON3_DIR})

set(LLVM_LINK_JOBS 1)

vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}/llvm
OPTIONS
Expand All @@ -228,9 +244,10 @@ vcpkg_cmake_configure(
"-DLLVM_ENABLE_PROJECTS=${LLVM_ENABLE_PROJECTS}"
"-DLLVM_ENABLE_RUNTIMES=${LLVM_ENABLE_RUNTIMES}"
"-DLLVM_TARGETS_TO_BUILD=${LLVM_TARGETS_TO_BUILD}"
"-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=${LLVM_EXPERIMENTAL_TARGETS_TO_BUILD}"
-DPACKAGE_VERSION=${LLVM_VERSION}
# Limit the maximum number of concurrent link jobs to 1. This should fix low amount of memory issue for link.
-DLLVM_PARALLEL_LINK_JOBS=1
"-DLLVM_PARALLEL_LINK_JOBS=${LLVM_LINK_JOBS}"
-DLLVM_TOOLS_INSTALL_DIR=tools/llvm
)

Expand Down
14 changes: 12 additions & 2 deletions ports/llvm/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "llvm",
"version": "14.0.3",
"port-version": 1,
"version": "14.0.4",
"description": "The LLVM Compiler Infrastructure.",
"homepage": "https://llvm.org",
"license": "Apache-2.0",
Expand Down Expand Up @@ -79,6 +78,13 @@
"default-targets": {
"description": "Build with platform-specific default targets.",
"dependencies": [
{
"name": "llvm",
"default-features": false,
"features": [
"target-spirv"
]
},
{
"name": "llvm",
"default-features": false,
Expand Down Expand Up @@ -289,6 +295,7 @@
"target-powerpc",
"target-riscv",
"target-sparc",
"target-spirv",
"target-systemz",
"target-ve",
"target-webassembly",
Expand Down Expand Up @@ -334,6 +341,9 @@
"target-sparc": {
"description": "Build with Sparc backend."
},
"target-spirv": {
"description": "Build with Spriv backend."
},
"target-systemz": {
"description": "Build with SystemZ backend."
},
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4285,8 +4285,8 @@
"port-version": 2
},
"llvm": {
"baseline": "14.0.3",
"port-version": 1
"baseline": "14.0.4",
"port-version": 0
},
"lmdb": {
"baseline": "0.9.29",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/llvm.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "7f97dd1dc56be6b5637b8406bd01ac0c245eb0dc",
"version": "14.0.4",
"port-version": 0
},
{
"git-tree": "741b89d3872cb0152d5c295ce075b8d751381f51",
"version": "14.0.3",
Expand Down