Skip to content

Commit

Permalink
[workspace] Use hidden symbols for tinyobjloader (RobotLocomotion#20357)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwnimmer-tri authored and WawasCode committed Oct 31, 2023
1 parent 0bd16b0 commit 33e4f6e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion tools/install/libdrake/test/exported_symbols_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
"MessageHandler",
"N3uWS",
"N5ofats10any_detail",
"N7tinyobj",
"Realpath",
"WindowsError",
"action",
Expand Down
1 change: 1 addition & 0 deletions tools/workspace/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ drake_py_binary(
"@nlopt_internal//:__subpackages__",
"@qhull_internal//:__subpackages__",
"@sdformat_internal//:__subpackages__",
"@tinyobjloader_internal//:__subpackages__",
"@yaml_cpp_internal//:__subpackages__",
],
deps = [":module_py"],
Expand Down
9 changes: 5 additions & 4 deletions tools/workspace/tinyobjloader_internal/package.BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- bazel -*-

load("@drake//tools/skylark:cc.bzl", "cc_library")
load("@drake//tools/workspace:vendor_cxx.bzl", "cc_library_vendored")
load("@drake//tools/install:install.bzl", "install")

licenses(["notice"]) # MIT, ISC
Expand All @@ -9,13 +9,14 @@ package(
default_visibility = ["//visibility:public"],
)

cc_library(
cc_library_vendored(
name = "tinyobjloader",
srcs = ["tiny_obj_loader.cc"],
srcs_vendored = ["drake_src/tiny_obj_loader.cc"],
hdrs = ["tiny_obj_loader.h"],
hdrs_vendored = ["drake_hdr/tiny_obj_loader.h"],
defines = ["TINYOBJLOADER_USE_DOUBLE=1"],
copts = ["-fvisibility=hidden"],
includes = ["."],
includes = ["drake_hdr"],
linkstatic = 1,
)

Expand Down

0 comments on commit 33e4f6e

Please sign in to comment.