-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
pybind11: Ensure all modules are compiled with hidden symbols #8435
pybind11: Ensure all modules are compiled with hidden symbols #8435
Conversation
+@jamiesnape for feature review, please. Review status: 0 of 2 files reviewed at latest revision, all discussions resolved. Comments from Reviewable |
This is great to see. Be sure to test in CI for macOS, to cover the new Werror. Reviewed 2 of 2 files at r1. Comments from Reviewable |
An existing defect, but I saw the following with GCC
|
@drake-jenkins-bot mac-sierra-clang-bazel-experimental please |
Reviewed 2 of 2 files at r1. Comments from Reviewable |
|
@drake-jenkins-bot mac-sierra-clang-bazel-experimental please |
Reviewed 2 of 2 files at r2. tools/skylark/pybind.bzl, line 44 at r2 (raw file):
FYI I wonder if this would be slightly clearer if it returned to be above copts, but rephrased as "The warning disables below are per py..." or something. It's not 100% obvious that it covers both groups now. Comments from Reviewable |
|
That's consistent with having more than one Review status: all files reviewed at latest revision, 1 unresolved discussion, some commit checks failed. Comments from Reviewable |
Review status: all files reviewed at latest revision, 1 unresolved discussion, some commit checks failed. tools/skylark/drake_cc.bzl, line 16 at r2 (raw file):
Also add to CMake build (see the comment just above this code block) Comments from Reviewable |
Hm... From my understanding, this PR itself is a great improvement for link size, but not yet necessary at this point (since Pytohn on the platforms we care about use If we are going to encounter run-time linking errors such as duplicate (and mismatched) typeids for the same types, I'd like to defer making this change until we refactor our Python modules to better handle this (i.e. better curation of cross-module dependencies for templated types). A potential solution would be to have the Python modules be linked statically, which is possible, but I'd prefer to have more time to develop something that is more cohesive to development (e.g. not waiting forever when focusing on a specific unittest, and not having to hack a manifest file everytime I wish to prune unneeded dependencies). |
If this PR is stalled, maybe you could pull the last two commits into their own PR, since I think they are a strict improvement? |
Seems that I just got bit by the above symbol visibility mismatch with Mac in the following PR:
Seems that this is a problem that would not be fixed by resolve this PR, nor the above solutions (compacting Will post a separate issue. |
Closing this for now. Can re-open later if need be. |
Closes #8433
This change is