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

Use hidden visibility when compiling externals #17231

Open
38 of 46 tasks
jwnimmer-tri opened this issue May 19, 2022 · 1 comment
Open
38 of 46 tasks

Use hidden visibility when compiling externals #17231

jwnimmer-tri opened this issue May 19, 2022 · 1 comment
Assignees
Labels
component: build system Bazel, CMake, dependencies, memory checkers, linters priority: medium type: feature request

Comments

@jwnimmer-tri
Copy link
Collaborator

jwnimmer-tri commented May 19, 2022

When building private externals from source (i.e., anything other than #7451), we should use hidden symbol visibility, so that downstream users of Drake can use their own, different version of that code without any link-time or load-time conflicts.

For C code, we can use -fvisibility=hidden. For C++ code, can use //tools/workspace:vendor_cxx if it compiles.

Checklist:

Tricky, possibly unsolveable:

  • lcm

The overall plan for all externals lives in this spreadsheet.

Closing the loop:

Additional tasks:

  • Documentation in tools/workspace about the current policy, how to add a new external, etc.
  • Check if vendor_cxx.bzl can offer any more sugar macro(s) to reduce boilerplate.
@jwnimmer-tri jwnimmer-tri added the component: build system Bazel, CMake, dependencies, memory checkers, linters label May 19, 2022
@jwnimmer-tri jwnimmer-tri self-assigned this May 19, 2022
@jwnimmer-tri
Copy link
Collaborator Author

We are getting really close here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: build system Bazel, CMake, dependencies, memory checkers, linters priority: medium type: feature request
Projects
None yet
Development

No branches or pull requests

1 participant