Move compiler warning 4996 from level 3 to 4, like we did already for
desktop builds: 0a76b6bc7f .
Change-Id: Ic4bbaeb3104352a915b15eec7a9c9dda9a5cceec
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Naming for different logo sizes on WinRT has been varying in the
past and evolved from using small/medium/large to some being
explicit (71x71).
Add new values introduced by 8.1 (310x150, 310x310,...) and clean up
mixed usage. Detailed pixel versions overrule general specification
and latter ones stay mostly for compatibility reasons. Still the
preferred way is to use explicit pixel values.
Task-number: QTBUG-43644
Change-Id: I9173ec2951a82e5eac9d8c9956bfb0bb4d1a2459
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
By using the special "ar" and "ranlib" tools, the symbol table is made
visible, so we don't need fat LTO binaries. Since we need to store the
new tool names, we may as well clean up ltcg.prf with variable names for
the fat mode too.
Change-Id: I7e53af0c74a3d069313f38500b72538af1d61128
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Move compiler warning 4996 from level 3 to 4. This is needed to avoid
warnings about the use of C++ standard library functions like std::copy,
which is used e.g. in qvector.h (since c6752c5aa1):
'std::copy': Function call with parameters that may be unsafe -
this call relies on the caller to check that the passed values are
correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See
documentation on how to use Visual C++ 'Checked Iterators'
Because the warning has to be disabled before any standard C++ header
is included one cannot just fix this locally in qvector.h.
Change-Id: I929f1535656bca9f5beb7fd0d557178370c232c6
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
With the -load_all option turned on then it will cause a problem with
the network bearer plugins as they share the same files and on OS X
two plugins will be built and potentially linked against when building
statically.
This only effects gcc builds because clang does not turn this option on
when linking by default either.
Task-number: QTBUG-39238
Change-Id: Ib259304c3da74b6b4f6fcc6e3766427303af3bbe
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
These mkspecs are not supported and no longer compile. Related support in
qmake has also been removed.
Change-Id: I7706dcfa5471e55e2ae3d580d65e9371e2c652d5
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Tested with the Preview release of November 2014.
Differences to the 2013 detection and support:
- Option -Zc:strictStrings is present in both debug and release mode
and is passed to qmake's own build
- New warnings 4456, 4457 and 4458 (shadowing) are disabled
- Compiler supports -arch:AVX2
Change-Id: I9572ff4d4aded4004c1fa5d6f13ffee5462043d6
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Most files are exactly the same, so it's silly to duplicate this all
over. The differences could have been kept in each of the qmake.conf
files, but I preferred to centralize because they apply to each newer
version and, soon enough, version-specific configuration would grow
again.
Change-Id: I5c5ed58055c954acf4851d87c70cc5af49c98738
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Due to the way that the QCC mkspecs are structured, the recent
change to add full optimization support causes the -O2 flag to
be completely dropped from QCC builds in release-with-debuginfo
mode, since the QMAKE_CFLAGS_OPTIMIZE variable is not declared
in any configuration file included by QCC toolchains. This patch
adds the necessary flags to make the QCC toolchain operate correctly.
Change-Id: I4cd93442d59fae7c92fc5219cddb16f367447203
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Add WINRT_MANIFEST.rotation_preference as description which orientation
is allowed or preferred by the app. Valid values for Windows Phone are
portrait, landscape, landscapeFlipped. WinRT also allows portraitFlipped
Task-number: QTBUG-40830
Change-Id: I6b11afcdb72c2c158dadddafc5d90c1d18ab9d8b
Reviewed-by: Andrew Knight <andrew.knight@theqtcompany.com>
While it does not look like the clang-based mkspecs had any problems so
far with not having QMAKE_LINK_C and QMAKE_LINK_C_SHLIB defined, it
makes sense to set them to $$QMAKE_CC just like the GCC-based ones so
CONFIG=use_c_linker works as expected.
Change-Id: Ib660d12b001dd7a877b6f03e79715db08a272968
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
GCC and Clang support compiler intrinsic error detections tools:
address, memory, thread, undefined
Let users conveniently enable it in qmake, for instance with
CONFIG += sanitizer sanitize_address
Also add a -sanitize [...] option to configure to use it by default
for both the Qt libraries, and user applications.
[ChangeLog][configure] Added support for GCC/Clang -fsanitize= options
Change-Id: Ie5418abcdf41842566df510d7707e41739e66f87
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This is done by defining QMAKE_LFLAGS_RPATH for compilers for Apple platform.
Task-number: QTBUG-31814
Change-Id: I9040df341ad46395d6ab71bc760ba7a5ee5ff291
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
This code hasn't been tested for at least 4 years. It's not maintained
and probably doesn't work.
Change-Id: I4b9a5179e34111b400914f91caa6b741b69771bb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This patch adds the feature use_gold_linker to use the gold linker that
has been part of of GNU binutils since 2008. Gold links C++ libraries
much faster and use less memory.
The feature is autodetected when building Qt on Linux, but can be disabled
in configure. On MingW builds it is default off but can be enabled for
cross builds.
Change-Id: Icdd6ba2e706b2c791bcf44b6e718c2b7a5eb2218
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
GCC currently requires fat object files for static libraries, since the
linker would otherwise not load the .o file from the archive at all and
the linking would fail with a lot of undefined references. Clang on
Linux also needs this, but it has no equivalent flag, so enabling LTCG
for Clang on static libraries will result in linker error.
This commit does not add support for enabling it in configure. It can be
enabled on a per-project basis by doing CONFIG += ltcg or by passing
-config ltcg to qmake's command-line.
Change-Id: I52cf99f1ed9f1701e23a3b457ba3502fd28126ce
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
If the prefix isn't "m2" for the 2013 namespace, Visual Studio Update 2
won't open the document in the designer view. Even though there is
nothing technically wrong with the way it's currently done, change it to
"m2" to keep VS happy.
Change-Id: I62721114610de5396eb507828b39db89c1e96b1a
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Tweak qmake, add mkspecs for emulator and device, adjust the
manifest template for WP8.1, and add missing icons.
Change-Id: I7a6405fa85297ae4cc8522015274e65fb7a315a6
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
This matches the -ffunction-sections from bootstrap.pro, which tells the
compiler to create a section for each function. The -gc-sections option
tells the linker to drop what wasn't used (normally, it only drops
entire files).
Before (on Linux, built with -O3, no LTO):
text data bss dec hex filename
1746385 7920 3750 1758055 1ad367 bin/moc
1444101 6664 1894 1452659 162a73 bin/rcc
4407725 1568 4896 4414189 435aed bin/qmake
After:
text data bss dec hex filename
1131655 6520 3494 1141669 116ba5 bin/moc
1027043 5480 1766 1034289 fc831 bin/rcc
3578489 1656 5313 3585458 36b5b2 bin/qmake
Gain: 35% on moc, 28% on rcc, 19% on qmake
Before (on OS X):
__TEXT __DATA __OBJC others dec hex
1495040 12288 0 4294993008 4296500336 100176470 bin/moc
1265664 8192 0 4294983904 4296257760 10013b0e0 bin/rcc
5279744 81920 0 4297912320 4303273984 1007ec000 bin/qmake
After:
__TEXT __DATA __OBJC others dec hex
806912 8192 0 4294988132 4295803236 1000cc164 bin/moc
720896 8192 0 4294979764 4295708852 1000b50b4 bin/rcc
4841472 77824 0 4295580688 4300499984 100546c10 bin/qmake
Gain: 46% on moc, 43% on rcc, 8% on qmake.
Change-Id: Icc7cdc9fd6f5db15537b4adabaac7e7a27e539d4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Move it from bootstrap.pro into qt_module.prf so it will apply to any
other bootstrapped libraries, like libQmlDevTools.
Variable called "SPLIT_SECTIONS" because -fdata-sections could be added
in the future, if it proves to be a benefit.
Change-Id: I3fbb004f111620a84e58e9112e9bce3afd95631e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
that is, make it match the shell used by the make command.
this is unlike DIRLIST_SEPARATOR and DIR_SEPARATOR, which always match
the actual system shell.
Change-Id: I0fb277d75b32be029808623a3b77e1358c4e265e
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This allows the developer to provide a list of languages to the manifest
by listing them in WINRT_MANIFEST.languages. It also allows setting the
default language with WINRT_MANIFEST.default_language.
Task-number: QTBUG-38557
Change-Id: I5cb94c9f45146e3068d0833b9e669dc17dca14b2
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
This is the right configuration of the platform within the mkspecs.
It enables the usage of additional features like the automatic
detection of platform specific prf files.
Change-Id: I2f19265d283e47c62455128f217bc44ba88cdc98
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Visual Studio does not like empty dependencies block in manifest XML.
At least my Visual Studio 2013 fails to open visual manifest editor for
XML containing the following block:
<Dependencies>
</Dependencies>
If the block is removed or if the block has one or more PackageDependency
entries the editor accepts it.
Moved the <Dependencies> block to prf, so that it is only written when
project really has dependencies. Also <Capabilities> block is moved to prf
for consistency. On Windows Phone, where the <Capabilities> block is
required, it is kept in the output even if it is empty.
Change-Id: I531180d0081e4612f75be54f3813831857f1ed43
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This patch adds a new config option to qmake to enable full optimization
where it makes sense. This currently is supported on all gcc like
compilers by exchanging -O2 for -O3.
In qtbase it is used to enable full optimizations on qtcore and qtgui
and in a later patch can be used to replace similar existing logic in
QtWebKit's WTF and JavaScriptCore modules.
This fixes a performance regression from gcc 4.7 to 4.8 in the software
renderer.
An aliasing error in qregion.cpp which was exposed by more aggresive
optimization has been solved as well.
Change-Id: Ic2c6c41b79cb3846212b40e7bcc11ff492beb27f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
ARM and x86 platform defines are identical, so they can be kept in a
common file.
Change-Id: I6f79cadb2e5ce265e4a5a7a0806379dc8793e539
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Wolfgang Bremer <wbremer@blackberry.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This comment is wrong and should be removed. The manifest is always
generated.
Change-Id: I281737dd6a358380fb557063eadae88909f5078b
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
This feature (package_manifest) generates a basic application manifest
from a template provided by the mkspec or the developer. It is meant to
deliver an out-of-the-box build experience without attempting to
exhaustively cover all manifest options. It is meant to be a starting
point which allows the developer to customize the manifest further. It
also becomes the default package manifest generator for Windows Phone,
replacing autogen_wmappmanifest.
Common variables, such as the target executable, are populated by qmake
in the newly created manifest. Default icons are also created if needed,
as the build will fail without them. The input manifest can be set by
assigning a file name to WINRT_MANIFEST. Additional options are
documented in the .prf file. If an existing (non-generated) manifest is
already in the directory, it will not be overwritten.
Task-number: QTBUG-35328
Change-Id: I57576a17ff9d2b564c0828f815949cb26d276bfd
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Dwarf-2 is treated as deprecated (at best) by llvm, and does not support
a lot of C++ language features. Most notably, it does not support
namespaces and template parameters. By not specifying the dwarf version,
the compiler can decide which version to use.
Change-Id: Ic32f9101c4db0f06a8ace8f5e04af9236d01598e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit will make qmake use -isystem automatically for any
compilers that declare support for it for any paths that are listed in
QMAKE_DEFAULT_INCDIRS.
Change-Id: I36fefc6d5bba61671f65669f0ea42704b3c3cf31
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
the diff -w for this commit is empty.
Started-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Using wmain causes the problem that the linker seems to create some code
around it, which calls ExitProcess. That function however is forbidden by
the Windows Store Certification process and hence you cannot publish an
application currently. This does not apply to Windows Phone, which links
in such a way that this problem does not occur there.
With WinMain as the entry point this does not happen and also is the
default entry point. Testing locally shows that certification goes fine.
Since it does not pass the full command line string, the C-runtime method
__getmainargs is used instead. This also gives access to any environment
strings which may be passed.
Note that MSDN states that this function should only be used for desktop
applications. For XAML/C++ scenarios there is no entry function at all,
but rather the App object gets instantiated in the default template. But
this only works for XAML itself and not for plain C++ applications,
probably some other entry wrapper is created on the fly here.
Done-with: Andrew Knight <andrew.knight@digia.com>
Change-Id: I8a118eddf6cfeddeca7d676267e979af17123e02
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Those flags are required to pass the Windows Store App Certification
process. Otherwise apps are not allowed to be published.
The SAFESEH option is only required for x86.
According to documentation APPCONTAINER only talks about the
executable, but when running through the certification, the Qt modules
are reported to be errornous as well.
Change-Id: I5450687dcd5bc537149e331332e253c4617df55d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>