From 78d96900f626a86ab6caed178dac06072ee35070 Mon Sep 17 00:00:00 2001 From: Digitech Date: Wed, 8 Jun 2022 12:14:30 +0100 Subject: [PATCH 01/10] [llvm] updated to 14.0.4 + add spirv backend support --- ports/llvm/portfile.cmake | 40 +++++++++++++++++++++++++++++++++++---- ports/llvm/vcpkg.json | 15 +++++++++++++-- versions/baseline.json | 4 ++-- versions/l-/llvm.json | 9 +++++++-- 4 files changed, 58 insertions(+), 10 deletions(-) diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index b04d7e44c6cd79..1e891be7fbd380 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -1,4 +1,4 @@ -set(LLVM_VERSION "14.0.3") +set(LLVM_VERSION "14.0.4") vcpkg_check_linkage(ONLY_STATIC_LIBRARY) @@ -6,8 +6,8 @@ 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 @@ -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 @@ -209,10 +210,40 @@ foreach(llvm_target IN LISTS known_llvm_targets) endif() endforeach() +# this is for experimental targets +set(known_llvm_experamental_targets + SPRIV +) + +set(LLVM_EXPERIMENTAL_TARGETS_TO_BUILD "") +foreach(llvm_target IN LISTS known_llvm_experamental_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}) +cmake_host_system_information(RESULT MEMORY QUERY AVAILABLE_VIRTUAL_MEMORY) +set(LLVM_LINK_JOBS 1) + +#this is calculated in mib to gb +if("6675.72" GREATER_EQUAL MEMORY) + set(LLVM_LINK_JOBS 2) +endif() +if("14305.11" GREATER_EQUAL MEMORY) + set(LLVM_LINK_JOBS 3) +endif() +if("29563.9" GREATER_EQUAL MEMORY) + set(LLVM_LINK_JOBS 4) +endif() +if("60081.48" GREATER_EQUAL MEMORY) + set(LLVM_LINK_JOBS 5) +endif() + vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH}/llvm OPTIONS @@ -228,9 +259,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 ) diff --git a/ports/llvm/vcpkg.json b/ports/llvm/vcpkg.json index 918f1cd7cad37a..812a7d14348d73 100644 --- a/ports/llvm/vcpkg.json +++ b/ports/llvm/vcpkg.json @@ -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", @@ -87,6 +86,14 @@ ], "platform": "arm64" }, + { + "name": "llvm", + "default-features": false, + "features": [ + "target-spirv" + ], + "platform": "spirv" + }, { "name": "llvm", "default-features": false, @@ -289,6 +296,7 @@ "target-powerpc", "target-riscv", "target-sparc", + "target-spirv", "target-systemz", "target-ve", "target-webassembly", @@ -334,6 +342,9 @@ "target-sparc": { "description": "Build with Sparc backend." }, + "target-spirv": { + "description": "Build with Spriv backend." + }, "target-systemz": { "description": "Build with SystemZ backend." }, diff --git a/versions/baseline.json b/versions/baseline.json index bc6ae7766840e1..3241bbb0873f75 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4281,8 +4281,8 @@ "port-version": 2 }, "llvm": { - "baseline": "14.0.3", - "port-version": 1 + "baseline": "14.0.4", + "port-version": 0 }, "lmdb": { "baseline": "0.9.29", diff --git a/versions/l-/llvm.json b/versions/l-/llvm.json index 18b97acd0d6990..60b3271ae927ee 100644 --- a/versions/l-/llvm.json +++ b/versions/l-/llvm.json @@ -1,7 +1,12 @@ { "versions": [ { - "git-tree": "741b89d3872cb0152d5c295ce075b8d751381f51", + "git-tree": "168e933724c14f0494dd4cb1a44884bfd1b03447", + "version": "14.0.4", + "port-version": 0 + }, + { + "git-tree": "fe9a228e3ded582f205104bb804ad065c26c082b", "version": "14.0.3", "port-version": 1 }, @@ -211,4 +216,4 @@ "port-version": 0 } ] -} +} \ No newline at end of file From 7d20946f38e8c2138fc752b5414c10801c84621f Mon Sep 17 00:00:00 2001 From: Digitech Date: Thu, 9 Jun 2022 00:12:47 +0100 Subject: [PATCH 02/10] [llvm] fix "Thomas1664 - Please add a final newline here." --- versions/l-/llvm.json | 1 + 1 file changed, 1 insertion(+) diff --git a/versions/l-/llvm.json b/versions/l-/llvm.json index 60b3271ae927ee..62e4a3418b6409 100644 --- a/versions/l-/llvm.json +++ b/versions/l-/llvm.json @@ -216,4 +216,5 @@ "port-version": 0 } ] + } \ No newline at end of file From da0b2e9b48c756c10d398df7a26c0348ea044428 Mon Sep 17 00:00:00 2001 From: Billy Robert O'Neal Date: Wed, 8 Jun 2022 23:26:14 -0700 Subject: [PATCH 03/10] Fix version database. --- versions/l-/llvm.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/versions/l-/llvm.json b/versions/l-/llvm.json index 62e4a3418b6409..7f674b24577cb4 100644 --- a/versions/l-/llvm.json +++ b/versions/l-/llvm.json @@ -6,7 +6,7 @@ "port-version": 0 }, { - "git-tree": "fe9a228e3ded582f205104bb804ad065c26c082b", + "git-tree": "741b89d3872cb0152d5c295ce075b8d751381f51", "version": "14.0.3", "port-version": 1 }, @@ -216,5 +216,4 @@ "port-version": 0 } ] - -} \ No newline at end of file +} From b027faf8cbf2a8016a6487b12321680c6251e0cf Mon Sep 17 00:00:00 2001 From: Digitech Date: Thu, 9 Jun 2022 14:11:28 +0100 Subject: [PATCH 04/10] [llvm] fix Neumann-A corrections --- ports/llvm/portfile.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index 1e891be7fbd380..ad54de32df3a08 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -211,12 +211,12 @@ foreach(llvm_target IN LISTS known_llvm_targets) endforeach() # this is for experimental targets -set(known_llvm_experamental_targets +set(known_llvm_experimental_targets SPRIV ) set(LLVM_EXPERIMENTAL_TARGETS_TO_BUILD "") -foreach(llvm_target IN LISTS known_llvm_experamental_targets) +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}") @@ -230,6 +230,7 @@ vcpkg_add_to_path(${PYTHON3_DIR}) cmake_host_system_information(RESULT MEMORY QUERY AVAILABLE_VIRTUAL_MEMORY) set(LLVM_LINK_JOBS 1) + #this is calculated in mib to gb if("6675.72" GREATER_EQUAL MEMORY) set(LLVM_LINK_JOBS 2) From b0fba231014b65cf37b026ce1d8f44515662ce48 Mon Sep 17 00:00:00 2001 From: Digitech Date: Thu, 9 Jun 2022 14:14:49 +0100 Subject: [PATCH 05/10] [llvm] run vcpkg x-add-version llvm --- versions/l-/llvm.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/llvm.json b/versions/l-/llvm.json index 7f674b24577cb4..65e2e0e190583c 100644 --- a/versions/l-/llvm.json +++ b/versions/l-/llvm.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "168e933724c14f0494dd4cb1a44884bfd1b03447", + "git-tree": "5bae7de64e157f373a0559effe58caa23c558a8a", "version": "14.0.4", "port-version": 0 }, From 17ee4df61cd7fcfe33ea21d7a1fb740e9fd8df1f Mon Sep 17 00:00:00 2001 From: Digitech Date: Fri, 10 Jun 2022 08:37:15 +0100 Subject: [PATCH 06/10] [llvm] mistake fixes --- ports/llvm/portfile.cmake | 10 +++++----- ports/llvm/vcpkg.json | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index ad54de32df3a08..a66c5c912eb3f4 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -227,21 +227,21 @@ vcpkg_find_acquire_program(PYTHON3) get_filename_component(PYTHON3_DIR ${PYTHON3} DIRECTORY) vcpkg_add_to_path(${PYTHON3_DIR}) -cmake_host_system_information(RESULT MEMORY QUERY AVAILABLE_VIRTUAL_MEMORY) +cmake_host_system_information(RESULT MEMORY QUERY AVAILABLE_PHYSICAL_MEMORY) set(LLVM_LINK_JOBS 1) #this is calculated in mib to gb -if("6675.72" GREATER_EQUAL MEMORY) +if(MEMORY GREATER_EQUAL "6675.72") set(LLVM_LINK_JOBS 2) endif() -if("14305.11" GREATER_EQUAL MEMORY) +if(MEMORY GREATER_EQUAL "14305.11") set(LLVM_LINK_JOBS 3) endif() -if("29563.9" GREATER_EQUAL MEMORY) +if(MEMORY GREATER_EQUAL "29563.9") set(LLVM_LINK_JOBS 4) endif() -if("60081.48" GREATER_EQUAL MEMORY) +if(MEMORY GREATER_EQUAL "60081.48") set(LLVM_LINK_JOBS 5) endif() diff --git a/ports/llvm/vcpkg.json b/ports/llvm/vcpkg.json index 812a7d14348d73..173fdf28cfe7e0 100644 --- a/ports/llvm/vcpkg.json +++ b/ports/llvm/vcpkg.json @@ -91,8 +91,7 @@ "default-features": false, "features": [ "target-spirv" - ], - "platform": "spirv" + ] }, { "name": "llvm", From 7d8438783c3d1966a41cee2bd7b59ba4804976dc Mon Sep 17 00:00:00 2001 From: Digitech Date: Fri, 10 Jun 2022 08:42:39 +0100 Subject: [PATCH 07/10] [llvm] removed not need platform type --- ports/llvm/vcpkg.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/llvm/vcpkg.json b/ports/llvm/vcpkg.json index 173fdf28cfe7e0..94b4f8cf4b5946 100644 --- a/ports/llvm/vcpkg.json +++ b/ports/llvm/vcpkg.json @@ -82,16 +82,16 @@ "name": "llvm", "default-features": false, "features": [ - "target-aarch64" - ], - "platform": "arm64" + "target-spirv" + ] }, { "name": "llvm", "default-features": false, "features": [ - "target-spirv" - ] + "target-aarch64" + ], + "platform": "arm64" }, { "name": "llvm", From fd0a6ff7d58e82e7436492557225e2f35bdcdfc7 Mon Sep 17 00:00:00 2001 From: Digitech Date: Fri, 10 Jun 2022 08:43:58 +0100 Subject: [PATCH 08/10] [llvm] run .\vcpkg.exe x-add-version --all --- versions/l-/llvm.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/llvm.json b/versions/l-/llvm.json index 65e2e0e190583c..b56a1cc9fc978d 100644 --- a/versions/l-/llvm.json +++ b/versions/l-/llvm.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "5bae7de64e157f373a0559effe58caa23c558a8a", + "git-tree": "ae9bc842e042048148dfef3cec524ee693f350df", "version": "14.0.4", "port-version": 0 }, From 17c17730a6b245ca3020b33790a35ca3d6509501 Mon Sep 17 00:00:00 2001 From: Digitech Date: Tue, 14 Jun 2022 07:42:20 +0100 Subject: [PATCH 09/10] [llvm] removed unstable script --- ports/llvm/portfile.cmake | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index a66c5c912eb3f4..d8162fa636c1ba 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -227,24 +227,8 @@ vcpkg_find_acquire_program(PYTHON3) get_filename_component(PYTHON3_DIR ${PYTHON3} DIRECTORY) vcpkg_add_to_path(${PYTHON3_DIR}) -cmake_host_system_information(RESULT MEMORY QUERY AVAILABLE_PHYSICAL_MEMORY) set(LLVM_LINK_JOBS 1) - -#this is calculated in mib to gb -if(MEMORY GREATER_EQUAL "6675.72") - set(LLVM_LINK_JOBS 2) -endif() -if(MEMORY GREATER_EQUAL "14305.11") - set(LLVM_LINK_JOBS 3) -endif() -if(MEMORY GREATER_EQUAL "29563.9") - set(LLVM_LINK_JOBS 4) -endif() -if(MEMORY GREATER_EQUAL "60081.48") - set(LLVM_LINK_JOBS 5) -endif() - vcpkg_cmake_configure( SOURCE_PATH ${SOURCE_PATH}/llvm OPTIONS From 8a3c3daa759a8a138590ca36688c7968b8cf2a55 Mon Sep 17 00:00:00 2001 From: Digitech Date: Tue, 14 Jun 2022 07:46:14 +0100 Subject: [PATCH 10/10] [llvm] run ./vcpkg x-add-version --all --- versions/l-/llvm.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/llvm.json b/versions/l-/llvm.json index b56a1cc9fc978d..f330f79e6449df 100644 --- a/versions/l-/llvm.json +++ b/versions/l-/llvm.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "ae9bc842e042048148dfef3cec524ee693f350df", + "git-tree": "7f97dd1dc56be6b5637b8406bd01ac0c245eb0dc", "version": "14.0.4", "port-version": 0 },