Skip to content

Commit

Permalink
[workspace] Bump VGT to support hidden visibility (#20387)
Browse files Browse the repository at this point in the history
  • Loading branch information
calderpg-tri authored Oct 18, 2023
1 parent 33a0da3 commit 6035a45
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
3 changes: 3 additions & 0 deletions tools/workspace/voxelized_geometry_tools/package.BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down
13 changes: 13 additions & 0 deletions tools/workspace/voxelized_geometry_tools/patches/vendor.patch
Original file line number Diff line number Diff line change
@@ -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

7 changes: 5 additions & 2 deletions tools/workspace/voxelized_geometry_tools/repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

0 comments on commit 6035a45

Please sign in to comment.