From 611b7c9ce77f1b02fc389583c24fbe7d49cce8a8 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 10 Feb 2017 13:01:08 +0100 Subject: de-duplicate and simplify condition checking in qtConfProcessOneOutput() amends 90eee08b3. Change-Id: If1fa2b14d758cc252d9a2ec3f9deedd1dd200c5e Reviewed-by: Lars Knoll --- mkspecs/features/qt_configure.prf | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'mkspecs/features') diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index 6d78dc9484..aeaf666a5c 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -1739,10 +1739,6 @@ defineTest(qtConfProcessOneOutput) { fpfx = $${currentConfig}.features.$${feature} opfx = $${fpfx}.output.$${2} - condition = $$eval($${opfx}.condition) - !isEmpty(condition):!$$qtConfEvaluate($$condition): \ - return() - call = $$eval($${opfx}.type) isEmpty(call) { # output is just a string, not an object @@ -1751,11 +1747,8 @@ defineTest(qtConfProcessOneOutput) { !defined("qtConfOutput_$$call", test): \ error("Undefined type '$$call' in output '$$2' of feature '$$feature'.") - condition = $$eval($${opfx}.condition) - !isEmpty(condition) { - !$$qtConfEvaluate($$condition): \ - return(false) - } + !$$qtConfEvaluate($$eval($${opfx}.condition)): \ + return() $${opfx}.feature = $$feature qtConfOutput_$${call}($$opfx, $$eval($${fpfx}.available)) -- cgit v1.2.3 From b9c5c7139ea1054f69a1c43ca2cd7212206a41e5 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 21 Feb 2017 17:39:43 +0100 Subject: don't assume that configure --foo options' value is 'yes' otherwise, the invalid "--qpa xcb" would complain about "xcb" being unknown, rather than "--qpa" missing an argument. actual booleans are handled by the type-specific callback, just like -foo would be. Task-number: QTBUG-59062 Change-Id: I96632dacfb721cfcbf223b76f6c5c38c810e8d0e Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_configure.prf | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'mkspecs/features') diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index aeaf666a5c..656a885795 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -125,7 +125,8 @@ defineTest(qtConfValidateValue) { defineTest(qtConfCommandline_string) { opt = $${1} val = $${2} - isEmpty(val): val = $$qtConfGetNextCommandlineArg() + nextok = $${3} + isEmpty(val):$$nextok: val = $$qtConfGetNextCommandlineArg() # Note: Arguments which are variable assignments are legit here. contains(val, "^-.*")|isEmpty(val) { @@ -142,9 +143,10 @@ defineTest(qtConfCommandline_string) { defineTest(qtConfCommandline_optionalString) { opt = $${1} val = $${2} + nextok = $${3} isEmpty(val) { - v = $$qtConfPeekNextCommandlineArg() - contains(v, "^-.*|[A-Z_]+=.*")|isEmpty(v): \ + $$nextok: val = $$qtConfPeekNextCommandlineArg() + contains(val, "^-.*|[A-Z_]+=.*")|isEmpty(val): \ val = "yes" else: \ val = $$qtConfGetNextCommandlineArg() @@ -160,7 +162,8 @@ defineTest(qtConfCommandline_optionalString) { defineTest(qtConfCommandline_addString) { opt = $${1} val = $${2} - isEmpty(val): val = $$qtConfGetNextCommandlineArg() + nextok = $${3} + isEmpty(val):$$nextok: val = $$qtConfGetNextCommandlineArg() # Note: Arguments which are variable assignments are legit here. contains(val, "^-.*")|isEmpty(val) { @@ -236,6 +239,7 @@ defineTest(qtConfParseCommandLine) { } # parse out opt and val + nextok = false contains(c, "^--?enable-(.*)") { opt = $$replace(c, "^--?enable-(.*)", "\\1") val = yes @@ -247,10 +251,11 @@ defineTest(qtConfParseCommandLine) { val = $$replace(c, "^--([^=]+)=(.*)", "\\2") } else: contains(c, "^--(.*)") { opt = $$replace(c, "^--(.*)", "\\1") - val = yes + val = } else: contains(c, "^-(.*)") { opt = $$replace(c, "^-(.*)", "\\1") val = + nextok = true for (cc, allConfigs) { type = $$eval($${cc}.commandline.options.$${opt}) !isEmpty(type): break() @@ -277,6 +282,7 @@ defineTest(qtConfParseCommandLine) { contains(c, $$e) { opt = $$eval($${cc}.commandline.prefix.$${p}) val = $$replace(c, $$e, "\\1") + nextok = true type = "addString" break() } @@ -315,7 +321,7 @@ defineTest(qtConfParseCommandLine) { error("Command line option '$$c' has unknown type '$$type'.") # now that we have opt and value, process it - $${call}($$opt, $$val) + $${call}($$opt, $$val, $$nextok) } } -- cgit v1.2.3 From 840aa67146773d36c98fbdd0c446a1076551efaa Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Thu, 16 Feb 2017 23:44:22 -0800 Subject: Fix Bitcode handling for both makefile and Xcode generators This fixes an issue which caused certain iOS projects to fail to link when building with Xcode, and also fixes an issue where projects were only ever built with -fembed-bitcode instead of -fembed-bitcode-marker for debug builds with the makefile generator. Task-number: QTBUG-58754 Change-Id: Icf0c9f0d64dbc0b38d6c48bf635c5383a78bd6d5 Reviewed-by: Oswald Buddenhagen Reviewed-by: Gabriel de Dietrich --- mkspecs/features/uikit/bitcode.prf | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'mkspecs/features') diff --git a/mkspecs/features/uikit/bitcode.prf b/mkspecs/features/uikit/bitcode.prf index a1dff19eb3..df298171c0 100644 --- a/mkspecs/features/uikit/bitcode.prf +++ b/mkspecs/features/uikit/bitcode.prf @@ -1,7 +1,13 @@ lessThan(QMAKE_XCODE_VERSION, "7.0") { warning("You need to update Xcode to version 7 or newer to support bitcode") -} else { - release:device { +} else: !macx-xcode { + # Simulator builds and all debug builds SHOULD use -fembed-bitcode-marker, + # but unfortunately the -fembed-bitcode and -fembed-bitcode-marker driver + # flags do not work in conjunction with -Xarch, so we'll have to let it use + # the "wrong" flags for now (note that this issue affects only the Makefile + # generator). We also don't want the flags to be passed in Xcode builds, as + # the Xcode ENABLE_BITCODE setting will take care of that for us. + release { QMAKE_CFLAGS += -fembed-bitcode QMAKE_CXXFLAGS += -fembed-bitcode QMAKE_OBJECTIVE_CFLAGS += -fembed-bitcode -- cgit v1.2.3 From c0af8cef2ff67e4883b8491224b30a2c3d1f7b17 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Thu, 16 Feb 2017 22:18:56 -0800 Subject: Don't pass -headerpad_max_install_names when using Bitcode It is ignored (and is unnecessary to begin with) in that case, and emits an annoying warning which this patch silences. Change-Id: I6059969724b203d6e0e2eea81ad3e3e8f8d536d6 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/mac/default_post.prf | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mkspecs/features') diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf index d93c6ed27c..f39e610e88 100644 --- a/mkspecs/features/mac/default_post.prf +++ b/mkspecs/features/mac/default_post.prf @@ -24,6 +24,13 @@ qt { } } +# Don't pass -headerpad_max_install_names when using Bitcode. +# In that case the linker emits a warning stating that the flag is ignored when +# used with bitcode, for reasons that cannot be determined (rdar://problem/20748962). +# Using this flag is also unnecessary in practice on UIKit platforms since they +# are sandboxed, and only UIKit platforms support bitcode to begin with. +!bitcode: QMAKE_LFLAGS += -headerpad_max_install_names + macx-xcode { !isEmpty(QMAKE_XCODE_DEBUG_INFORMATION_FORMAT) { debug_information_format.name = DEBUG_INFORMATION_FORMAT -- cgit v1.2.3 From e7295c959b73cec09e36d3703d5619e8e7aa5fb1 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 16 Dec 2016 12:56:23 -0800 Subject: Add -Wfloat-equal to Qt's header clean check Task-number: QTBUG-57649 Change-Id: I15b62e0f9cec482fbb40fffd1490d802c54bf0fe Reviewed-by: Marc Mutz Reviewed-by: Lars Knoll --- mkspecs/features/qt_module_headers.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mkspecs/features') diff --git a/mkspecs/features/qt_module_headers.prf b/mkspecs/features/qt_module_headers.prf index a0be15c4a0..0e04b46448 100644 --- a/mkspecs/features/qt_module_headers.prf +++ b/mkspecs/features/qt_module_headers.prf @@ -182,7 +182,7 @@ headersclean:!internal_module { # Turn on some extra warnings not found in -Wall -Wextra. # Common to GCC, Clang and ICC (and other compilers that masquerade as GCC): hcleanFLAGS = -Wall -Wextra -Werror \ - -Woverloaded-virtual -Wshadow -Wundef \ + -Woverloaded-virtual -Wshadow -Wundef -Wfloat-equal \ -Wnon-virtual-dtor -Wpointer-arith -Wformat-security \ -Wno-long-long -Wno-variadic-macros -pedantic-errors -- cgit v1.2.3