spirv-tools: 2020.3 -> 2020.5-b27e039
This commit is contained in:
parent
18c62f4120
commit
8c0c37cc25
@ -34,14 +34,24 @@ drwxr-xr-x root/root usr/lib/cmake/SPIRV-Tools/
|
||||
-rw-r--r-- root/root usr/lib/cmake/SPIRV-Tools/SPIRV-ToolsTarget-release.cmake
|
||||
-rw-r--r-- root/root usr/lib/cmake/SPIRV-Tools/SPIRV-ToolsTarget.cmake
|
||||
-rw-r--r-- root/root usr/lib/libSPIRV-Tools-link.a
|
||||
-rwxr-xr-x root/root usr/lib/libSPIRV-Tools-link.so
|
||||
lrwxrwxrwx root/root usr/lib/libSPIRV-Tools-link.so -> libSPIRV-Tools-link.so.0
|
||||
lrwxrwxrwx root/root usr/lib/libSPIRV-Tools-link.so.0 -> libSPIRV-Tools-link.so.0.0.0
|
||||
-rwxr-xr-x root/root usr/lib/libSPIRV-Tools-link.so.0.0.0
|
||||
-rw-r--r-- root/root usr/lib/libSPIRV-Tools-opt.a
|
||||
-rwxr-xr-x root/root usr/lib/libSPIRV-Tools-opt.so
|
||||
lrwxrwxrwx root/root usr/lib/libSPIRV-Tools-opt.so -> libSPIRV-Tools-opt.so.0
|
||||
lrwxrwxrwx root/root usr/lib/libSPIRV-Tools-opt.so.0 -> libSPIRV-Tools-opt.so.0.0.0
|
||||
-rwxr-xr-x root/root usr/lib/libSPIRV-Tools-opt.so.0.0.0
|
||||
-rw-r--r-- root/root usr/lib/libSPIRV-Tools-reduce.a
|
||||
-rwxr-xr-x root/root usr/lib/libSPIRV-Tools-reduce.so
|
||||
-rwxr-xr-x root/root usr/lib/libSPIRV-Tools-shared.so
|
||||
lrwxrwxrwx root/root usr/lib/libSPIRV-Tools-reduce.so -> libSPIRV-Tools-reduce.so.0
|
||||
lrwxrwxrwx root/root usr/lib/libSPIRV-Tools-reduce.so.0 -> libSPIRV-Tools-reduce.so.0.0.0
|
||||
-rwxr-xr-x root/root usr/lib/libSPIRV-Tools-reduce.so.0.0.0
|
||||
lrwxrwxrwx root/root usr/lib/libSPIRV-Tools-shared.so -> libSPIRV-Tools-shared.so.0
|
||||
lrwxrwxrwx root/root usr/lib/libSPIRV-Tools-shared.so.0 -> libSPIRV-Tools-shared.so.0.0.0
|
||||
-rwxr-xr-x root/root usr/lib/libSPIRV-Tools-shared.so.0.0.0
|
||||
-rw-r--r-- root/root usr/lib/libSPIRV-Tools.a
|
||||
-rwxr-xr-x root/root usr/lib/libSPIRV-Tools.so
|
||||
lrwxrwxrwx root/root usr/lib/libSPIRV-Tools.so -> libSPIRV-Tools.so.0
|
||||
lrwxrwxrwx root/root usr/lib/libSPIRV-Tools.so.0 -> libSPIRV-Tools.so.0.0.0
|
||||
-rwxr-xr-x root/root usr/lib/libSPIRV-Tools.so.0.0.0
|
||||
drwxr-xr-x root/root usr/lib/pkgconfig/
|
||||
-rw-r--r-- root/root usr/lib/pkgconfig/SPIRV-Tools-shared.pc
|
||||
-rw-r--r-- root/root usr/lib/pkgconfig/SPIRV-Tools.pc
|
||||
|
@ -1,5 +1,8 @@
|
||||
untrusted comment: verify with /etc/ports/opt.pub
|
||||
RWSE3ohX2g5d/cIyU1AsrCsCTQ7hVvoNGwDWxv4in/4zzORrPfJXSL1XHnnsF9QrYVW3+Z1Ce6pQWxbjWwdvMWIQhOG2slDxXgY=
|
||||
SHA256 (Pkgfile) = 4b621480ed0f8204e532aa6d9ec3433a9f9b5029a87bd0c782fad1331bf7f223
|
||||
SHA256 (.footprint) = 8476f7a6f9f52a2c6ba3951bddd566aa9862560df47eae928c6d4cf16ecdf05b
|
||||
SHA256 (SPIRV-Tools-v2020.3.tar.gz) = 8b538a1cb2a4275ef9617abcb047d54e8292f975ac1d93323d5dd1e19c85280b
|
||||
RWSE3ohX2g5d/YKvdqWTC9exMMGE9S6vk/EPquKkvgZfEzr0sUJK9sGcgVOfu3o3U6WFH2oA6qs9B7QfxAKJvSW6BNMXEuySyAE=
|
||||
SHA256 (Pkgfile) = 3c9ae7fdb360ebf35fd1cf98a92a9766aafd8f173e0a9d07dea95860802aadb5
|
||||
SHA256 (.footprint) = 4884c0c44dfed508d803150bb7610fb58ece0366547b8ee4ed1ff86323a4334f
|
||||
SHA256 (b27e039c68dd9eb959bb9249fcb2c9a54841474b.zip) = a45d8c4347c830759489f73faad8b5c330bd4e0d9cb8b1e8bf65f22682078e7d
|
||||
SHA256 (0001-Revert-CMake-Enable-building-with-BUILD_SHARED_LIBS-.patch) = 6622948faf7e558d1741d2a6099f6ad39d2ccf6613973b3991be1e8f56ef9c29
|
||||
SHA256 (spirv-tools-soversion.patch) = b7f2f1d46f11fb25ac24036b20f5745f01f04b6d8c08259c280cef411fe41892
|
||||
SHA256 (0001-CMake-FIx-pkg-config-libdir-with-absolute-CMAKE_INST.patch) = 0e354a9947a807c900349dca61bd92f4f11a33d828a62dde129a55709c0f9c00
|
||||
|
@ -0,0 +1,73 @@
|
||||
From de0b782723ccb25ce879a7b95c25c2a5e4c80eb8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= <rverschelde@gmail.com>
|
||||
Date: Mon, 12 Oct 2020 12:25:03 +0200
|
||||
Subject: [PATCH] CMake: FIx pkg-config libdir with absolute
|
||||
CMAKE_INSTALL_LIBDIR
|
||||
|
||||
We lose the use of `${prefix}` for `libdir` and `includedir`, but at least the
|
||||
paths should be valid.
|
||||
|
||||
Fixes #3905.
|
||||
---
|
||||
CMakeLists.txt | 8 ++++----
|
||||
cmake/SPIRV-Tools-shared.pc.in | 4 ++--
|
||||
cmake/SPIRV-Tools.pc.in | 4 ++--
|
||||
3 files changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 30dde20a..f4327e91 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -313,8 +313,8 @@ add_custom_target(spirv-tools-pkg-config ALL
|
||||
-DTEMPLATE_FILE=${CMAKE_CURRENT_SOURCE_DIR}/cmake/SPIRV-Tools.pc.in
|
||||
-DOUT_FILE=${CMAKE_CURRENT_BINARY_DIR}/SPIRV-Tools.pc
|
||||
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
|
||||
- -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR}
|
||||
- -DCMAKE_INSTALL_INCLUDEDIR=${CMAKE_INSTALL_INCLUDEDIR}
|
||||
+ -DCMAKE_INSTALL_FULL_LIBDIR=${CMAKE_INSTALL_FULL_LIBDIR}
|
||||
+ -DCMAKE_INSTALL_FULL_INCLUDEDIR=${CMAKE_INSTALL_FULL_INCLUDEDIR}
|
||||
-DSPIRV_LIBRARIES=${SPIRV_LIBRARIES}
|
||||
-P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/write_pkg_config.cmake
|
||||
DEPENDS "CHANGES" "cmake/SPIRV-Tools.pc.in" "cmake/write_pkg_config.cmake")
|
||||
@@ -324,8 +324,8 @@ add_custom_target(spirv-tools-shared-pkg-config ALL
|
||||
-DTEMPLATE_FILE=${CMAKE_CURRENT_SOURCE_DIR}/cmake/SPIRV-Tools-shared.pc.in
|
||||
-DOUT_FILE=${CMAKE_CURRENT_BINARY_DIR}/SPIRV-Tools-shared.pc
|
||||
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
|
||||
- -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR}
|
||||
- -DCMAKE_INSTALL_INCLUDEDIR=${CMAKE_INSTALL_INCLUDEDIR}
|
||||
+ -DCMAKE_INSTALL_FULL_LIBDIR=${CMAKE_INSTALL_FULL_LIBDIR}
|
||||
+ -DCMAKE_INSTALL_FULL_INCLUDEDIR=${CMAKE_INSTALL_FULL_INCLUDEDIR}
|
||||
-DSPIRV_SHARED_LIBRARIES=${SPIRV_SHARED_LIBRARIES}
|
||||
-P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/write_pkg_config.cmake
|
||||
DEPENDS "CHANGES" "cmake/SPIRV-Tools-shared.pc.in" "cmake/write_pkg_config.cmake")
|
||||
diff --git a/cmake/SPIRV-Tools-shared.pc.in b/cmake/SPIRV-Tools-shared.pc.in
|
||||
index 0dcaa276..c9ee4314 100644
|
||||
--- a/cmake/SPIRV-Tools-shared.pc.in
|
||||
+++ b/cmake/SPIRV-Tools-shared.pc.in
|
||||
@@ -1,7 +1,7 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
-libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
|
||||
-includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
|
||||
+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
|
||||
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
|
||||
|
||||
Name: SPIRV-Tools
|
||||
Description: Tools for SPIR-V
|
||||
diff --git a/cmake/SPIRV-Tools.pc.in b/cmake/SPIRV-Tools.pc.in
|
||||
index 2984dc57..e4eba4f2 100644
|
||||
--- a/cmake/SPIRV-Tools.pc.in
|
||||
+++ b/cmake/SPIRV-Tools.pc.in
|
||||
@@ -1,7 +1,7 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
-libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
|
||||
-includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
|
||||
+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
|
||||
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
|
||||
|
||||
Name: SPIRV-Tools
|
||||
Description: Tools for SPIR-V
|
||||
--
|
||||
2.28.0
|
||||
|
@ -0,0 +1,314 @@
|
||||
From 92dd0d8c6111d75b11e511217d5e6d5c6a8d7a82 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= <rverschelde@gmail.com>
|
||||
Date: Mon, 12 Oct 2020 10:41:39 +0200
|
||||
Subject: [PATCH] Revert "CMake: Enable building with BUILD_SHARED_LIBS=1
|
||||
(#3490)"
|
||||
|
||||
This reverts commit 6aed7ffbc7bd42d292db10a800ec05954a5b7147.
|
||||
---
|
||||
external/CMakeLists.txt | 19 -------------------
|
||||
source/CMakeLists.txt | 29 +++++++++--------------------
|
||||
source/fuzz/CMakeLists.txt | 2 +-
|
||||
source/link/CMakeLists.txt | 2 +-
|
||||
source/opt/CMakeLists.txt | 4 ++--
|
||||
source/reduce/CMakeLists.txt | 4 ++--
|
||||
test/CMakeLists.txt | 6 +++---
|
||||
test/val/CMakeLists.txt | 10 +++++-----
|
||||
tools/CMakeLists.txt | 16 ++++++++--------
|
||||
9 files changed, 31 insertions(+), 61 deletions(-)
|
||||
|
||||
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
|
||||
index 179a4012..e8b78673 100644
|
||||
--- a/external/CMakeLists.txt
|
||||
+++ b/external/CMakeLists.txt
|
||||
@@ -13,19 +13,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
-# Utility functions for pushing & popping variables.
|
||||
-function(push_variable var val)
|
||||
- set("${var}_SAVE_STACK" "${${var}}" "${${var}_SAVE_STACK}" PARENT_SCOPE)
|
||||
- set(${var} ${val} PARENT_SCOPE)
|
||||
-endfunction()
|
||||
-function(pop_variable var)
|
||||
- set(save_stack "${${var}_SAVE_STACK}")
|
||||
- list(GET save_stack 0 val)
|
||||
- list(REMOVE_AT save_stack 0)
|
||||
- set("${var}_SAVE_STACK" "${save_stack}" PARENT_SCOPE)
|
||||
- set(${var} ${val} PARENT_SCOPE)
|
||||
-endfunction()
|
||||
-
|
||||
if (DEFINED SPIRV-Headers_SOURCE_DIR)
|
||||
# This allows flexible position of the SPIRV-Headers repo.
|
||||
set(SPIRV_HEADER_DIR ${SPIRV-Headers_SOURCE_DIR})
|
||||
@@ -74,11 +61,7 @@ if (NOT ${SPIRV_SKIP_TESTS})
|
||||
"Use shared (DLL) run-time lib even when Google Test is built as static lib."
|
||||
ON)
|
||||
endif()
|
||||
- # gtest requires special defines for building as a shared
|
||||
- # library, simply always build as static.
|
||||
- push_variable(BUILD_SHARED_LIBS 0)
|
||||
add_subdirectory(${GMOCK_DIR} EXCLUDE_FROM_ALL)
|
||||
- pop_variable(BUILD_SHARED_LIBS)
|
||||
endif()
|
||||
endif()
|
||||
if (TARGET gmock)
|
||||
@@ -125,9 +108,7 @@ if (NOT ${SPIRV_SKIP_TESTS})
|
||||
if (NOT TARGET effcee)
|
||||
set(EFFCEE_BUILD_TESTING OFF CACHE BOOL "Do not build Effcee test suite")
|
||||
endif()
|
||||
- push_variable(BUILD_SHARED_LIBS 0) # effcee does not export any symbols for building as a DLL. Always build as static.
|
||||
add_subdirectory(effcee EXCLUDE_FROM_ALL)
|
||||
- pop_variable(BUILD_SHARED_LIBS)
|
||||
set_property(TARGET effcee PROPERTY FOLDER Effcee)
|
||||
# Turn off warnings for effcee and re2
|
||||
set_property(TARGET effcee APPEND PROPERTY COMPILE_OPTIONS -w)
|
||||
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
|
||||
index fa900e03..0a9c147e 100644
|
||||
--- a/source/CMakeLists.txt
|
||||
+++ b/source/CMakeLists.txt
|
||||
@@ -346,21 +346,18 @@ set_source_files_properties(
|
||||
|
||||
spvtools_pch(SPIRV_SOURCES pch_source)
|
||||
|
||||
-add_library(${SPIRV_TOOLS}-static STATIC ${SPIRV_SOURCES})
|
||||
-spvtools_default_compile_options(${SPIRV_TOOLS}-static)
|
||||
-target_include_directories(${SPIRV_TOOLS}-static
|
||||
+add_library(${SPIRV_TOOLS} ${SPIRV_SOURCES})
|
||||
+spvtools_default_compile_options(${SPIRV_TOOLS})
|
||||
+target_include_directories(${SPIRV_TOOLS}
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${spirv-tools_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
PRIVATE ${spirv-tools_BINARY_DIR}
|
||||
PRIVATE ${SPIRV_HEADER_INCLUDE_DIR}
|
||||
)
|
||||
-set_property(TARGET ${SPIRV_TOOLS}-static PROPERTY FOLDER "SPIRV-Tools libraries")
|
||||
-spvtools_check_symbol_exports(${SPIRV_TOOLS}-static)
|
||||
-add_dependencies(${SPIRV_TOOLS}-static core_tables enum_string_mapping extinst_tables)
|
||||
-
|
||||
-# The static target does not have the '-static' suffix.
|
||||
-set_target_properties(${SPIRV_TOOLS}-static PROPERTIES OUTPUT_NAME "${SPIRV_TOOLS}")
|
||||
+set_property(TARGET ${SPIRV_TOOLS} PROPERTY FOLDER "SPIRV-Tools libraries")
|
||||
+spvtools_check_symbol_exports(${SPIRV_TOOLS})
|
||||
+add_dependencies( ${SPIRV_TOOLS} core_tables enum_string_mapping extinst_tables )
|
||||
|
||||
add_library(${SPIRV_TOOLS}-shared SHARED ${SPIRV_SOURCES})
|
||||
spvtools_default_compile_options(${SPIRV_TOOLS}-shared)
|
||||
@@ -378,26 +375,18 @@ target_compile_definitions(${SPIRV_TOOLS}-shared
|
||||
PRIVATE SPIRV_TOOLS_IMPLEMENTATION
|
||||
PUBLIC SPIRV_TOOLS_SHAREDLIB
|
||||
)
|
||||
-add_dependencies(${SPIRV_TOOLS}-shared core_tables enum_string_mapping extinst_tables)
|
||||
-
|
||||
-# Create the "${SPIRV_TOOLS}" target as an alias to either "${SPIRV_TOOLS}-static"
|
||||
-# or "${SPIRV_TOOLS}-shared" depending on the value of BUILD_SHARED_LIBS.
|
||||
-if(BUILD_SHARED_LIBS)
|
||||
- add_library(${SPIRV_TOOLS} ALIAS ${SPIRV_TOOLS}-shared)
|
||||
-else()
|
||||
- add_library(${SPIRV_TOOLS} ALIAS ${SPIRV_TOOLS}-static)
|
||||
-endif()
|
||||
+add_dependencies( ${SPIRV_TOOLS}-shared core_tables enum_string_mapping extinst_tables )
|
||||
|
||||
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
|
||||
find_library(LIBRT rt)
|
||||
if(LIBRT)
|
||||
- target_link_libraries(${SPIRV_TOOLS}-static ${LIBRT})
|
||||
+ target_link_libraries(${SPIRV_TOOLS} ${LIBRT})
|
||||
target_link_libraries(${SPIRV_TOOLS}-shared ${LIBRT})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_SPIRV_TOOLS_INSTALL)
|
||||
- install(TARGETS ${SPIRV_TOOLS}-static ${SPIRV_TOOLS}-shared EXPORT ${SPIRV_TOOLS}Targets
|
||||
+ install(TARGETS ${SPIRV_TOOLS} ${SPIRV_TOOLS}-shared EXPORT ${SPIRV_TOOLS}Targets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
diff --git a/source/fuzz/CMakeLists.txt b/source/fuzz/CMakeLists.txt
|
||||
index cea05cf3..c35a89c5 100644
|
||||
--- a/source/fuzz/CMakeLists.txt
|
||||
+++ b/source/fuzz/CMakeLists.txt
|
||||
@@ -419,7 +419,7 @@ if(SPIRV_BUILD_FUZZER)
|
||||
|
||||
# The fuzzer reuses a lot of functionality from the SPIRV-Tools library.
|
||||
target_link_libraries(SPIRV-Tools-fuzz
|
||||
- PUBLIC ${SPIRV_TOOLS}-static
|
||||
+ PUBLIC ${SPIRV_TOOLS}
|
||||
PUBLIC SPIRV-Tools-opt
|
||||
PUBLIC protobuf::libprotobuf)
|
||||
|
||||
diff --git a/source/link/CMakeLists.txt b/source/link/CMakeLists.txt
|
||||
index bb058ea2..d3083192 100644
|
||||
--- a/source/link/CMakeLists.txt
|
||||
+++ b/source/link/CMakeLists.txt
|
||||
@@ -11,7 +11,7 @@
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
-add_library(SPIRV-Tools-link STATIC
|
||||
+add_library(SPIRV-Tools-link
|
||||
linker.cpp
|
||||
)
|
||||
|
||||
diff --git a/source/opt/CMakeLists.txt b/source/opt/CMakeLists.txt
|
||||
index 3630a060..8a6699a0 100644
|
||||
--- a/source/opt/CMakeLists.txt
|
||||
+++ b/source/opt/CMakeLists.txt
|
||||
@@ -233,7 +233,7 @@ endif()
|
||||
|
||||
spvtools_pch(SPIRV_TOOLS_OPT_SOURCES pch_source_opt)
|
||||
|
||||
-add_library(SPIRV-Tools-opt STATIC ${SPIRV_TOOLS_OPT_SOURCES})
|
||||
+add_library(SPIRV-Tools-opt ${SPIRV_TOOLS_OPT_SOURCES})
|
||||
|
||||
spvtools_default_compile_options(SPIRV-Tools-opt)
|
||||
target_include_directories(SPIRV-Tools-opt
|
||||
@@ -245,7 +245,7 @@ target_include_directories(SPIRV-Tools-opt
|
||||
)
|
||||
# We need the assembling and disassembling functionalities in the main library.
|
||||
target_link_libraries(SPIRV-Tools-opt
|
||||
- PUBLIC ${SPIRV_TOOLS}-static)
|
||||
+ PUBLIC ${SPIRV_TOOLS})
|
||||
|
||||
set_property(TARGET SPIRV-Tools-opt PROPERTY FOLDER "SPIRV-Tools libraries")
|
||||
spvtools_check_symbol_exports(SPIRV-Tools-opt)
|
||||
diff --git a/source/reduce/CMakeLists.txt b/source/reduce/CMakeLists.txt
|
||||
index e113ca25..0e8d5a00 100644
|
||||
--- a/source/reduce/CMakeLists.txt
|
||||
+++ b/source/reduce/CMakeLists.txt
|
||||
@@ -78,7 +78,7 @@ endif()
|
||||
|
||||
spvtools_pch(SPIRV_TOOLS_REDUCE_SOURCES pch_source_reduce)
|
||||
|
||||
-add_library(SPIRV-Tools-reduce STATIC ${SPIRV_TOOLS_REDUCE_SOURCES})
|
||||
+add_library(SPIRV-Tools-reduce ${SPIRV_TOOLS_REDUCE_SOURCES})
|
||||
|
||||
spvtools_default_compile_options(SPIRV-Tools-reduce)
|
||||
target_include_directories(SPIRV-Tools-reduce
|
||||
@@ -90,7 +90,7 @@ target_include_directories(SPIRV-Tools-reduce
|
||||
)
|
||||
# The reducer reuses a lot of functionality from the SPIRV-Tools library.
|
||||
target_link_libraries(SPIRV-Tools-reduce
|
||||
- PUBLIC ${SPIRV_TOOLS}-static
|
||||
+ PUBLIC ${SPIRV_TOOLS}
|
||||
PUBLIC SPIRV-Tools-opt)
|
||||
|
||||
set_property(TARGET SPIRV-Tools-reduce PROPERTY FOLDER "SPIRV-Tools libraries")
|
||||
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
|
||||
index 5dd4036c..70999f99 100644
|
||||
--- a/test/CMakeLists.txt
|
||||
+++ b/test/CMakeLists.txt
|
||||
@@ -159,12 +159,12 @@ spvtools_pch(TEST_SOURCES pch_test)
|
||||
add_spvtools_unittest(
|
||||
TARGET spirv_unit_tests
|
||||
SRCS ${TEST_SOURCES}
|
||||
- LIBS ${SPIRV_TOOLS}-static)
|
||||
+ LIBS ${SPIRV_TOOLS})
|
||||
|
||||
add_spvtools_unittest(
|
||||
TARGET c_interface
|
||||
SRCS c_interface_test.cpp
|
||||
- LIBS ${SPIRV_TOOLS}-static)
|
||||
+ LIBS ${SPIRV_TOOLS})
|
||||
|
||||
add_spvtools_unittest(
|
||||
TARGET c_interface_shared
|
||||
@@ -181,7 +181,7 @@ if (${SPIRV_TIMER_ENABLED})
|
||||
add_spvtools_unittest(
|
||||
TARGET timer
|
||||
SRCS timer_test.cpp
|
||||
- LIBS ${SPIRV_TOOLS}-static)
|
||||
+ LIBS ${SPIRV_TOOLS})
|
||||
endif()
|
||||
|
||||
|
||||
diff --git a/test/val/CMakeLists.txt b/test/val/CMakeLists.txt
|
||||
index c458a2f9..23d7a19e 100644
|
||||
--- a/test/val/CMakeLists.txt
|
||||
+++ b/test/val/CMakeLists.txt
|
||||
@@ -41,21 +41,21 @@ add_spvtools_unittest(TARGET val_abcde
|
||||
val_extension_spv_khr_terminate_invocation.cpp
|
||||
val_ext_inst_test.cpp
|
||||
${VAL_TEST_COMMON_SRCS}
|
||||
- LIBS ${SPIRV_TOOLS}-static
|
||||
+ LIBS ${SPIRV_TOOLS}
|
||||
PCH_FILE pch_test_val
|
||||
)
|
||||
|
||||
add_spvtools_unittest(TARGET val_capability
|
||||
SRCS
|
||||
val_capability_test.cpp
|
||||
- LIBS ${SPIRV_TOOLS}-static
|
||||
+ LIBS ${SPIRV_TOOLS}
|
||||
PCH_FILE pch_test_val
|
||||
)
|
||||
|
||||
add_spvtools_unittest(TARGET val_limits
|
||||
SRCS val_limits_test.cpp
|
||||
${VAL_TEST_COMMON_SRCS}
|
||||
- LIBS ${SPIRV_TOOLS}-static
|
||||
+ LIBS ${SPIRV_TOOLS}
|
||||
PCH_FILE pch_test_val
|
||||
)
|
||||
|
||||
@@ -76,7 +76,7 @@ add_spvtools_unittest(TARGET val_fghijklmnop
|
||||
val_opencl_test.cpp
|
||||
val_primitives_test.cpp
|
||||
${VAL_TEST_COMMON_SRCS}
|
||||
- LIBS ${SPIRV_TOOLS}-static
|
||||
+ LIBS ${SPIRV_TOOLS}
|
||||
PCH_FILE pch_test_val
|
||||
)
|
||||
|
||||
@@ -91,6 +91,6 @@ add_spvtools_unittest(TARGET val_stuvw
|
||||
val_version_test.cpp
|
||||
val_webgpu_test.cpp
|
||||
${VAL_TEST_COMMON_SRCS}
|
||||
- LIBS ${SPIRV_TOOLS}-static
|
||||
+ LIBS ${SPIRV_TOOLS}
|
||||
PCH_FILE pch_test_val
|
||||
)
|
||||
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
|
||||
index 67d606a8..b3a4cc1a 100644
|
||||
--- a/tools/CMakeLists.txt
|
||||
+++ b/tools/CMakeLists.txt
|
||||
@@ -40,19 +40,19 @@ function(add_spvtools_tool)
|
||||
endfunction()
|
||||
|
||||
if (NOT ${SPIRV_SKIP_EXECUTABLES})
|
||||
- add_spvtools_tool(TARGET spirv-as SRCS as/as.cpp LIBS ${SPIRV_TOOLS}-static)
|
||||
- add_spvtools_tool(TARGET spirv-dis SRCS dis/dis.cpp LIBS ${SPIRV_TOOLS}-static)
|
||||
- add_spvtools_tool(TARGET spirv-val SRCS val/val.cpp util/cli_consumer.cpp LIBS ${SPIRV_TOOLS}-static)
|
||||
- add_spvtools_tool(TARGET spirv-opt SRCS opt/opt.cpp util/cli_consumer.cpp LIBS SPIRV-Tools-opt ${SPIRV_TOOLS}-static)
|
||||
+ add_spvtools_tool(TARGET spirv-as SRCS as/as.cpp LIBS ${SPIRV_TOOLS})
|
||||
+ add_spvtools_tool(TARGET spirv-dis SRCS dis/dis.cpp LIBS ${SPIRV_TOOLS})
|
||||
+ add_spvtools_tool(TARGET spirv-val SRCS val/val.cpp util/cli_consumer.cpp LIBS ${SPIRV_TOOLS})
|
||||
+ add_spvtools_tool(TARGET spirv-opt SRCS opt/opt.cpp util/cli_consumer.cpp LIBS SPIRV-Tools-opt ${SPIRV_TOOLS})
|
||||
if (NOT DEFINED IOS_PLATFORM) # iOS does not allow std::system calls which spirv-reduce requires
|
||||
- add_spvtools_tool(TARGET spirv-reduce SRCS reduce/reduce.cpp util/cli_consumer.cpp LIBS SPIRV-Tools-reduce ${SPIRV_TOOLS}-static)
|
||||
+ add_spvtools_tool(TARGET spirv-reduce SRCS reduce/reduce.cpp util/cli_consumer.cpp LIBS SPIRV-Tools-reduce ${SPIRV_TOOLS})
|
||||
endif()
|
||||
- add_spvtools_tool(TARGET spirv-link SRCS link/linker.cpp LIBS SPIRV-Tools-link ${SPIRV_TOOLS}-static)
|
||||
+ add_spvtools_tool(TARGET spirv-link SRCS link/linker.cpp LIBS SPIRV-Tools-link ${SPIRV_TOOLS})
|
||||
add_spvtools_tool(TARGET spirv-cfg
|
||||
SRCS cfg/cfg.cpp
|
||||
cfg/bin_to_dot.h
|
||||
cfg/bin_to_dot.cpp
|
||||
- LIBS ${SPIRV_TOOLS}-static)
|
||||
+ LIBS ${SPIRV_TOOLS})
|
||||
target_include_directories(spirv-cfg PRIVATE ${spirv-tools_SOURCE_DIR}
|
||||
${SPIRV_HEADER_INCLUDE_DIR})
|
||||
set(SPIRV_INSTALL_TARGETS spirv-as spirv-dis spirv-val spirv-opt
|
||||
@@ -62,7 +62,7 @@ if (NOT ${SPIRV_SKIP_EXECUTABLES})
|
||||
endif()
|
||||
|
||||
if(SPIRV_BUILD_FUZZER)
|
||||
- add_spvtools_tool(TARGET spirv-fuzz SRCS fuzz/fuzz.cpp util/cli_consumer.cpp LIBS SPIRV-Tools-fuzz ${SPIRV_TOOLS}-static)
|
||||
+ add_spvtools_tool(TARGET spirv-fuzz SRCS fuzz/fuzz.cpp util/cli_consumer.cpp LIBS SPIRV-Tools-fuzz ${SPIRV_TOOLS})
|
||||
set(SPIRV_INSTALL_TARGETS ${SPIRV_INSTALL_TARGETS} spirv-fuzz)
|
||||
endif(SPIRV_BUILD_FUZZER)
|
||||
|
||||
--
|
||||
2.28.0
|
||||
|
@ -4,11 +4,18 @@
|
||||
# Depends on: spirv-headers
|
||||
|
||||
name=spirv-tools
|
||||
version=2020.3
|
||||
version=2020.5-b27e039
|
||||
release=1
|
||||
source=(https://github.com/KhronosGroup/SPIRV-Tools/archive/v$version/SPIRV-Tools-v$version.tar.gz)
|
||||
source=(
|
||||
#https://github.com/KhronosGroup/SPIRV-Tools/archive/v$version/SPIRV-Tools-v$version.tar.gz
|
||||
https://github.com/KhronosGroup/SPIRV-Tools/archive/b27e039c68dd9eb959bb9249fcb2c9a54841474b.zip
|
||||
0001-Revert-CMake-Enable-building-with-BUILD_SHARED_LIBS-.patch
|
||||
spirv-tools-soversion.patch
|
||||
0001-CMake-FIx-pkg-config-libdir-with-absolute-CMAKE_INST.patch)
|
||||
|
||||
build() {
|
||||
mv SPIRV-Tools-b27e039c68dd9eb959bb9249fcb2c9a54841474b SPIRV-Tools-$version
|
||||
|
||||
local config="
|
||||
-SSPIRV-Tools-$version \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
@ -19,11 +26,18 @@ build() {
|
||||
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
|
||||
-GNinja"
|
||||
|
||||
# https://github.com/KhronosGroup/SPIRV-Tools/issues/3626
|
||||
patch -d SPIRV-Tools-$version -p1 -i $SRC/0001-Revert-CMake-Enable-building-with-BUILD_SHARED_LIBS-.patch
|
||||
patch -d SPIRV-Tools-$version -p1 -i $SRC/spirv-tools-soversion.patch
|
||||
|
||||
# https://github.com/KhronosGroup/SPIRV-Tools/pull/3906
|
||||
patch -d SPIRV-Tools-$version -p1 -i $SRC/0001-CMake-FIx-pkg-config-libdir-with-absolute-CMAKE_INST.patch
|
||||
|
||||
cmake -Bbuild-static $config -DBUILD_SHARED_LIBS=OFF
|
||||
cmake --build build-static
|
||||
|
||||
cmake -Bbuild-shared $config -DBUILD_SHARED_LIBS=ON
|
||||
cmake --build build-static
|
||||
cmake --build build-shared
|
||||
|
||||
DESTDIR=$PKG cmake --build build-static --target install
|
||||
DESTDIR=$PKG cmake --build build-shared --target install
|
||||
|
82
spirv-tools/spirv-tools-soversion.patch
Normal file
82
spirv-tools/spirv-tools-soversion.patch
Normal file
@ -0,0 +1,82 @@
|
||||
Index: SPIRV-Tools-b27e039c68dd9eb959bb9249fcb2c9a54841474b/CMakeLists.txt
|
||||
===================================================================
|
||||
--- SPIRV-Tools-b27e039c68dd9eb959bb9249fcb2c9a54841474b/CMakeLists.txt
|
||||
+++ SPIRV-Tools-b27e039c68dd9eb959bb9249fcb2c9a54841474b/CMakeLists.txt 2020-10-12 10:42:21.665118296 +0200
|
||||
@@ -28,6 +28,9 @@
|
||||
enable_testing()
|
||||
set(SPIRV_TOOLS "SPIRV-Tools")
|
||||
|
||||
+set(SPIRV_TOOLS_VERSION "0.0.0" CACHE STRING "Build version")
|
||||
+set(SPIRV_TOOLS_SOVERSION "0" CACHE STRING "Library API version")
|
||||
+
|
||||
include(GNUInstallDirs)
|
||||
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
Index: SPIRV-Tools-b27e039c68dd9eb959bb9249fcb2c9a54841474b/source/CMakeLists.txt
|
||||
===================================================================
|
||||
--- SPIRV-Tools-b27e039c68dd9eb959bb9249fcb2c9a54841474b/source/CMakeLists.txt
|
||||
+++ SPIRV-Tools-b27e039c68dd9eb959bb9249fcb2c9a54841474b/source/CMakeLists.txt 2020-10-12 10:43:48.111036375 +0200
|
||||
@@ -347,6 +347,7 @@
|
||||
spvtools_pch(SPIRV_SOURCES pch_source)
|
||||
|
||||
add_library(${SPIRV_TOOLS} ${SPIRV_SOURCES})
|
||||
+set_target_properties(${SPIRV_TOOLS} PROPERTIES VERSION ${SPIRV_TOOLS_VERSION} SOVERSION ${SPIRV_TOOLS_SOVERSION})
|
||||
spvtools_default_compile_options(${SPIRV_TOOLS})
|
||||
target_include_directories(${SPIRV_TOOLS}
|
||||
PUBLIC
|
||||
@@ -360,6 +361,7 @@
|
||||
add_dependencies( ${SPIRV_TOOLS} core_tables enum_string_mapping extinst_tables )
|
||||
|
||||
add_library(${SPIRV_TOOLS}-shared SHARED ${SPIRV_SOURCES})
|
||||
+set_target_properties(${SPIRV_TOOLS}-shared PROPERTIES VERSION ${SPIRV_TOOLS_VERSION} SOVERSION ${SPIRV_TOOLS_SOVERSION})
|
||||
spvtools_default_compile_options(${SPIRV_TOOLS}-shared)
|
||||
target_include_directories(${SPIRV_TOOLS}-shared
|
||||
PUBLIC
|
||||
Index: SPIRV-Tools-b27e039c68dd9eb959bb9249fcb2c9a54841474b/source/fuzz/CMakeLists.txt
|
||||
===================================================================
|
||||
--- SPIRV-Tools-b27e039c68dd9eb959bb9249fcb2c9a54841474b/source/fuzz/CMakeLists.txt
|
||||
+++ SPIRV-Tools-b27e039c68dd9eb959bb9249fcb2c9a54841474b/source/fuzz/CMakeLists.txt 2020-10-12 10:44:07.542017960 +0200
|
||||
@@ -397,6 +397,7 @@
|
||||
spvtools_pch(SPIRV_TOOLS_FUZZ_SOURCES pch_source_fuzz)
|
||||
|
||||
add_library(SPIRV-Tools-fuzz ${SPIRV_TOOLS_FUZZ_SOURCES})
|
||||
+ set_target_properties(${SPIRV_TOOLS}-fuzz PROPERTIES VERSION ${SPIRV_TOOLS_VERSION} SOVERSION ${SPIRV_TOOLS_SOVERSION})
|
||||
|
||||
spvtools_default_compile_options(SPIRV-Tools-fuzz)
|
||||
|
||||
Index: SPIRV-Tools-b27e039c68dd9eb959bb9249fcb2c9a54841474b/source/opt/CMakeLists.txt
|
||||
===================================================================
|
||||
--- SPIRV-Tools-b27e039c68dd9eb959bb9249fcb2c9a54841474b/source/opt/CMakeLists.txt
|
||||
+++ SPIRV-Tools-b27e039c68dd9eb959bb9249fcb2c9a54841474b/source/opt/CMakeLists.txt 2020-10-12 10:44:24.508001881 +0200
|
||||
@@ -234,6 +234,7 @@
|
||||
spvtools_pch(SPIRV_TOOLS_OPT_SOURCES pch_source_opt)
|
||||
|
||||
add_library(SPIRV-Tools-opt ${SPIRV_TOOLS_OPT_SOURCES})
|
||||
+set_target_properties(${SPIRV_TOOLS}-opt PROPERTIES VERSION ${SPIRV_TOOLS_VERSION} SOVERSION ${SPIRV_TOOLS_SOVERSION})
|
||||
|
||||
spvtools_default_compile_options(SPIRV-Tools-opt)
|
||||
target_include_directories(SPIRV-Tools-opt
|
||||
Index: SPIRV-Tools-b27e039c68dd9eb959bb9249fcb2c9a54841474b/source/link/CMakeLists.txt
|
||||
===================================================================
|
||||
--- SPIRV-Tools-b27e039c68dd9eb959bb9249fcb2c9a54841474b/source/link/CMakeLists.txt
|
||||
+++ SPIRV-Tools-b27e039c68dd9eb959bb9249fcb2c9a54841474b/source/link/CMakeLists.txt 2020-10-12 10:44:16.013009932 +0200
|
||||
@@ -14,6 +14,7 @@
|
||||
add_library(SPIRV-Tools-link
|
||||
linker.cpp
|
||||
)
|
||||
+set_target_properties(${SPIRV_TOOLS}-link PROPERTIES VERSION ${SPIRV_TOOLS_VERSION} SOVERSION ${SPIRV_TOOLS_SOVERSION})
|
||||
|
||||
spvtools_default_compile_options(SPIRV-Tools-link)
|
||||
target_include_directories(SPIRV-Tools-link
|
||||
Index: SPIRV-Tools-b27e039c68dd9eb959bb9249fcb2c9a54841474b/source/reduce/CMakeLists.txt
|
||||
===================================================================
|
||||
--- SPIRV-Tools-b27e039c68dd9eb959bb9249fcb2c9a54841474b/source/reduce/CMakeLists.txt
|
||||
+++ SPIRV-Tools-b27e039c68dd9eb959bb9249fcb2c9a54841474b/source/reduce/CMakeLists.txt 2020-10-12 10:44:34.239992658 +0200
|
||||
@@ -79,6 +79,7 @@
|
||||
spvtools_pch(SPIRV_TOOLS_REDUCE_SOURCES pch_source_reduce)
|
||||
|
||||
add_library(SPIRV-Tools-reduce ${SPIRV_TOOLS_REDUCE_SOURCES})
|
||||
+set_target_properties(${SPIRV_TOOLS}-reduce PROPERTIES VERSION ${SPIRV_TOOLS_VERSION} SOVERSION ${SPIRV_TOOLS_SOVERSION})
|
||||
|
||||
spvtools_default_compile_options(SPIRV-Tools-reduce)
|
||||
target_include_directories(SPIRV-Tools-reduce
|
Loading…
x
Reference in New Issue
Block a user