| 4c5dbbf0 | 03-Dec-2018 |
Damjan Jovanovic <damjan@apache.org> |
After much experimentation, it was found that on Windows WeakImplHelper1 needs to be SAL_DLLPUBLIC_EXPORT to prevent multiple definition errors when building in debug mode as opposed to CPPUHELPER_DL
After much experimentation, it was found that on Windows WeakImplHelper1 needs to be SAL_DLLPUBLIC_EXPORT to prevent multiple definition errors when building in debug mode as opposed to CPPUHELPER_DLLPUBLIC we would normally use.
Without -DCPPUHELPER_DLLIMPLEMENTATION, the header's CPPUHELPER_DLLPUBLIC would become SAL_DLLPUBLIC_IMPORT, and on MSVC that presumbly causes symbols to be redefined and exported for some unknown reason, whereas when we use only SAL_DLLPUBLIC_EXPORT, it is exported in multiple modules, but at least when building those modules we won't get errors, as the modules' dependencies presumably aren't searched.
This has no effect on FreeBSD and hopefully other platforms.
Make all WeakImplHelper[1-12] SAL_DLLPUBLIC_EXPORT just in case.
This need for mysterious platform-specific code attributes that affect the linker in undocumented ways really reveals a profound and terrible truth: how ugly, poor, flimsy, degenerate, twisted, dark, revolting and sick C++ remains as a language, even after decades of its development.
Patch by: me
git-svn-id: https://svn.apache.org/repos/asf/openoffice/trunk@1848076 13f79535-47bb-0310-9956-ffa450edef68
show more ...
|
| ebbaf3b8 | 03-Dec-2018 |
Damjan Jovanovic <damjan@apache.org> |
Re-commit r1847839 and r1847840, with future patches on the way that will get the module building in gbuild and using source-level attributes to control symbol visibility. The original commit was wor
Re-commit r1847839 and r1847840, with future patches on the way that will get the module building in gbuild and using source-level attributes to control symbol visibility. The original commit was worded as:
Change default symbol visibility to hidden in main/cppuhelper, and export symbols using source-level attributes (SAL_DLLPUBLIC_EXPORT) instead.
Stop using the .map file for Windows, and rely only on the above to control symbol visibility.
This is not a perfect solution, as the exported symbols lack some typeinfos compared to before, but it doesn't seem to break anything, and a full symbol audit needs to be done later to fix other modules anyway.
Also added some files to get it to build with gbuild, which are currently unused, as the gbuild build seems to break in main/i18npool.
Patch by: me
git-svn-id: https://svn.apache.org/repos/asf/openoffice/trunk@1848075 13f79535-47bb-0310-9956-ffa450edef68
show more ...
|