D13816: Make KItinerary work as a static library

Emmanuel Lepage Vallee noreply at phabricator.kde.org
Thu Jul 5 22:11:24 BST 2018


lepagevalleeemmanuel added a subscriber: mart.
lepagevalleeemmanuel added a comment.


  Hello,
  
  > assuming we want static library support in other libraries/frameworks too,
  
  I can't talk for everybody, but I do want it. I actually maintain a huge patchset to fix static frameworks for ~30 of them. Getting it merged require face to face support with some people. Hopefully I can fix some of "all frameworks need this patch" cases at Akademy. I already merged the Kirigami patches and there is an "official" branch for qqc2-desktop-style too.
  
  > Or does anyone have an idea how to solve this more elegantly? :)
  
  Hi, we talked about this at Randa and QtWorldSummit last year. Sorry for stopping working on this after I made enough progress to make it work for me. I was assigned to work on other things. The clean way is using:
  
  Q_IMPORT_PLUGIN(KirigamiPlugin)
  
  Like other Qt static modules, This can be semi-automated using MOC magic and CMake-foo. All the magic is there https://github.com/ring-project/ring-kde-appimage-builder/tree/gentoo_base . It's not very clean, but it works. I have to catch a plane later today, so I can't write a lengthy comment right now.
  
  Just to say, fixing static frameworks and LTO bugs reduce the size of the KF5 based APK/AppImage by 86% and they load 6-8 time faster when PGO/FDO is enabled. Of course all of this is not "free". There is a non-trivial amount of work before @apol SDK or mine can work with random KF5 apps. Things like https://bugs.kde.org/show_bug.cgi?id=387820 become real crashers instead of unrefined behaviors. I brute force fixed all of them using horrible hacks to Ring-KDE could ship on Android/Plasma_Mobile/Appimage/macOS with a 13-18mb (with or without breeze icons) size instead of ~185-200mb (with or without breeze icons).
  
  See how me and @mart patched kirigami for queues how to do it "right". The definitions of "right" here is "exactly compatible with Qt static SDK module format". There is zero documentation on that topic. I reverse engineered it from the final Qt .a using `gcc-nm` and reading the auto-generated code `qmake` produces. I began to work on a blog post last year about that, but because I had to move on, it was never finished. It only document about 10%, read the code and patches for the other 90% https://gist.github.com/Elv13/a5805f2c979f3f86dfad0eb16d03c388

REPOSITORY
  R1003 KItinerary: Travel Reservation handling library

REVISION DETAIL
  https://phabricator.kde.org/D13816

To: vkrause, #frameworks
Cc: mart, lepagevalleeemmanuel, apol, kde-pim, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180705/ee9ea095/attachment.html>


More information about the Kde-frameworks-devel mailing list