]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cmake,win32*.sh: Windows DLL support
authorLucian Petrut <lpetrut@cloudbasesolutions.com>
Thu, 7 Jan 2021 13:14:00 +0000 (13:14 +0000)
committerJason Dillaman <dillaman@redhat.com>
Tue, 26 Jan 2021 14:52:39 +0000 (09:52 -0500)
commit81993b1e0fbb869ed23d656b7f95b542d8d7be13
tree8bb2b03b670d02fdb86add17c90b5cd1113cccd9
parent0ca34da5225fc8d57420485497b76da5be132bf2
cmake,win32*.sh: Windows DLL support

At the moment, the Windows binaries can only be linked statically.
This is less than ideal since:

* the resulting binaries can be quite large, especially when
including debug symbols
* librados and librbd cannot be used directly by 3rd party apps
* the build duration is increased

In order to do a dynamic build, we'll:

* add an option to win32_build.sh
* fix link order
* dynamically link boost
* disable the "-pie" flag when using Mingw, which generates incorrect
  executable entry points
* by default, cmake generates import libs for executables. The issue
  is that for rados.exe, it generates librados.dll.a, thus overriding
  the librados.dll import library, which breaks the build process.
  We'll configure cmake to skip generating import libs for executables.

Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
(cherry picked from commit 5c008725db7c5b7ae22ae64e3b3e6309c501c6db)
CMakeLists.txt
README.windows.rst
src/librados/CMakeLists.txt
src/librbd/CMakeLists.txt
src/tools/rbd/CMakeLists.txt
win32_build.sh
win32_deps_build.sh