From cc1a28d07e0771300403c06a00742b8648d3f70d Mon Sep 17 00:00:00 2001 From: James McDonnell Date: Fri, 18 Mar 2016 11:32:13 -0400 Subject: Add the ability to change precompiled header use Give the Windows configureapp the same -pch/-no-pch arguments found in the Linux configure script. Using command line arguments to enable/disable precompiled header use is preferable to mkspec changes. Make -pch the default for all toolchains. In particular, this makes -pch the default for QNX on Windows. Previously, QNX on Windows had an implied default of -no-pch. Precompiled headers are the default for QNX on Linux; they should also be the default for QNX on Windows. A 'dictionary["PCH"] = "no"' will need to be added in Configure::applySpecSpecifics for any toolchain that should default to -no-pch (none known at this time). -no-pch is implemented by putting a "CONFIG -= precompile_header" in qmodule.pri. This ensures that Qt is built without precompiled headers (as requested) even if allowing precompiled header use is the default for the toolchain. Task-number: QTBUG-52578 Task-number: QTBUG-11545 Change-Id: I1b59bc2d416c5ba169161c5b3cc13accd76eeac8 Reviewed-by: Oswald Buddenhagen --- tools/configure/configureapp.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tools') diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index b599df45e3..6f1e2b7d2d 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -152,6 +152,7 @@ Configure::Configure(int& argc, char** argv) : verbose(0) dictionary[ "GUI" ] = "yes"; dictionary[ "RTTI" ] = "yes"; dictionary[ "STRIP" ] = "yes"; + dictionary[ "PCH" ] = "yes"; dictionary[ "SEPARATE_DEBUG_INFO" ] = "no"; dictionary[ "SSE2" ] = "auto"; dictionary[ "SSE3" ] = "auto"; @@ -859,6 +860,11 @@ void Configure::parseCmdLine() else if (configCmdLine.at(i) == "-no-strip") dictionary[ "STRIP" ] = "no"; + else if (configCmdLine.at(i) == "-pch") + dictionary[ "PCH" ] = "yes"; + else if (configCmdLine.at(i) == "-no-pch") + dictionary[ "PCH" ] = "no"; + else if (configCmdLine.at(i) == "-accessibility") dictionary[ "ACCESSIBILITY" ] = "yes"; else if (configCmdLine.at(i) == "-no-accessibility") { @@ -1941,6 +1947,9 @@ bool Configure::displayHelp() desc( "-L ", "Add an explicit library path."); desc( "-l ", "Add an explicit library name, residing in a librarypath.\n"); + desc("PCH", "no", "-no-pch", "Do not use precompiled header support."); + desc("PCH", "yes", "-pch", "Use precopmiled header support.\n"); + desc( "-help, -h, -?", "Display this information.\n"); // 3rd party stuff options go below here -------------------------------------------------------------------------------- @@ -2748,6 +2757,11 @@ void Configure::generateOutputVars() if (dictionary[ "RELEASE_TOOLS" ] == "yes") qtConfig += "release_tools"; + if (dictionary[ "PCH" ] == "yes") + qmakeConfig += "precompile_header"; + else + qmakeVars += "CONFIG -= precompile_header"; + if (dictionary[ "C++STD" ] == "c++11") qtConfig += "c++11"; else if (dictionary[ "C++STD" ] == "c++14") @@ -3854,6 +3868,7 @@ void Configure::displayConfig() sout << "Force optimized tools......." << dictionary[ "RELEASE_TOOLS" ] << endl; sout << "C++ language standard......." << dictionary[ "C++STD" ] << endl; sout << "Link Time Code Generation..." << dictionary[ "LTCG" ] << endl; + sout << "Using PCH .................." << dictionary[ "PCH" ] << endl; sout << "Accessibility support......." << dictionary[ "ACCESSIBILITY" ] << endl; sout << "RTTI support................" << dictionary[ "RTTI" ] << endl; sout << "SSE2 support................" << dictionary[ "SSE2" ] << endl; -- cgit v1.2.3 From e36f03f97a20494857225a0e77aa5d358f686faf Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Fri, 22 Apr 2016 16:47:55 +0300 Subject: ConfigureApp: fix warning -Wsign-compare. Use size_t as index type for C array. Change-Id: I0980f47ef881108c9639a2a73fbb878b7d8161d2 Reviewed-by: Oswald Buddenhagen --- tools/configure/configureapp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 59b8e4919b..7fd0b984db 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -2125,7 +2125,7 @@ QString Configure::checkAvx512Availability() return QString(); QString available = "avx512f"; - for (int i = 0; i < sizeof(avx512features)/sizeof(avx512features[0]); ++i) { + for (size_t i = 0; i < sizeof(avx512features)/sizeof(avx512features[0]); ++i) { if (tryCompileProject("common/avx512", QStringLiteral("AVX512=%0").arg(avx512features[i]).toUpper())) { available += " avx512"; available += avx512features[i]; -- cgit v1.2.3 From 1880e8432fc6250c538a926c5e12bbb48cf92798 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Mon, 25 Apr 2016 15:07:40 +0200 Subject: Disable Directwrite 2 when Directwrite is disabled While this wouldn't have any consequences in practice, it was perceived as confusing to users that Directwrite 2 was listed as enabled in the summary when Qt was configured with -no-directwrite. To give a better presentation of what will actually be compiled, we force disable Directwrite 2 when Directwrite is disabled. Task-number: QTBUG-52952 Change-Id: I779772ecc4d47b20854588cedde2b097ae22ded4 Reviewed-by: Friedemann Kleint --- tools/configure/configureapp.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 9757e857e5..805db76196 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -2500,7 +2500,9 @@ void Configure::autoDetection() if (dictionary["DIRECTWRITE"] == "auto") dictionary["DIRECTWRITE"] = checkAvailability("DIRECTWRITE") ? "yes" : "no"; - if (dictionary["DIRECTWRITE2"] == "auto") + if (dictionary["DIRECTWRITE"] == "no") + dictionary["DIRECTWRITE2"] = "no"; + else if (dictionary["DIRECTWRITE2"] == "auto") dictionary["DIRECTWRITE2"] = checkAvailability("DIRECTWRITE2") ? "yes" : "no"; // Mark all unknown "auto" to the default value.. -- cgit v1.2.3 From cb320925b9b4c33ffbdac73597bf78db842109c9 Mon Sep 17 00:00:00 2001 From: James McDonnell Date: Fri, 18 Mar 2016 11:56:43 -0400 Subject: Change some QNX defaults Make REDUCE_EXPORTS the default for QNX. This is what the Linux builds use. The Windows builds should too. Turn on ICU detection for QNX. QNX has ICU. Task-number: QTBUG-52578 Change-Id: Ie65c6ff03c4eecf361727b3b6026338f686d9749 Reviewed-by: Dan Cape Reviewed-by: Oswald Buddenhagen --- tools/configure/configureapp.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools') diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 6f1e2b7d2d..3be0ea2b7c 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -1742,6 +1742,7 @@ void Configure::applySpecSpecifics() dictionary["DECORATIONS"] = "default windows styled"; } else if ((platform() == QNX) || (platform() == BLACKBERRY)) { + dictionary[ "REDUCE_EXPORTS" ] = "yes"; dictionary["STACK_PROTECTOR_STRONG"] = "auto"; dictionary["SLOG2"] = "auto"; dictionary["QNX_IMF"] = "auto"; @@ -1751,6 +1752,7 @@ void Configure::applySpecSpecifics() dictionary[ "ANGLE" ] = "no"; dictionary[ "DYNAMICGL" ] = "no"; dictionary[ "FONT_CONFIG" ] = "auto"; + dictionary[ "ICU" ] = "auto"; } else if (platform() == ANDROID) { dictionary[ "REDUCE_EXPORTS" ] = "yes"; dictionary[ "BUILD" ] = "release"; -- cgit v1.2.3 From e6cb3b8c766ea393bb63165e539268986de85687 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Wed, 4 May 2016 15:22:01 +0200 Subject: Android: Force use of system zlib on Windows host While we on Linux will do a compile test to check for a system zlib, the test on a Windows host was less accurate, causing us to compile in the zlib from 3rdparty/ here. This caused compilation errors after updating the freetype font engine to support color fonts, since the zlib in 3rdparty/ was included implicitly in the freetype library, and since it depends on Qt headers, the compilation failed in this context. The hotfix is to force system zlib on Android for Windows hosts, since we know it is available in the NDK. Doing a proper build check is not worth it right now, due to future plans for changing configure. We will still break for an explicit -qt-zlib compilation, so the plan is to fix this in an upcoming commit by separating libpng into a library. Change-Id: I7854c3c762fa37f7ee4b5f1112dbae8b5973ea86 Reviewed-by: BogDan Vatra --- tools/configure/configureapp.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'tools') diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 805db76196..9a4602715b 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -1674,6 +1674,7 @@ void Configure::applySpecSpecifics() dictionary["ANDROID_STYLE_ASSETS"] = "yes"; dictionary[ "STYLE_ANDROID" ] = "yes"; dictionary[ "POLL" ] = "poll"; + dictionary[ "ZLIB" ] = "system"; } } -- cgit v1.2.3 From 566ccd3ca82cecae292c63a1868cf7f256967f1b Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Mon, 9 May 2016 08:50:32 +0200 Subject: QNX: Force use of system zlib on Windows host MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While we on Linux will do a compile test to check for a system zlib, the test on a Windows host was less accurate, causing us to compile in the zlib from 3rdparty/ here. This caused compilation errors after updating the freetype font engine to support color fonts, since the zlib in 3rdparty/ was included implicitly in the freetype library, and since it depends on Qt headers, the compilation failed in this context. The hotfix is to force system zlib on QNX for Windows hosts, since we know it is available in the NDK. Doing a proper build check is not worth it right now, due to future plans for changing configure. We will still break for an explicit -qt-zlib compilation, so the plan is to fix this in an upcoming commit by separating libpng into a library. The hotfix just follows e6cb3b8c. Task-number: QTBUG-53248 Change-Id: I07dd4356fae6397b3cc93fc1fa97bf35380e19df Reviewed-by: Jędrzej Nowacki Reviewed-by: Simon Hausmann --- tools/configure/configureapp.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'tools') diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 5cd1928f65..6c3e20577b 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -1663,6 +1663,7 @@ void Configure::applySpecSpecifics() dictionary[ "FONT_CONFIG" ] = "auto"; dictionary[ "ICU" ] = "auto"; dictionary[ "POLL" ] = "poll"; + dictionary[ "ZLIB" ] = "system"; } else if (platform() == ANDROID) { dictionary[ "REDUCE_EXPORTS" ] = "yes"; dictionary[ "BUILD" ] = "release"; -- cgit v1.2.3