From 397f345a6a2c69c8f15f5d2f21989c303aca586e Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Thu, 25 Aug 2016 06:07:54 -0700 Subject: 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 --- mkspecs/features/qt_functions.prf | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'mkspecs/features/qt_functions.prf') diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index 08c7c9f899..735ece45f2 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -1,10 +1,6 @@ defineReplace(qtPlatformTargetSuffix) { - uikit:CONFIG(simulator, simulator|device): \ - suffix = _$${simulator.sdk} - else: \ - suffix = - + suffix = CONFIG(debug, debug|release) { !debug_and_release|build_pass { mac: return($${suffix}_debug) -- cgit v1.2.3 From 60e5a1c8effd4099f7b1414107b5cbb67c266210 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 25 Aug 2016 15:45:44 +0200 Subject: 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 Change-Id: Id1b518a3aa34044748b87fb8fac14d79653f6b18 Reviewed-by: Lars Knoll Reviewed-by: Oswald Buddenhagen --- mkspecs/features/qt_functions.prf | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'mkspecs/features/qt_functions.prf') diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index 735ece45f2..efbf2fab1d 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -300,10 +300,16 @@ defineTest(prepareRecursiveTarget) { } defineTest(qtConfig) { - contains(QT.global.enabled_features, $$1): \ - return(true) - contains(QT.global.disabled_features, $$1): \ - return(false) - + modules = $$QT $$QT_PRIVATE $$QT_FOR_CONFIG + modules ~= s,-private$,_private,g + modules = $$resolve_depends(modules, "QT.", ".depends") + modules += global global_private + modules = $$reverse(modules) + for (module, modules) { + contains(QT.$${module}.enabled_features, $$1): \ + return(true) + contains(QT.$${module}.disabled_features, $$1): \ + return(false) + } error("Could not find feature $${1}.") } -- cgit v1.2.3