The qmake hook sets its own `CONFIG+=debug` or `CONFIG+=release` depending on
how `qtbase` was built. We no longer rely on using the custom deriver for this
feature.
This fix moves linker flags of the form `-framework foo` from dependency_libs to
inherited_linker_flags, since libtool doesn't understand them. See #96977 for
details.
Fixes#96977
Go beyond the obvious setup hooks now, with a bit of sed, with a skipped case:
- cc-wrapper's `dontlink`, because it already is handled.
Also, in nix files escaping was manually added.
EMP
Some executables are built as PIEs (e.g. keepassxc) and are technically
isELFDyn, not isELFExec. Without this change those executables will not
be wrapped.
First, closure size is reduced by including the static libraries in $out instead
of trying to move them to $dev. The Qt build system cannot handle libraries
being split between different prefixes. Previously, the static libraries were
moved into $dev and the shared libraries were symlinked from $out to $dev to
fool the build system. However, this causes $dev to be retained at
runtime. Instead, we now keep the static libraries in $out. Fortunately, the
static libraries are not very large anyway.
Second, we build with QT_NO_DEBUG defined unless debugging is enabled. This
causes some assertions to be removed; when assertions are included, they pull
paths from $dev into the runtime closure by using the __FILE__ macro. We also
now patch qtbase to remove even more assertions when QT_NO_DEBUG is defined.
This continues #23374, which always kept around both attributes, by
always including both propagated files: `propgated-native-build-inputs`
and `propagated-build-inputs`. `nativePkgs` and `crossPkgs` are still
defined as before, however, so this change should only barely
observable.
This is an incremental step to fully keeping the dependencies separate
in all cases.