-
Notifications
You must be signed in to change notification settings - Fork 35
Add linker map and .def file #197
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
.github/workflows/basic.yml
Outdated
include: | ||
- os: 'windows-2022' | ||
build_type: Release | ||
compiler: {c: clang-cl, cxx: clang-cl} | ||
pool_tracking: 'ON' | ||
os_provider: ['ON'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
['ON']
-> 'ON'
😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not quite - pls only update in include
s, not in matrix
(a list is required there)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, done.
it would be really great if you split this PR to smaller single-commit PRs |
@igchor please rebase + change the name of this PR + could you also extract the changes in the github action file into a separate PR? |
Done - rebased and changed the name of the PR. I've left the github action changes though since they are mostly to make sure that adding .def/.map file doesn't break anything. |
@igor please resolve the issue pointed by @lukaszstolarczuk |
besides the issue (mentioned by Rafał) blocking CI, lgtm |
Done. |
Hm, there's now another problem after we started using base alloc in jemalloc/scalable pool implementations. For dynamic library we should hide base_alloc symbols from libumf.so but that means we would need to build jemalloc/scalable pool with base_alloc sources (same as tests in: #200). However, for static libumf, we do not control symbol visibility so if both libumf.a and jemalloc/scalable_pool.a are build with base_alloc we'll have conflicting symbols I think. Any ideas how we can solve this? Should we make base_alloc a separate dynamic library? |
can't we check for this case in cmake? and do not include base_alloc sources in static jemalloc/scallable pools? These libs will never be used without libumf.a |
On linux, we haven't limited symbol visibility in any way - this patch does that by introducing linker map. On windows, this patch replaces UMF_EXPORT with .def file to keep headers clean.
To verify building with OS memory provider turned off
if umf is build as a shared lib. This is needed because ba_alloc symbols are not longer exported from libumf
Ok, done. I've also had to add ba_alloc init code to jemalloc and scalable pools (see topmost commit). Still, this is not an ideal solution since our jemalloc/scalable pool libs will only work with libum that they were build with (.e.g. if jemalloc_pool.a was build with libumf.so it won't work with libumf.a). |
Since ba_alloc sources are compiled directly into those pools they each have a separate copy of base_alloc.
ok, thanks. About the scnario you mentioned - currently there is no way to build only jemalloc_pool.a without building libumf. So I think the problem here is very limited |
No description provided.