From 6035a4544ab1e7dcdf4bcef09317b6906a08db60 Mon Sep 17 00:00:00 2001 From: calderpg-tri <32444241+calderpg-tri@users.noreply.github.com> Date: Wed, 18 Oct 2023 00:18:08 -0400 Subject: [PATCH] [workspace] Bump VGT to support hidden visibility (#20387) --- .../voxelized_geometry_tools/package.BUILD.bazel | 3 +++ .../voxelized_geometry_tools/patches/vendor.patch | 13 +++++++++++++ .../voxelized_geometry_tools/repository.bzl | 7 +++++-- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 tools/workspace/voxelized_geometry_tools/patches/vendor.patch diff --git a/tools/workspace/voxelized_geometry_tools/package.BUILD.bazel b/tools/workspace/voxelized_geometry_tools/package.BUILD.bazel index cbf3a21d7147..7946aee1122a 100644 --- a/tools/workspace/voxelized_geometry_tools/package.BUILD.bazel +++ b/tools/workspace/voxelized_geometry_tools/package.BUILD.bazel @@ -34,6 +34,7 @@ cc_library( "include/voxelized_geometry_tools/signed_distance_field_generation.hpp", # noqa "include/voxelized_geometry_tools/tagged_object_collision_map.hpp", "include/voxelized_geometry_tools/topology_computation.hpp", + "include/voxelized_geometry_tools/vgt_namespace.hpp", ], includes = ["include"], linkstatic = True, @@ -52,6 +53,7 @@ cc_library( hdrs = [ "include/voxelized_geometry_tools/cuda_voxelization_helpers.h", "include/voxelized_geometry_tools/device_voxelization_interface.hpp", + "include/voxelized_geometry_tools/vgt_namespace.hpp", ], includes = ["include"], linkstatic = True, @@ -69,6 +71,7 @@ cc_library( hdrs = [ "include/voxelized_geometry_tools/device_voxelization_interface.hpp", "include/voxelized_geometry_tools/opencl_voxelization_helpers.h", + "include/voxelized_geometry_tools/vgt_namespace.hpp", ], includes = ["include"], linkstatic = True, diff --git a/tools/workspace/voxelized_geometry_tools/patches/vendor.patch b/tools/workspace/voxelized_geometry_tools/patches/vendor.patch new file mode 100644 index 000000000000..85242e3f9e69 --- /dev/null +++ b/tools/workspace/voxelized_geometry_tools/patches/vendor.patch @@ -0,0 +1,13 @@ +[vgt] Use hidden linker visibility + +This prevents ODR violations in case downstream code also links to VGT. + +--- include/voxelized_geometry_tools/vgt_namespace.hpp ++++ include/voxelized_geometry_tools/vgt_namespace.hpp +@@ -17,5 +17,5 @@ + + #ifndef VGT_NAMESPACE_BEGIN +-# define VGT_NAMESPACE_BEGIN inline namespace v1 { ++# define VGT_NAMESPACE_BEGIN inline namespace drake_vendor __attribute__ ((visibility ("hidden"))) { + #endif + diff --git a/tools/workspace/voxelized_geometry_tools/repository.bzl b/tools/workspace/voxelized_geometry_tools/repository.bzl index bc297794f67b..db683668da12 100644 --- a/tools/workspace/voxelized_geometry_tools/repository.bzl +++ b/tools/workspace/voxelized_geometry_tools/repository.bzl @@ -10,8 +10,11 @@ def voxelized_geometry_tools_repository( When updating, ensure that any new unit tests are reflected in package.BUILD.bazel and BUILD.bazel in drake. """, - commit = "79793a1715642603fb7cba6dbf4c81e9a3bbbfa8", - sha256 = "c27959721290a6727d3cf12f4822b8112abbb7e16aebc679d7a429f9ed73f017", # noqa + commit = "daa34feecf983a6b10b07add4a51a7e1c499b913", + sha256 = "ba62cb041ea05239196fd032bfde02e5cd2db2ad64d53dc6610218f8d8080742", # noqa build_file = ":package.BUILD.bazel", + patches = [ + ":patches/vendor.patch", + ], mirrors = mirrors, )