-
Notifications
You must be signed in to change notification settings - Fork 125
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
build: link tests and benches against shared library, not static library #615
Conversation
72354da
to
ef940c3
Compare
With some effort I got windows to work, unfortunately it required some additional commits. |
Nice work! Could you add a milestone to your PRs, if relevant? We are close to 1.8 release. Unfortunately, I also found myself keeping adding MRs after discovering bugs or limitations, but we ought to do the release soon, else we may miss some distro packages freeze that will not ship important bug fixes. |
Sure -- I added this and #614 to the 1.9.0 milestone. |
938f282
to
2c1dd81
Compare
Looks like |
Signed-off-by: Ran Benita <[email protected]>
2c1dd81
to
073760e
Compare
Signed-off-by: Ran Benita <[email protected]>
The Windows dllexport annotation wants to be on the declarations, not the definitions. Signed-off-by: Ran Benita <[email protected]>
Without this, the test-internal libraries (which don't use the .def file because they contain additional private symbols) can't be made shared. But it also makes sense for consistency with GCC. Signed-off-by: Ran Benita <[email protected]>
This makes the tests, and especially benches, more realistic, since xkbcommon is almost always used as a shared library. Also significantly reduces the build time with LTO enabled (for me, from 90s to 30s). Signed-off-by: Ran Benita <[email protected]>
073760e
to
b9c6f59
Compare
Added a fix for the Windows error & warning, should be good now... |
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.
LGTM, I have trust you on this one.
This makes the tests, and especially benches, more realistic, since xkbcommon is almost always used as a shared library.
Also significantly reduces the build time with LTO enabled (for me, from 90s to 30s).