Commit Graph

2116 Commits

Author SHA1 Message Date
Oswald Buddenhagen
5c57105565 don't include injected headers into linker version script
it makes no sense to version them, as they contain only #defines anyway.

it also removes the need to special-case their location in shadow builds
with pre-synced headers, which we actually failed to do anyway.

Task-number: QTBUG-56286
Change-Id: I4ea717f7be56494cfea0572389bea173d7470b6e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-14 09:00:29 +00:00
Thiago Macieira
b9a32351c8 findclasslist.pl: namespaces can be exported too
You can place the export macros in the namespace declarations on ELF
systems and that will apply to all declarations inside that scope. If a
namespace is exported like that, then we should mark it for versioning
too.

Note that the exporting doesn't happen for declarations in other scopes
of the same namespace, even though the findclasslist.pl script will mark
everything in that namespace. This should not be a problem.

Task-number: QTBUG-55897
Change-Id: I371f5b01e24a4d56b304fffd147274778b980ad2
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2016-10-13 08:29:02 +00:00
Oswald Buddenhagen
65d5bfc63d fix referencing libs fields dispatched to the selected source
the field was "over-expanded", which led to always querying the
non-existing source with an empty name. this broke the handcrafted
openssl library export which uses the feature.

amends c0cc50520.

Task-number: QTBUG-55530
Change-Id: Id019fcb3e7adcecaf47d7a65820179da1617c0f7
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2016-10-12 09:28:47 +00:00
Oliver Wolff
19cbe171c2 winrt: Added 2013 scheme to Windows Phone 8.1 AppxManifest template
This scheme is needed to define Bluetooth (LE) capabilities on Windows
Phone 8.1. Setting these capabilities is a bit more involved than what
we currently support from qmake (see
https://msdn.microsoft.com/library/windows/apps/dn263090.aspx) but this
way we at least prepare the template for these steps.

On Windows 10 the bluetooth capabilities are set automatically similar
to the way it happens for other modules.

Change-Id: Ib3aa88802c3b421c9c3d02ec4db647cde2191f16
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2016-10-12 09:03:01 +00:00
Liang Qi
e166d7d135 Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8 2016-10-11 14:14:31 +00:00
Maurice Kalinowski
c01d989a0c winrt: Enable usage of static manifest files
Previously, manifest files always got processed to perform, e.g., variable
expansion.
This change introduces the 'verbatim' flag for WINRT_MANIFEST.CONFIG to
disable those steps and perform a simple copy of the source manifest.

Task-number: QTBUG-43468
Change-Id: Ie7d4d27376efb3bcf5bc38163496f0a1f1319742
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-10-11 11:14:57 +00:00
Liang Qi
905329200f Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	src/gui/image/qpixmap.cpp
	src/widgets/kernel/qformlayout.cpp

Change-Id: I8a8391a202adf7f18464a22ddf0a6c4974eab692
2016-10-11 07:40:32 +02:00
Thiago Macieira
310bf3f57c Make sure flags from library detections go to the right places
Split them and add -I flags to INCLUDEPATH and -D flags to
DEFINES. Anything else gets reported as a problem and dropped.

This has the benefit that qmake will automatically use -isystem for
those paths if they lie in a system directory. As a consequence of that,
we won't get any warnings in headers located there. There are multiple
cases of glib, gtk, etc. headers producing warnings (such as enums
ending in comma). This does not fix warnings produced by use of macros
declared in system headers, though...

Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: I4b844cb518dbae5ea499811221f9015af985110a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-10-10 16:59:10 +00:00
Liang Qi
3e71810cf3 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/network/access/qhttpnetworkconnection.cpp
	src/network/access/qhttpnetworkconnection_p.h

Change-Id: I11f8641ef482efa8cee1b79977d19cc3182814b4
2016-10-08 17:15:55 +02:00
Samuli Piippo
62d13e2e9b Skip chmod for separate_debug_info when cross compiling on Windows
Task-number: QTBUG-56289
Change-Id: If6dd07182ed77e87865004c14240bf7f0c764772
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-10-07 05:25:42 +00:00
Liang Qi
ef25620ac1 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	mkspecs/features/mac/default_pre.prf
	mkspecs/features/qpa/genericunixfontdatabase.prf
	mkspecs/features/uikit/default_post.prf
	mkspecs/features/uikit/resolve_config.prf
	mkspecs/macx-ios-clang/features/default_post.prf
	mkspecs/macx-ios-clang/features/resolve_config.prf
	src/corelib/io/qiodevice.cpp

Change-Id: I6f210f71f177a3c3278a4f380542195e14e4b491
2016-10-06 20:12:27 +02:00
BogDan Vatra
98cb497772 Add QMAKE_LFLAGS_SONAME to linker flags for Android plugins
It's needed to shut up Android 6+ warnings

Task-number: QTBUG-52112
Change-Id: I21ff53d687bf545250ec7fcdc059db16d4cecbc9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2016-10-06 13:33:08 +00:00
Jake Petroules
12bc984f65 Clean up QT_QPA_DEFAULT_PLATFORM handling
This is now centralized in configure.pri except where it explicitly
needs to be overridden.

Change-Id: If829d6b5eecf9a5fc403d0a0600d12c9e5781525
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-10-05 19:07:30 +00:00
Oswald Buddenhagen
57987ad571 fix freetype/fontconfig configure system
convert the ugly config.tests/[...]/freetype.pri file into a custom
callback in configure.pri, and reinstate pkg-config use for freetype.
subsequently, use QMAKE_USE for the actual library references.

this fixes in particular cross-builds, as the new configure was not
passing the necessary information to the test any more, so the old .pri
file misbehaved.

Task-number: QTBUG-54911
Change-Id: I5fc9c254334a2675f7db4d54df4c77637e8e2487
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-10-04 20:20:39 +00:00
Oswald Buddenhagen
cd8b7fb865 make QMAKE_USE parameterizable
it's now possible to declare references which don't cause linking (or
cause only linking).

make use of this in the xcb-static library.

Change-Id: Ic429e0a1200b3a333738ea8d8e576ff64b6cac21
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-10-04 20:20:18 +00:00
Oswald Buddenhagen
1e97037ed9 factor out QMAKE_USE* processing to a separate prf file
this makes it possible for features added via CONFIG to use QMAKE_USE*,
as default_post.prf is processed before all features in CONFIG.

Change-Id: Id0812a0fb1aa5e658548bd2bc6003234085545e7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-04 20:20:06 +00:00
Jake Petroules
0059bf944d Don't add -spec XXX more than once to system command in xcodebuild.prf
The "args" variable would contain the original -spec XXX flags in
addition to the -spec macx-xcode passed in the system command invocation
below. The last use of -spec takes effect, so this code was entirely
ineffective. Consequently, uikit/default_post.prf in the nested qmake
call thought it's still the top-level call and thus added xcodebuild
again, which caused an infinite recursion.

Change-Id: Ie98d8a7f3c1cd875f4a4146af9a66a66b48cc6cb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-10-04 18:33:34 +00:00
Oswald Buddenhagen
546191b03f fix parsing of -system-proxies
this is, in fact, not the same as --proxies=system, and the old
configure handles this by putting special cases before the catch-all
patterns. we achieve this by trying the verbatim names (of all options,
which is admittedly a tad inefficient) before applying the -qt/-system
transformation.

Change-Id: Ic85a9d76d6e8ca95b2e1b5566f047f4b7ac38b98
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-04 08:26:49 +00:00
Oswald Buddenhagen
0872b62b2e make command line parsing more compliant with configure script
- generic --* options are defined to be booleans, without the
  possibility of having an additional parameter
- -qt and -system options don't exist in the --* form
- --foo=bar options exist only in the --* form

Task-number: QTBUG-55610
Change-Id: Ib0480ac6f479df48045c9de8e854a525862ee363
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-04 08:26:39 +00:00
Oswald Buddenhagen
d01133a7fc remove redundant load(qt_build_config)
every repo's .qmake.conf is expected to do it already.

Change-Id: I87ed75d80493d8f1c4548c5b9dadfdaf07b86d7e
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-04 08:25:40 +00:00
Oswald Buddenhagen
05786de946 remove obsolete module warning
this is a relic from the early times of the modularization.

Change-Id: I9ca46fa6457bf9ca207b6be1f0637f0349569ddf
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-04 08:25:34 +00:00
Oswald Buddenhagen
9e048799b8 fix msvc build in dirs with spaces
Change-Id: I2df71cce68e59b8d7565fb43953947a9a84970b3
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-04 08:24:58 +00:00
Liang Qi
3e949b75fd Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	mkspecs/features/mac/default_pre.prf
	mkspecs/macx-ios-clang/features/resolve_config.prf
	qtbase.pro

Change-Id: I65b5ebca4942a4f295bdd4ac1568e5c347333aea
2016-10-01 22:15:55 +02:00
Jake Petroules
d2b4a789c3 Fix explicit -sdk iphoneos builds
The order in which exclusive builds are added affects the order of
values in SUBTARGETS. xcodebuild.mk parses the value of SUBTARGETS in
the Makefile and selects the first entry, which would always be
release-iphonesimulator regardless of the build type. This obviously
caused -sdk iphoneos builds to fail.

This patch switches the order of in which exclusive builds are added so
that the entries which are not present in a particular build type are
always added last.

Change-Id: I306d6f7430c1dff3d741a8c5182b7af81d000e7f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-10-01 07:37:16 +00:00
Jake Petroules
156e3981db Reorder arguments to qmake self-invocation in xcodebuild.prf
26d44fce3d added support for passing the
configure options to qmake following a "--" argument. This interacted
badly with xcodebuild.prf as the "args" variable would contain the
standard qmake arguments AND the extra arguments following "--"... which
were placed prior to -spec macx-xcode and the path of the .pro file,
causing them to be ignored and thus qmake to print its usage when
attempting to generate Xcode projects for Qt apps on UIKit platforms.

Amends 6a9f38a11d, which fixed the same
issue inside qmake itself.

Change-Id: I3056bd811c2ce958952fec8e05ddef7a063c0646
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-09-30 18:26:49 +00:00
Oswald Buddenhagen
9f3deee912 purge attempt to install fonts
the fonts have been deleted.

amends c5ceabb9a1.

Change-Id: I8f707ea9da3bf2334d944f047d0ff7c14b3ff4bf
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-09-29 13:45:01 +00:00
Oswald Buddenhagen
0f503e3bb9 fix also QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO
amends eadd7e9cfb.

Task-number: QTBUG-56162
Change-Id: Ie8162ac7dc01726d902bcbe5bf749cc1610d8be3
Reviewed-by: Hannah von Reth <hannah.vonreth@kdab.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Morten Minde Neergaard <m-qt@8d.no>
2016-09-29 13:43:51 +00:00
Liang Qi
cdb56c42fc Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	mkspecs/features/uikit/xcodebuild.mk
	tests/auto/other/lancelot/tst_lancelot.cpp
	tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
	tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp

Change-Id: Ia0ae2de86094120281abd445138877c2cc3e882c
2016-09-29 00:38:01 +02:00
Jake Petroules
6c2d786e19 Add the ability for qmake to build Xcode asset catalogs
This essentially emulates Xcode behavior for QMAKE_BUNDLE_DATA.

This is mostly for our own internal use. No documentation is provided.

Variables introduced:
- QMAKE_ASSET_CATALOGS
- QMAKE_ASSET_CATALOGS_APP_ICON
- QMAKE_ASSET_CATALOGS_BUILD_PATH
- QMAKE_ASSET_CATALOGS_INSTALL_PATH

Change-Id: I9577415d637f022d05f301c5a0d799483cd2a963
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-09-28 17:58:54 +00:00
Oswald Buddenhagen
5dbcced3bf use bindir instead of libdir when launching tools on windows, take 2
this makes build dirs consistent with install dirs, which fixes
launching tests, examples, and build tools in some configs.

unfortunately, this makes prefix builds slower and their build dirs
bigger due to the DLLDESTDIR implementation being stupid (QTBUG-11435),
but i'm not inclined to fix that now. it isn't actually worse than for
non-prefix builds, so whatever.

Task-number: QTBUG-54438
Change-Id: Idbd034620e95cb23f7699d243678c4e9fa6353ac
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-09-28 16:27:59 +00:00
Liang Qi
680dd3313c Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/corelib/global/qlogging.cpp

Change-Id: I9cc8f25ad897efab6a42cb5c5161b1c9402952f0
2016-09-23 22:28:33 +02:00
Jake Petroules
c2869c3b0a Pass -quiet to xcodebuild when invoking make with -s option
This makes use of the new -quiet option in xcodebuild 8 to reduce the
noisiness of output when make is invokved in silent mode.

Change-Id: I3730dddcc1d9dae329b5ff254448533cdd573a30
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Mike Krus <mike.krus@kdab.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2016-09-21 21:42:22 +00:00
Liang Qi
7555a92581 Merge remote-tracking branch 'origin/5.7' into 5.8
5971b88e is not needed in new configure.

This merge also reverts "fix QMAKE_DEFAULT_*DIRS resolution with
apple SDK", 2c9d15d7, because it breaks iOS build with new
configure system.

Conflicts:
	mkspecs/features/default_pre.prf
	mkspecs/features/mac/toolchain.prf
	mkspecs/features/toolchain.prf
	src/dbus/qdbusconnection.cpp
	src/plugins/sqldrivers/mysql/qsql_mysql.cpp
	src/sql/drivers/mysql/qsql_mysql.cpp
	src/widgets/widgets/qmenubar.cpp
	src/widgets/widgets/qmenubar_p.h
	tools/configure/configureapp.cpp
	tools/configure/environment.cpp
	tools/configure/environment.h

Change-Id: I995533dd334211ebd25912db05b639d6f908aaec
2016-09-21 11:57:52 +02:00
Liang Qi
d148019f16 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp

Change-Id: I0af32ee55936d523cbd259b6fe82eb9c409f9074
2016-09-16 23:16:25 +02:00
Lars Knoll
8d6f2e7e15 Add a QT_REQUIRE_CONFIG(feature) macro
This macro expands into a static_assert and can be used to
trigger a compile error if a certain feature is not available
when trying to compile some code.

This is especially useful to protect against accidental inclusion
of headers that implement functionality related to a feature.

Change-Id: I456c55b989ce5f35f3af0e13c1886a85c23dfe29
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-09-16 12:27:59 +00:00
Oswald Buddenhagen
2c9d15d73c fix QMAKE_DEFAULT_*DIRS resolution with apple SDK
the code got factored out to an own toolchain.prf file, which is
load()ed from default_pre.prf, so no change at first.
however, on mac, we shadow toolchain.prf, and make it load() sdk.prf
first.

a side effect of this is that project files may not override
QMAKE_MAC_SDK any more, which seems to be no big loss. it is still
possible to override the sdk on the configure command line (but note
that this only ever worked for the target sdk).

it has also become harder to disable the use of an sdk altogether:
putting CONFIG-=sdk into a project file or the qmake command line has no
effect now. instead, it's possible to put it into .qmake.{conf,cache}.
to make it simpler again, it's conceivable to finally add qmake -pre,
which would allow setting variables before default_pre.prf is executed.

Change-Id: I149e0540c00745fe8119fffd146283bb214f22ec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-09-15 20:01:33 +00:00
Vikas Pachdha
46913db2ea Fixes issue with iOS when project path has a whitespace
Task-number: QTBUG-55505
Change-Id: Ic853ecd46a3cb098fff2904119e9002f3add3b8e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-09-15 10:17:54 +00:00
Lars Knoll
a668c6a6b6 Convert the old feature system
... to the new qmake based configuration system.

This removes the old qfeatures.txt (distributed over configure.json
files) and qfeatures.h (distributed over qconfig-<module>.h files).

qfeatures.prf is gone without replacement, as attempts to use it would
lead to followup errors anyway.

Change-Id: I1598de19db937082283a905b9592d3849d2199d0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-09-15 08:24:10 +00:00
Oswald Buddenhagen
b754b2815d rename description => label in configure.json
"description" suggests something slightly longer.

this may seem like a gratuitous change, but the upcoming replacement of
the old feature system clarifies makes it seem much less so.

Change-Id: Ibe702e01cb146b59127bf1f990b4acaef1c61d55
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-09-15 08:24:00 +00:00
Lars Knoll
2d3c73fcfe Modularize configure.json/.pri
Move the different parts of configure.json/.pri into the libraries where
they belong.

Gui is not yet fully modularized, and contains many things related to
the different QPA plugins.

Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: I6659bb29354ed1f36b95b8c69e7fce58f642053f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-09-15 08:23:53 +00:00
Laszlo Agocs
103ffa117d Add a spec for NXP Colibri VF50/61
Change-Id: I12450a214d61ffa00270095df0c77e57647d7a2c
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-09-10 14:54:16 +00:00
Lars Knoll
60e5a1c8ef Modularize the new configure system (infrastructure part)
This change implements the required infrastructure to modularize the new
configuration system.

This requires a hierarchy of configuration files, both for handling
multiple repositories and for individual modules inside the same
repository.

When configuring, they all need to get loaded first, as command line
processing needs to know about all possible command line options.

When the command line has been processed, the individual configuration
files need to get processed one after the other and independently from
each other.

Configure is now automatically invoked when building the a project
tree's "root" project; this works with both modular and top-level builds
of Qt (the latter with an according change in the super repo). As an
immediate consequence, the -skip option moves to the super repo with a
different implementation, as configuration is now done after the repo
list is determined. The option belongs there anyway.

This commit also adds an optional testDir entry to the json file. Like
this, we can still have all configure tests in qtbase/config.tests and
the configuration file in, e.g., corelib can reference those.

The files section can now be left out as long as a 'module' entry is
present, specifying the module name. The names of the files to generate
can then be deduced from that name. We still need to be able to specify
names directly for the global configuration files.

qtConfig() now also queries features which are module-specific. As it is
sometimes necessary to query the configuration of modules which should
not be actually linked (and cannot in the case of subdirs projects), the
new variable QT_FOR_CONFIG which allows specifying configuration-only
dependencies is introduced.

Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: Id1b518a3aa34044748b87fb8fac14d79653f6b18
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-09-10 14:04:01 +00:00
Lars Knoll
b95b00c61a Be more robust when reading the library version number from pkg-config
Ignore everything that after the initial period separated numbers.

Change-Id: I376b154ff0ab6e3877223ec1383ed4708ecd2164
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-09-10 14:03:43 +00:00
Maurice Kalinowski
5d771eb0c8 Add BLACKLIST to builtin_testdata
For platforms which require packaging the testdata into the application
resources, the BLACKLIST file needs to be added. Otherwise it will not
be found during runtime.

Change-Id: I2d5c3b3040b3b268bc73254459b8b902b7fae4e2
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-09-07 04:54:16 +00:00
Liang Qi
23ef3b04eb Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8 2016-09-06 06:56:27 +00:00
Liang Qi
d892e6f721 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	mkspecs/features/qt_common.prf
	src/plugins/platforms/windows/qwindowsdialoghelpers.cpp

Change-Id: I03b92b6b89ecc5a8db7c95f04ebb92ed198098a8
2016-09-05 18:47:27 +02:00
Jake Petroules
beaa792e20 Make TARGETED_DEVICE_FAMILY variable platform independent
This reduces unnecessary OS conditions in qmake since these platforms
are mutually exclusive, and also opens up their potential for use on
future devices (like carOS(?), which is device idiom '5').

This is also more similar to what Xcode does, as the
TARGETED_DEVICE_FAMILY variable is not platform specific.

Change-Id: I29d209cd8e0779f492bda829008264773e13c75c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-09-05 15:24:54 +00:00
Jake Petroules
603628b1ea Make DEVICE_ARCHS and SIMULATOR_ARCHS variables platform independent
This reduces unnecessary OS conditions in qmake since these platforms
are mutually exclusive, and also opens up their potential for use on
macOS to transparently support multi-arch builds like UIKit platforms.

This is also more similar to what Xcode does, as the DEPLOYMENT_TARGET
variables are platform specific, while the ARCHS variable is not.

DEPLOYMENT_TARGET has a use case for being OS specific in qmake (host
tools vs targets), while ARCHS does not.

Change-Id: Icee838a39e84259c2089faff08cc11d5f849758d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-09-05 15:24:50 +00:00
Liang Qi
657c2bfbec Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	tests/auto/testlib/selftests/generate_expected_output.py

Change-Id: If856162abf9a24ae2c9946d336a7d1da03520fa7
2016-09-05 13:57:12 +02:00
Jake Petroules
397f345a6a Remove simulator_and_device handling for the Makefile generator
This patch moves towards a more sensible layout for UIKit platforms,
where both the device and simulator architectures for binaries are
combined into a single Mach-O file instead of separating out the
simulator architecutures into separate _simulator.a files.

This approach is both more common in the iOS ecosystem at large and
significantly simplifies the implementation details for Qt, especially
with the upcoming support for shared libraries on UIKit platforms.

This patch takes advantage of the -Xarch compiler option to pass the
appropriate -isysroot, -syslibroot, and -m*-version-min compiler and
linker flags to the clang frontend, operating in exactly the same way
as a normal multi-arch build for device or simulator did previously.
Exclusive builds are still enabled for the xcodebuild wrapper Makefile,
which builds all four configurations of a UIKit Xcode project as before,
as expected.

A particularly advantageous benefit of this change is that it flows very
well with existing Xcode workflows, namely that:
- Slicing out unused architectures is handled completely automatically
  for static builds, as an executable linking to a library with more
  architectures than it itself is linked as, the unused architectures
  will be ignored silently, resulting in the same behavior for users
  (and the App Store won't let you submit Intel architectures either).
- Removing architectures from a fat binary using lipo does NOT
  invalidate the code signature of that file or its container if it is a
  bundle. This allows shared library and framework builds of Qt to work
  mostly automatically as well, since an Xcode shell script build phase
  can remove unused architectures from the embedded frameworks when that
  is implemented, and if Qt ever starts signing its SDK releases, it
  won't interfere with that either (though binaries are just resigned).

Change-Id: I6c3578c78f75845a2fcc85f3a5b728ec997dbe90
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-09-03 09:47:56 +00:00
Jake Petroules
4eb2feb29c Remove the ability to build simulator/device targets from SUBDIRS projects
This is done because a followup patch will cause simulator_and_device builds
to no longer use exclusive builds and so this feature could not work,
but it is not strictly necessary anyways because users do not need to be
able to do this.

Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: If869fbfea776751553c352c2d652edf745a3638d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-09-03 09:47:49 +00:00
Jake Petroules
73331eebf8 Enable precompiled headers on iOS, tvOS, watchOS
The actual blocker for precompiled headers is not the iOS/tvOS/watchOS
platforms, but the way qmake handled multiple-architecture builds on
Apple platforms.

This patch allows multi-arch builds to be performed while using
precompiled headers.

Since df91ef3d6c55692a0236f67b6c6b134a3bf84098 (April 2009), Clang has
had support for PCH files in the driver, which allows to use the
-include flag to automatically translate to -include-pch. We can then
take advantage of the fact that the -include option is allowed to not
be separate from its argument, which lets us take advantage of -Xarch to
specify a per-architecture precompiled header file.

This is done through some magic in the qmake Makefile generator which
"multiplexes" the PCH creation rule across multiple architectures and
replaces a series of tokens with the proper precompiled header paths
and architecture flags at usage point.

Change-Id: I76c8dc9cda7e218869c2919f023d9b04f311c6fd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-09-02 08:25:31 +00:00
Jake Petroules
4e53159d43 Mark Apple Clang 7.x as warning-free on macOS and (also Clang 3.9) iOS
iOS was excluded in 09aeda21b9, probably
unnecessarily. The build has been found to be warning-free.

Change-Id: I81de2fff40938b6ab9f7a6a5b9f08f8a8baadb16
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-31 22:16:02 +00:00
Thiago Macieira
8cfac7fba6 configure: ask pkg-config only for the info we're interested
No need to get libs flags other than -L and -l, since we're adding
everything to the LIBS variable in qmake anyway. We wouldn't want rpath
or other linker flags to leak through.

Change-Id: I7d42fe4b581e49df891cfffd146fab61fecbc5c9
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-31 19:22:34 +00:00
Mike Krus
c3f59f22ee Move ios_devices.pl into uikit folder
Was left behind in previous merges

Change-Id: Ic30cc2b234b904ad819c4e3e57804ac6e58ec1e9
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-30 18:14:32 +00:00
Oswald Buddenhagen
57d4b8f328 de-duplicate code relating to evaluation of 'negative' flags
Change-Id: I3fe4816719d9b2885319a1bb516cfb137f13e3f8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-30 13:24:20 +00:00
Oswald Buddenhagen
793f4ae5c9 remove pointless export from qtConfHandleLibrary()
that variable is not modified in this scope, so there is no point in
exporting it here. it was probably a leftover from an earlier version.

amends c0cc50520.

Change-Id: Ic6f93d8c38d547308aa88ef337fe49bda004b337
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-30 13:24:17 +00:00
Oswald Buddenhagen
03247666ee make qtConfOutputVar() a tad less cryptic
don't use variables where the value is known.

Change-Id: I3ec21441c5b7ee0b028f8f72e05d9e40e6192ecf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-30 13:24:11 +00:00
Oswald Buddenhagen
7e97d360a3 don't export cached libraries which were in fact not found
amends ce7df6ac7d.

Change-Id: I9898e756283a2e2556458bf71b59b0c1c76064ec
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-30 13:24:07 +00:00
Oswald Buddenhagen
95eed6278a fix location of injected headers in shadow builds
they are build-time generated, so they must go to the build dir
irrespective of whether we're using pre-synced headers.

Task-number: QTBUG-55585
Change-Id: I5f10b35c40b0ae2ddc5568d70e254b787ac3f914
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-30 13:23:27 +00:00
Oswald Buddenhagen
f43a258fc4 fix build with configure -sdk iphonesimulator
we need to suppress another qtConfig(simulator_and_device) check during
the configuration phase.

amends 60985aa4.

Change-Id: Iae279d282d47b4c254b7a6f9f33315abe126eff0
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-30 12:55:57 +00:00
Liang Qi
1cc571593a Merge remote-tracking branch 'origin/5.7' into 5.8
cf53aa21bf and 3aaa5d6b32
were reverted because of reconstruction in 5.7.

defineTest(qtConfTest_checkCompiler) in configure.pri is smart
enough to cover the case in a9474d1260.

DirectWrite: Fix advances being scaled to 0

Since 131eee5cd, the stretch of a font can be 0, meaning
"whatever the font provides". In combination with ec7fee96,
this would cause advances in the DirectWrite engine to be scaled to
0, causing the QRawFont test to fail.

Conflicts:
	configure
	mkspecs/features/uikit/device_destinations.sh
	mkspecs/features/uikit/xcodebuild.mk
	src/corelib/global/qglobal.cpp
	src/corelib/global/qnamespace.qdoc
	src/plugins/platforms/cocoa/qcocoamenuitem.h
	src/plugins/platforms/windows/qwindowsservices.cpp
	src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp
	src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
	src/widgets/kernel/qapplication.cpp
	tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
	tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp

Change-Id: I4656d8133da7ee9fcc84ad3f1c7950f924432d1e
2016-08-29 15:30:17 +02:00
Liang Qi
cc74452d6d Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	configure
	src/plugins/platforms/winrt/qwinrtclipboard.cpp

Change-Id: Ic6d58be3d1ed2bb507f2ba06c82361afd9f9ddb9
2016-08-29 08:13:40 +02:00
Thiago Macieira
2743cd54a0 Mark Clang 3.9 as warning-free
Change-Id: Id75834dab9ed466e94c7ffff1444b71f29f49afd
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-27 19:05:08 +00:00
Liang Qi
c7cdf3aac7 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/corelib/mimetypes/qmimeprovider.cpp
	src/corelib/mimetypes/qmimetype.cpp

Change-Id: Ib483ddb6bfc380e7c8f195feca535703814c3872
2016-08-25 16:12:11 +02:00
Maurice Kalinowski
f4b2115b51 winrt: Add support for version requirements for MSVC2015
Previously we hardcoded the minimum windows version to the initial
Windows 10 release. However features have been added which require a
higher SDK version (eg drag and drop). Deploying such a package might
fail during distribution to consumer devices.

Hence introduce WINRT_MANIFEST.minVersion and
WINRT_MANIFEST.maxVersionTested as variables for the manifest file. If
nothing is specified, both values will be set to the UCRTVersion
environment variable, implying the development setup from which qmake
has been invoked.

Change-Id: I1dcf1e75c67c4ab2fd5a3fdcc32c8783a336e6ff
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-25 13:27:22 +00:00
Oswald Buddenhagen
15c39dfe3d don't cache test result after pre-dep failure
there is no point in doing that, as we don't load it in that case
anyway. in fact, it would lead to caching a new result in every run.

Change-Id: Ia5cb27fa8a5d705d7f32a785b1e3b944f92d8929
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-25 11:59:54 +00:00
Oswald Buddenhagen
0f68ac2512 don't cache results of build_parts and skip_modules
as these tests do nothing but validating the command line, caching the
result is more confusing than anything else.

also make the tests silent, so they don't clutter an otherwise fully
cached configure run.

Change-Id: Ifc3d65278769b36a056650f077fd6274a7e192e7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-25 11:59:15 +00:00
Oswald Buddenhagen
d76a756b03 clean up qconfig/qmodule.pri handling in configure
instead of saving the files away and restoring them afterwards, use the
new and shiny discard_from() function to throw away everything the files
might contain.

strictly speaking, this is not precise, as the pris may also use *=, -=,
and possibly other operations which cannot be trivially undone, but the
purpose is essentially to discard the special outputs of some features
which may affect subsequent tests, for which this is sufficient.

as a side effect, the failure to load qmodule.pri is not fatal any more
(like for qconfig.pri), to save the pointless effort of ensuring that it
exists.

Change-Id: I07625b60c4f2e27b21206b2c16d24ab111737395
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-25 11:56:45 +00:00
Oswald Buddenhagen
d7a2852dd4 remove extra empty line before configure report
Change-Id: Id985e4738dda89e4d1af1ceccda33d830316e66a
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-25 11:54:41 +00:00
Oswald Buddenhagen
2c5eb3e668 fix conditions relating to host_build in non-cross builds
when it comes to compiler flags (be it warnings or include paths), it
doesn't matter whether we building/using bootstrap libraries, but
whether we are actually cross-building.

amends c55bdc271f and d8be8110a.

Change-Id: Idf988107e9cccc486672c0ee70dc9bdf8eab9d8c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-24 15:28:50 +00:00
Richard Moe Gustavsen
86ebd92add iOS, mkspec: update UUID parsing to support Xcode 8 beta
"simctl list devices" has changed output format in
Xcode 8 beta to include additional information placed
inside parentheses for each device. And this confuses the
scripts we use to parse and find UUIDs.

Instead of making the inline scripts even longer and more
complex, this patch will factor most of it out to a separate
perl script that reads out device information on json format
and parses the UUID.

Change-Id: I3cd4dc276ecda030fda1932073c8bf1e0bc85deb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-08-24 13:05:09 +00:00
Tor Arne Vestbø
16a421aa83 Xcode: Don't enable document versioning debugging
It results in passing an option on the command line that e.g. the
QCommandLineParser doesn't understand.

Change-Id: Ied08c930fab479b6432f025dfe861bdf22c513e6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2016-08-24 12:35:45 +00:00
Jake Petroules
89c235ca82 qmake: Also add bitcode flags to linker
This fixes errors linking against Qt when built as shared libraries and
with bitcode enabled (default on tvOS and watchOS).

Change-Id: I3eb3bb0b9615e0bc41e43ffae8645248dbf803c6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Mike Krus <mike.krus@kdab.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-20 00:32:07 +00:00
Jake Petroules
f6bd3623a2 qmake: enable bitcode also for iOS
It's optional but default in Xcode, and will probably become required

Change-Id: I6917a9cf15b48dbaee57f1a92ea47d68fb3c253a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Mike Krus <mike.krus@kdab.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-08-19 21:06:05 +00:00
Jake Petroules
57378a108c Add support for Apple watchOS
Change-Id: I3f9e00569458a463af2eaa5a3a16a6afd1e9c1ea
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-08-19 21:05:55 +00:00
Oswald Buddenhagen
8185fe84a6 fix up detection code for compiler defaulting to c++98
- remove the unconditional CONFIG+=c++11 from default_pre.prf, so the
  change actually has any effect
- fix up the description fields somewhat

this amends 091df96fb8, which was rushed in without maintainer review.

Change-Id: I88b859d6e2f0fe3d6a4771afe464a7c445e7b47b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-19 09:25:48 +00:00
Oswald Buddenhagen
ce7df6ac7d add configure test result caching
Started-by: Lars Knoll <lars.knoll@qt.io>
Change-Id: I29bafc5913cf95d9908dbcdd9597df2258b69837
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-19 04:28:55 +00:00
Lars Knoll
b62a42dde1 Remove useless guards around #define's in qconfig.h
These are not meant to be overwritten by command line defines
anyway. Bad things could happen if they are not in sync with
the values in the pro files.

If you want to change them, reconfigure Qt.

Change-Id: Ic456e54b97e6909f01a4f4be33e3d7e2b2571e80
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-19 04:28:48 +00:00
Lars Knoll
3196527c1a Don't define QT_OPENGL_ES_2* in opengl.prf
Defining QT_OPENGL_ES_2 would only lead to conflicts with defines from
qconfig.h.
QT_OPENGL_ES_2_ANGLE also moves to the .pri.
QT_OPENGL_ES_2_ANGLE_STATIC is not used and is removed altogether.

Change-Id: I614fb00525ac696e066ac8328bb9bf61fca08a01
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:28:40 +00:00
Lars Knoll
60985aa42b Use qtConfig throughout in qtbase
Use the new qtConfig macro in all pro/pri files.

This required adding some feature entries, and adding
{private,public}Feature to every referenced already existing entry.

Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:28:05 +00:00
Lars Knoll
56ee007b3f Rework privateFeature
privateFeature would add QT_NO_FEATURE to the DEFINES in the private
.pri file, which was somewhat inelegant.
Additionally, it would add the feature to the _public_ QT_CONFIG
variable, which was plain wrong.

Replace the implementation with the one just introduced for
publicFeature, with the difference that the features are written to the
private files instead.

As this entirely disposes of the old system, all usages in the project
files need to be replaced atomically as well.

Change-Id: I506b5d41054410659ea503bc6901736cd5edec6e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:27:29 +00:00
Lars Knoll
606924132f Add support for safe feature checking at compile time
Added a qtConfig(feature) function to qmake, and a QT_CONFIG(feature)
macro. These can safely check whether a certain compile time feature of
Qt is enabled or not.

For this to work the feature has to have a publicFeature or
privateFeature output in the configure.json file.

In pro files, please use the qtConfig(feature) test function
instead of checking contains(QT_CONFIG, feature), as the latter
will be unreliable with the upcoming modularization (it requires a
load(qt_module_config) before doing any such checks). Note that
feature names are now lowercase, and identical (except for hyphens
versus underscores currently) in the pro and c++ files.

This makes the logic easier to follow, as we avoid all double negations,
and most importantly, QT_CONFIG and qtConfig are implemented in a
way that you'll get a build error for a mistyped or non-existent
feature. This will also prevent accidental use of a widget feature
in gui in the future.

This gives us complete symmetry between the handling in pro and
c++ files.

Change-Id: I60404f97953724e639ffb6386cce2e8b1e4b735a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:27:17 +00:00
Lars Knoll
48b4e0bf6f Improve library version handling
Output the version as a define into the private config header as
a define using a hex number. Like that we can easily do version checks
on libraries using the QT_LIBRARY_VERSION(lib) and QT_VERSION_CHECK()
macros.

Change-Id: I6dc4ac6550886ca95c5542b6e75cd933ed079d76
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:27:06 +00:00
Oswald Buddenhagen
ce942a2265 sync timestamps also for forwarding headers to generated ones
this wasn't possible when these headers were still generated by syncqt,
as the targets may have been still missing at that time. however, as we
do that now with qmake, forwarding the timestamps is perfectly possible,
and is consistent with what syncqt itself does for "regular" headers.

the immediate problem this solves: when the early creation of the
forwarding headers in qtbase.pro is removed, they get created only when
corelib.pro is processed. their timestamps would be after the timestamps
of the already built bootstrapped libraries. if now the project files of
these libs get re-created, qmake's not conditional-aware dependency scan
would add these headers to the libs' deps, thus causing them to be
re-built. the re-built tools would in turn cause all mocs and thus all
libraries to be re-built. this would be particularly problematic if it
happened between 'make' and 'make install' due to another bug ...

Change-Id: I8d597f1f925369d93aaf3cc6c02e954eeae003a4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-19 04:26:54 +00:00
Oswald Buddenhagen
34b95a643d fix relative paths in forwarding headers to generated privates
Change-Id: I837407503ef81f1059a7d531d9e57a67059855c8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-19 04:26:47 +00:00
Oswald Buddenhagen
4b288e30ef employ QMAKE_USE: LIBS += -lfoo
this switches all instances of LIBS[_PRIVATE] += -lfoo where a config
tests exists for foo.
this removes some code duplication between tests and project files (in
case of conditionals), and ensures that the projects always actually use
the libraries configure has found.

Change-Id: Ia7e80c8db5f329290c7f1a4e03a8bf78882a687e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:26:43 +00:00
Lars Knoll
15bf5ef8b8 Add method to encapsulate dependencies to external libraries
Adding an entry that represents an external library to the
QT_USE[_PRIVATE] variable will cause qmake to lookup the
required compiler/linker flags from the configuration system,
and add them to the module that is being compiled.

Change-Id: I309aa2749ddf4fab13ab8fdd26e8ab2123719ea8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:26:26 +00:00
Oswald Buddenhagen
d90db0f136 rewrite makespec verification with qmake based system
cleaner, and covers windows as well.

Change-Id: I0e884909a3f49610fab750ba1ef6112f43e5d5d1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-08-18 17:10:52 +00:00
Lars Knoll
97b856b788 Use the qmake based configuration system also on Windows
Adapt configure.exe to use qmake to do most of the work of configuring
Qt. This unifies a large part of our configuration system between Unix
and Windows. configure.exe is now still doing the license check,
creating qconfig.cpp, building qmake, and not much more.

On the way, re-implement the still missing Windows-specific tests with
the new system.

The opengles2 vs. opengl-desktop conditions got a bit convoluted, as
Unix prefers desktop GL, while Windows GLES2 (via ANGLE). Superficially,
there is a circular dependency, but the platform scopes are supposed to
break it.

Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: Ia1941f2c34b7f5bd4990a7673cd737361381c2e7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-18 17:10:47 +00:00
Lars Knoll
6a90c9a8e5 Handle windows line endings and tabs in json config files
Change-Id: I154629d862977dde5232db3bb2597474b6053ffd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-18 17:10:35 +00:00
Oswald Buddenhagen
fd3e12e7a6 replace mechanism to override variables from the mkspecs
it is sometimes desirable to override values from the mkspec without
modifying (or wrapping) the spec itself. linux distributors do this on a
regular basis.

so far, we'd pick up CFLAGS, etc. from the environment, in a somewhat
autoconf-like fashion. however, over time, this approach proved
problematic: the concept doesn't mix particularly well with mkspecs to
start with, is unexpected (and therefore causes frustration), and
doesn't mix well with cross-building (at least the way it was realized).
ironically, it was implemented this way (quite a while ago) upon my
explicit request ...

the new mechanism uses explicit variable manipulations on the configure
command line, just like qmake itself understands. as it happens, this is
again quite similar to autoconf-generated configure scripts. however,
this time around we don't pretend to be actually autoconf-like, so we
also don't try to map any variable names (some of which have different
semantics anyway).

this commit also eliminates the last use of the QMakeVar() function,
so delete it and the underlying infrastructure.

Task-number: QTBUG-32530
Task-number: QTBUG-42962
Change-Id: Id31a6b80e1add08ca21f5b178614bda530d12374
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-18 17:10:25 +00:00
Lars Knoll
9172143f52 Add configure.exe-like FOO_LIBS=bar style command line options
Add the command line options supported by the windows version of
configure and respect them when running our configure tests.

Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: I1206d60a177e251540d34d232c73c930847564b3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-18 17:10:18 +00:00
Lars Knoll
27b03be893 Add support for locating headers and libs in qt_configure
So far we only had support for locating executables. Also
support locating header files and libraries.

Change-Id: Ib2a83e8338d2da975204089d84c608061a081f29
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-18 17:10:03 +00:00
Lars Knoll
c8b46d3989 Implement proper dependencies for configuration tests
Some test types (like the compile tests) require that other
features have been checked before, so that the compile test
sets up the right environment. Implement this through a
'testTypeDependencies' section in the json file that explicitly
encodes those dependencies for certain test types.

This replaces the 'priority' field in the feature list.

Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: I70e7c67a4f2c971149bcac090cecbbe9cfff3f57
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-18 17:09:57 +00:00
Oswald Buddenhagen
c0cc505209 rewrite library handling in configure
so far, each library was distributed over a test and (optionally) a
'library' output of a feature. this was conceptually messy and limiting.
so instead, turn libraries into a category of their own.

libraries now support multiple properly separated sources, which makes
overriding them a lot saner. sources can be conditional to accommodate
platform differences.

as an immediate consequence, move (almost) all library references from
the config test projects to the json file.
a few tests were excluded, because they are doing somewhat magic things
that should not be handled in this bulk change:
- freetype: .pri file shared with actual source code
- clock-gettime: -lrt is conditional, and there is a .pri file which is
  shared with actual source code
- ipc_posix: -lrt & -lpthread conditional
- iconv: -liconv conditional

the multi-source mechanism is used to make a variety of tests work on
windows, where the library name differs from unix (and sometimes between
build configurations). some tests still needed minor adjustments to
actually work.

on the way, fix up disagreements between manually specified libraries
and pkg-config lines (affecting several xcb-related tests).

Change-Id: Ic8c58556fa0cf8f981d386b13ea34b4431b127c5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-18 17:09:52 +00:00
Oswald Buddenhagen
492d7d14fc improve handling of test commands which produce output
never use $$system() directly, but instead use qtRunLoggedCommand() with
a newly introduced out parameter. that way we can print the command's
raw output, which should help debugging configure problems.
additionally, we now consistently check the exit code of all executed
commands, which should avoid confusing followup errors.

note that as a side effect some calls now use $$system()'s 'lines' mode
instead of the bizarre default splitting mode. this has no impact on any
of the cases, which is why it is basically a negligible style change at
this point.
however, qtLog() gained support for arguments with more than one element
to accommodate this.

Change-Id: I40d907e27de32dfec8d6086ce7d93fc4be18241f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-18 17:09:38 +00:00
Oswald Buddenhagen
0b93d1a10a remove spurious QT_CONFIG -= opengl
it's not quite clear what the purpose of this is supposed to be,
especially given that the prf is loaded way after anyone would have
examined QT_CONFIG.

Change-Id: Ia49377c952902fed4084178c7f857e1acd11ad03
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-18 17:09:13 +00:00
Erik Verbruggen
3bf0c14a26 Darwin: Fix clang LTO builds
llvm-ar is not shipped as part of Xcode. Use libtool instead, just like
Xcode does.

Change-Id: Ic9c5e16c826c0d42979556f78d2cf6415542ef93
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2016-08-18 13:48:52 +00:00
Liang Qi
0ca4fcbc36 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/plugins/platforms/xcb/qxcbintegration.cpp

Change-Id: I2d71d06a55f730df19ace0dd3304238584a0497f
2016-08-18 11:07:51 +02:00