-
Notifications
You must be signed in to change notification settings - Fork 48
Build DART/DASH static libs with PIC #405
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
dash/include/dash/Array.h
Outdated
| this, std::bind(&Array::deallocate, this)); | ||
| // Actual destruction of the array instance: | ||
| DASH_LOG_TRACE_VAR("Array.deallocate()", m_globmem); | ||
| // DASH_LOG_TRACE_VAR("Array.deallocate()", m_globmem); |
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.
Please remove the commented out code.
| ${DASH_DART_BASE_LIBRARY} | ||
| PROPERTIES POSITION_INDEPENDENT_CODE TRUE | ||
| ) | ||
|
|
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.
Fine with me, couldn't see a performance impact significant to stick out of the noise in my experiments. That might be different on 32bit systems, though (in case anyone still uses them for real).
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.
Hmyes. I'd prefer a more canonical way myself to toggle this setting, like BUILD_SHARED_LIBS, but I'm not aware of any. Still, will wrap it in a build option BUILD_PIC_LIBS and disable it by default. It's sensible to assume that the common use case is to link DASH with an executable.
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.
Agreed. Will pydash be integrated into the main build system? If so, we might just trigger PIC builds if pydash is being built.
…uild-pic Conflicts: dart-impl/mpi/dart-config.cmake.in dash/include/dash/Array.h
When linking DART/DASH libraries in a shared library (as required for pydash bindings), static libraries must be build with
-fPIC(Position Independent Code).Using PIC per default increases library filesize, but it shouldn't hurt to enable it by default.
Also, with @fmoessbauer 's changes in
dash::Array, the build broke when logging was enabled as no stream conversion forstd::unique_ptris defined. Fixed by removing a log message.