Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[workspace] Bump VGT to support hidden visibility #20387

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

9 changes: 6 additions & 3 deletions tools/workspace/voxelized_geometry_tools/repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ def voxelized_geometry_tools_repository(
mirrors = None):
github_archive(
name = name,
repository = "ToyotaResearchInstitute/voxelized_geometry_tools",
repository = "calderpg/voxelized_geometry_tools",
upgrade_advice = """
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 = "ae038198528cc1420c3ddac6b5940446636ce1b3",
sha256 = "6e85c4915f0321e3dd32ba704ba6bd33fca4ee6d0e05c343543802667aec0b37", # noqa
build_file = ":package.BUILD.bazel",
patches = [
":patches/vendor.patch",
],
mirrors = mirrors,
)