We need to ignore this option in qt_configure.prf.
This amends 077ea0c633.
Task-number: QTBUG-87049
Change-Id: If05b16a95d0830df9ca63961576981f8983820cc
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Macros and the await helper function from qfunctions_winrt(_p).h are
needed in other Qt modules which use UWP APIs on desktop windows.
Task-number: QTBUG-84434
Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This amends commit 9864d2c6. Some variables that are set in
qtConfLibrary_inline were not exported.
Fixes: QTBUG-78873
Change-Id: I10d766c1f41d2baa61967ee931a6631346cac2e9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Change a1ea498789 did replace different pkg-config calls for
-L, -l arguments to one. Anyhow, it also removed the eval() call that
ensured that the return string was split by whitespace, meaning that
paths couldn't resolve anymore properly if multiple arguments were
returned.
Fixes: QTBUG-79668
Change-Id: I4091fea6891ef79836e05f8e87ffa9d69863a8f5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This ensures that also linker commands like -pthread are returned.
Fixes: QTBUG-77159
Change-Id: If9ab3797ccfb52c6b96a4ab120c59fd8896d5466
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 4ddc50c0cd16ddd146ea9ea21d6565c8f4a5e2bc)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This reverts commit 521a85395d.
Having libraries resolved to absolute file paths by configure has
annoying consequences:
1. The Qt installer needs to unabsolutify paths in all kinds of files.
This is error-prone and fragile.
2. It hurts Qt's relocatabilty. The absolute paths are unlikely to be
right on different systems.
3. Qt's configure must imitate linker behavior correctly to do the
resolution right on every platform, which is hard to get right.
Consequently, the disadvantages of 521a8539 outweigh the advantages.
Task-number: QTBUG-72903
Change-Id: I3e159c46a1348963615b95614e56f026ecb2aefd
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Multi arch build in one go is need to support the new .aab packaging format.
By default the users apps are built for all Android ABIs: arm64-v8a armeabi-v7a x86_64 x86
The user can pass ANDROID_ABIS to qmake to filter the ABIs during development,
e.g. qmake ANDROID_ABIS="arm64-v8a armeabi-v7a" will build only for arm ABIs.
[ChangeLog][Android] Android multi arch build in one go,
needed to support the new .aab packaging format.
Change-Id: I3a64caf9621c2a195863976a62a57cdf47e6e3b5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
The checks whether we have a Qt prefix build were broken for
top-level builds. Non-prefix top-level builds were incorrectly
detected as prefix builds.
For top-level non-prefix builds QT_HOST_DATA/QT_INSTALL_PREFIX becomes
something like "~/my/build/dir/qtbase" but .qmake.cache (and
.qmake.super) is/are created in "~/my/build/dir".
This patch extends the prefix_build check by probing for the existence
of .qmake.super, which only exists for top-level builds. Also, we add
qt_prefix_build_check.prf as central place for determining whether we
have a prefix build to make sure that qt_configure.prf and
qt_build_config.prf use the same logic.
Fixes: QTBUG-76185
Change-Id: I2b76fe26013496aaf2dac96ea711b06a69550a29
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Do not store this variable locally, because
a) it might change if the SDK location changes
b) does not play well with Qt installer packages which would provide the
include path of the build machine.
To achieve this we introduce the (usual) magic value - for
QMAKE_EXPORT_INCDIR_VULKAN to denote "do not export this value".
Fixes: QTBUG-73796
Change-Id: Ied26ee12cbcdf7f5f6e1caef5d29dadf6309c5d6
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
The sysrootification of QMAKE_INCDIR_OPENGL on macOS must happen only
once. Commit 49ef3773 addressed this but stored the sysrootified
QMAKE_INCDIR_OPENGL in qt_lib_gui_private.pri. For installer packages,
these paths are the paths of the build machine and most likely wrong
on the user's machine.
This reverts commit 4949ef377349ba4dae840c2d5caa36e2d516707baa and
restores the sysrootification in sdk.prf. The original include paths
are assigned to QMAKE_EXPORT_INCDIR_OPENGL and stored as
QMAKE_INCDIR_OPENGL in qt_lib_gui_private.pri.
Fixes: QTBUG-75374
Task-number: QTBUG-73736
Change-Id: I4c0f65866d60660c632363dba3adc7ea2e344bfc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
For gcc's -I and -L arguments a = prefix is replaced by the sysroot.
Since we're resolving include paths and library paths, we have to
support this feature.
For example, the linux-rasp-pi3-g++ makes use of this and is broken
without this patch.
Change-Id: Ie39e63322bd35e2a93aa8e55d52260164b8c6a6b
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
INTEGRITY compiler searches for exact filename if the -l argument already
contains .a suffix. GNU linker uses exact filename if -l argument begins
with a colon.
Change-Id: I62be8f1e6b9c7dc7eaa5ab3d4bfc55460d729737
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Calling a qmake replace function without assignment is undefined
behavior.
This amends 11ae0e77.
Change-Id: Ie716f295275d1ba79a217745b332a8eca04b355d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
https://gcc.gnu.org/ml/gcc-patches/2018-10/msg01240.html
This is currently only used for webengine, where link time really matters.
New configure options:
* force 'lld' '-linker lld' or' --linker=lld'
* force 'gold' '-linker gold' or '--linker=gold'
* force 'bfd' '-linker bfd' or '--linker=bfd'
Note before by default gold was always forced (if supported) now default linker
is system default one.
[ChangeLog][Tools][configure & build system] Added --linker=[bfg,lld,gold] configure flag.
Change-Id: Idaa13510da70243c6176b96db846d629cd65c7af
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
If configure is called with -continue, it should not stop processing
command line arguments after encountering an invalid one.
Example:
configure ... -continue -quack -no-feature-gui
would ignore everything after -quack.
Change-Id: Ia5f0cb13414c9c0c7246ff0c72f8e935fe6dca3c
Fixes: QTBUG-72912
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
...and yield a warning that -skip has no effect in a qtbase build.
This is consistent with configure's help output and enables us to
always pass "-skip qtwhatnot", whether we're calling top-level or
qtbase configure.
Change-Id: Ie5b0791a6000d1d78b1367658ad86a92b2ec6a6a
Fixes: QTBUG-71253
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Qt couldn't be configured with -system-zlib on macOS, because qmake
failed to find "/usr/lib/libz.dylib".
The library path is something along the lines of
"/Applications/Xcode.app/.../MacOSX10.14.sdk/usr/lib" which doesn't
contain "libz.dylib". But it contains "libz.tbd", which is a YAML-file
pointing to "/usr/lib/libz.dylib". One can pass the absolute path to
this tbd file to the linker, which will then pick up
"/usr/lib/libz.dylib".
Introduce a new variable QMAKE_EXTENSIONS_AUX_SHLIB, which is a list
of auxiliary extensions for shared libs, and add the "tbd" extension
to it on macOS.
Change-Id: I083b79a69d00232e35f9d6164ffa86cb473f1742
Fixes: QTBUG-72745
Fixes: QTBUG-72964
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
... and use that to inline the xlocalescanprint test.
Change-Id: I0973133d7f9ecc9a38b70dc4b83df174a35b2b1f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
this is implemented by means of (multiple) inheritance, which applies
specifically only to the inlined source and header list, but not to
library sources or dependencies.
Change-Id: I8f1d5b34d1d2d12e39225dc50357ad6ec648c6b6
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
it works without it, but technically speaking it's undefined behavior.
Change-Id: Icdcdd5b923ce4cecd9dc9e75f9d5d66d0fa8a032
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
while the command line doesn't actually permit it (that can be
re-evaluated separately), derivatives of the inline source type may want
to inject additional paths, as is the case with opcua.
the incdir field supports multiple entries without additional action.
Change-Id: I3860ca1fc8fab25c04eb63bdb2f855b77ff3b9a4
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
this allows compile-testing the specified headers with no further tests.
Change-Id: I268ff328deee221d9b92386fe2bd133b19a6f8e2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
like all qt_*.prf files (exceptions prove the rule), the configure
system counts as private api.
Change-Id: Iea3057445e430029ecd8449e604e2d5c499ae10a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
in addition to the actual library resolution, also resolve the headers
belonging to the library, to validate the include path, and possibly
ensure that the right version of the library is present.
the "include" entries were moved out of the "test" objects, and renamed
to "headers". this cleanly permits libraries without compile tests.
the headers were not put into the sources, because the variance among
the includes is generally orthogonal to the variance among the
libraries.
note that this - like the library resolution - provides no support for
darwin frameworks. consequently, the opengl libraries are excluded from
the conversion on darwin.
similarly, wasm is excluded (centrally), because emcc is magic and would
need advanced wizardry to be dealt with.
Change-Id: Ib390c75371efa2badcfec9b74274047ce67c3e5a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
uses of this function (or the "files" stanza in configure.json) which
don't explicitly target windows don't specify the .exe extension, so we
need to add it automatically if it's missing.
Task-number: QTBUG-57436
Change-Id: I1994378399bc3466c32ee065e752516f42652975
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
we already knew the dependencies (as they are declared in the json
files), but failed to export them in any way, which made linking against
statically built external deps which have deps in turn fail (unless the
project happened to pull in the dep anyway, as is the case with qtcore +
zlib).
the previous assumption was that the USE-able library objects would be
self-contained, but that is conceptually unclean. instead, properly
export the raw dependencies and resolve them only in qmake_use.prf.
note that pkg-config produces self-contained output, so we need to
actively subtract the dependencies we know.
Change-Id: I4b41a7efc05bbd309a6d66275d7557a80efd5af4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
note that pkg-config is a tad stupid: it won't tell us if the package is
built statically, but one needs to explicitly ask it to output
transitive deps for static packages. we can do that, as we resolve the
pkg-config output to actual libraries, so we know if they are static.
always asking it would print the transitive deps also if we found a
dynamically linked library, which would inappropriately extend the link
interface. the latter actually happens on windows (because we can't
easily tell apart real static libs from import libs), but that doesn't
matter, as under windows, the linker transitively resolves dlls anyway.
Change-Id: If1be3b3df476374d5c8e62f4b185477c988223b3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
this considerably speeds up failures, as no doomed build is attempted,
and produces more reliable results, as no second lookup (which would be
subject to environment changes) is done any more during the build.
in principle, this also opens up possibilities like selecting specific
variants of dependencies, automatically extracting rpaths, etc.
qt_helper_lib.prf also needs to create fully resolved library names now.
Change-Id: I65f13564b635433030e40fa017427bbc72d1c130
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
when building additional modules against an already installed qtbase,
$$[QT_INSTALL_PREFIX/get] is obviously the same as
$$[QT_INSTALL_PREFIX], so we would misdiagnose a non-prefix build.
instead, use the same condition as qt_build_config.prf (we cannot just
rely on what it sets, because in qtbase configure context it's evaluated
before we set up the paths).
Fixes: QTBUG-60541
Change-Id: I37be30e0e682ece76ed460a66f1984ee0fe2ed71
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
... for debugging purposes.
this needs to work in every configure run even though the options
(currently) come from qtbase's global scope. this is accomplished by
automatically injecting the test type dependencies declared in the
'builtins' scope (where they generally make no sense whatsoever, because
there are no tests there) into other scopes (the first one that has a
test of the particular type, specifically). we do that *after* the
scope's own test type deps, so it can do its custom stuff first (it can
explicitly activate the required features if it depends on some global
stuff).
Change-Id: I67317da1b55804d39458bdbcf13d39a3e57a13bf
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
the global flags are deprecated in favor of per-library paths, but they
obviously should still work. but apparently no-one cares, because there
isn't even a bug report about it ...
amends 90eee08b3.
Change-Id: I85aee41ca11de1715d1c750ae8e663093e012fb7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
configure already does it for qt itself, so it's pointless to ever invoke
in default_pre.prf.
to make the exclusion work during the makespec reload during early setup,
we pull ahead the restoration of CONFIG, hoping it won't cause too many
side effects.
another change in qt5 will ensure that top-level builds are also covered.
finally, configure tests also need an explicit exclusion.
that way, attempts to re-configure build trees of commercial builds
after the day of the first configuration do not fail anymore.
Task-number: QTBUG-63452
Change-Id: I42264f64d7621784d4d67bde885a8e501f5ca413
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
the sysroot flags need to be established even before setting up the
spec, because as soon as that happens, toolchain.prf will try to
determine the default paths and cache them.
this also fixes sysroot use in toolchain flag support tests, which run
(somewhat) independently from the toolchain setup.
Task-number: QTBUG-63483
Change-Id: I7be1540e766dac58fb16f63176aa8d2879b51ae0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
the callback is specific to qtbase/configure.json, so it belongs into
qtbase/configure.pri.
amends d90db0f136.
Change-Id: I905f985e2d3d2e42c4587cbacdea8dc3eb09a5be
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>