First step towards supporting static plugins by only having one code path.
Task: https://phabricator.kde.org/T14727