From 985957c395875be6a1b6e4770c37197296f53cb6 Mon Sep 17 00:00:00 2001 From: tarcila Date: Sun, 10 Mar 2019 23:31:43 -0400 Subject: [PATCH] Fix shaderc compilation with clang (#5622) Using a patch already integrated upstream. --- .../0001-Add-a-virtual-destructor.patch | 23 +++++++++++++++++++ ports/shaderc/portfile.cmake | 1 + 2 files changed, 24 insertions(+) create mode 100644 ports/shaderc/0001-Add-a-virtual-destructor.patch diff --git a/ports/shaderc/0001-Add-a-virtual-destructor.patch b/ports/shaderc/0001-Add-a-virtual-destructor.patch new file mode 100644 index 00000000000..0fa6950368c --- /dev/null +++ b/ports/shaderc/0001-Add-a-virtual-destructor.patch @@ -0,0 +1,23 @@ +From 563bc6e87a43c38b5495469307922c768edbd191 Mon Sep 17 00:00:00 2001 +From: neil +Date: Thu, 1 Feb 2018 06:49:44 +0000 +Subject: [PATCH] Add a virtual destructor, otherwise Clang 6.0complains about + delete being called on an abstract class. + +--- + libshaderc/include/shaderc/shaderc.hpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/libshaderc/include/shaderc/shaderc.hpp b/libshaderc/include/shaderc/shaderc.hpp +index 1c557431..335f0df9 100644 +--- a/libshaderc/include/shaderc/shaderc.hpp ++++ b/libshaderc/include/shaderc/shaderc.hpp +@@ -180,6 +180,8 @@ class CompileOptions { + + // Handles shaderc_include_result_release_fn callbacks. + virtual void ReleaseInclude(shaderc_include_result* data) = 0; ++ ++ virtual ~IncluderInterface() = default; + }; + + // Sets the includer instance for libshaderc to call during compilation, as diff --git a/ports/shaderc/portfile.cmake b/ports/shaderc/portfile.cmake index c77110dbe93..5f1f705722c 100644 --- a/ports/shaderc/portfile.cmake +++ b/ports/shaderc/portfile.cmake @@ -8,6 +8,7 @@ vcpkg_from_github( HEAD_REF master PATCHES 0001-Do-not-generate-build-version.inc.patch + 0001-Add-a-virtual-destructor.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/third_party/glslang)