From 63e8ef6f20f93f342792389fdec7548361a42f6d Mon Sep 17 00:00:00 2001 From: Charlie Barto Date: Fri, 21 May 2021 01:18:58 -0700 Subject: [PATCH] [spirv-tools] Update to v2021.1 (#17642) * bump spirv-tools version to 2021.1 * don't use MP4 * add version updates * remove check for static build (not supported) * inc version. * Update ports/spirv-tools/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> * Update versions/s-/spirv-tools.json Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Co-authored-by: NancyLi1013 --- ports/spirv-tools/0001-don-t-use-MP4.patch | 58 ++++++++++++++++++++++ ports/spirv-tools/portfile.cmake | 5 +- ports/spirv-tools/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/s-/spirv-tools.json | 5 ++ 5 files changed, 68 insertions(+), 4 deletions(-) create mode 100644 ports/spirv-tools/0001-don-t-use-MP4.patch diff --git a/ports/spirv-tools/0001-don-t-use-MP4.patch b/ports/spirv-tools/0001-don-t-use-MP4.patch new file mode 100644 index 0000000000..0203129be1 --- /dev/null +++ b/ports/spirv-tools/0001-don-t-use-MP4.patch @@ -0,0 +1,58 @@ +diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt +index 8247f6f..e28f6ee 100644 +--- a/source/CMakeLists.txt ++++ b/source/CMakeLists.txt +@@ -420,7 +420,3 @@ if(ENABLE_SPIRV_TOOLS_INSTALL) + install(FILES ${CMAKE_BINARY_DIR}/${SPIRV_TOOLS}Config.cmake DESTINATION ${PACKAGE_DIR}) + endif(ENABLE_SPIRV_TOOLS_INSTALL) + +-if(MSVC AND (NOT ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))) +- # Enable parallel builds across four cores for this lib +- add_definitions(/MP4) +-endif() +diff --git a/source/fuzz/CMakeLists.txt b/source/fuzz/CMakeLists.txt +index 804fcf0..4915f07 100644 +--- a/source/fuzz/CMakeLists.txt ++++ b/source/fuzz/CMakeLists.txt +@@ -419,10 +419,6 @@ if(SPIRV_BUILD_FUZZER) + ${CMAKE_CURRENT_BINARY_DIR}/protobufs/spvtoolsfuzz.pb.cc + ) + +- if(MSVC AND (NOT ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))) +- # Enable parallel builds across four cores for this lib +- add_definitions(/MP4) +- endif() + + spvtools_pch(SPIRV_TOOLS_FUZZ_SOURCES pch_source_fuzz) + +diff --git a/source/opt/CMakeLists.txt b/source/opt/CMakeLists.txt +index 88d5658..e3faab7 100644 +--- a/source/opt/CMakeLists.txt ++++ b/source/opt/CMakeLists.txt +@@ -218,11 +218,6 @@ set(SPIRV_TOOLS_OPT_SOURCES + wrap_opkill.cpp + ) + +-if(MSVC AND (NOT ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))) +- # Enable parallel builds across four cores for this lib +- add_definitions(/MP4) +-endif() +- + spvtools_pch(SPIRV_TOOLS_OPT_SOURCES pch_source_opt) + + add_library(SPIRV-Tools-opt ${SPIRV_TOOLS_LIBRARY_TYPE} ${SPIRV_TOOLS_OPT_SOURCES}) +diff --git a/source/reduce/CMakeLists.txt b/source/reduce/CMakeLists.txt +index e589ad5..b93a37b 100644 +--- a/source/reduce/CMakeLists.txt ++++ b/source/reduce/CMakeLists.txt +@@ -71,10 +71,6 @@ set(SPIRV_TOOLS_REDUCE_SOURCES + simple_conditional_branch_to_branch_reduction_opportunity.cpp + ) + +-if(MSVC AND (NOT ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))) +- # Enable parallel builds across four cores for this lib +- add_definitions(/MP4) +-endif() + + spvtools_pch(SPIRV_TOOLS_REDUCE_SOURCES pch_source_reduce) + diff --git a/ports/spirv-tools/portfile.cmake b/ports/spirv-tools/portfile.cmake index 8304148a9a..670b70a468 100644 --- a/ports/spirv-tools/portfile.cmake +++ b/ports/spirv-tools/portfile.cmake @@ -4,11 +4,12 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KhronosGroup/SPIRV-Tools - REF v2020.7 - SHA512 34d870e5aaaa2ad744369521efd43bdfba5e47208bb31bc0e325322e3a6edbe7686d3f4d9a6ebff6e85625e1a00811ab0162e2b8f39dd18603b7ff6548897950 + REF v2021.1 + SHA512 e8478eacb86415f75a1e5b3f66a0508b01a9f7e9d8b070eb0329ca56be137f5543dd42125a1033cb8552c01f46e11affd7fda866231b3742c66de9b4341930d5 PATCHES cmake-install.patch install-config-typo.patch + 0001-don-t-use-MP4.patch ) vcpkg_find_acquire_program(PYTHON3) diff --git a/ports/spirv-tools/vcpkg.json b/ports/spirv-tools/vcpkg.json index b79dd566be..bbd48de51a 100644 --- a/ports/spirv-tools/vcpkg.json +++ b/ports/spirv-tools/vcpkg.json @@ -1,6 +1,6 @@ { "name": "spirv-tools", - "version-string": "2020.7", + "version-string": "2021.1", "description": "API and commands for processing SPIR-V modules", "homepage": "https://github.com/KhronosGroup/SPIRV-Tools", "dependencies": [ diff --git a/versions/baseline.json b/versions/baseline.json index 3d78040e00..8b17b2f209 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5801,7 +5801,7 @@ "port-version": 0 }, "spirv-tools": { - "baseline": "2020.7", + "baseline": "2021.1", "port-version": 0 }, "sprout": { diff --git a/versions/s-/spirv-tools.json b/versions/s-/spirv-tools.json index f073519fce..26c205513f 100644 --- a/versions/s-/spirv-tools.json +++ b/versions/s-/spirv-tools.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "c18f04e12fa671a9067896ccdf8c932601f81115", + "version-string": "2021.1", + "port-version": 0 + }, { "git-tree": "03084f48c2608e410a438662bab2a68ab92a5c95", "version-string": "2020.7",