summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/qt_module.prf
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2017-01-27 11:34:17 -0800
committerJake Petroules <jake.petroules@qt.io>2017-01-27 22:10:01 +0000
commit944110089d4cb1c229dba422989e154db65a67fd (patch)
treeecce07d29d0fb768700b5b6cb1d9c49040983584 /mkspecs/features/qt_module.prf
parentaf7cefd2725a4afb41700cb5568bd99710ebad5d (diff)
Build Qt libraries with -fapplication-extension
This ensures at compile-time that Qt libraries do not use any APIs that are not safe for use in application extensions, and fixes warning messages that appear when linking to Qt libraries that are not built with this flag, when used in an application extension. This is especially important on watchOS where *all* "applications" are actually application extensions, and on other Apple platforms if application extensions are developed using Qt. Task-number: QTBUG-40101 Change-Id: I022046f2584e0222253d33052b0abc221d7c93d6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'mkspecs/features/qt_module.prf')
-rw-r--r--mkspecs/features/qt_module.prf3
1 files changed, 3 insertions, 0 deletions
diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
index 23d75182d0..7ba81c93b1 100644
--- a/mkspecs/features/qt_module.prf
+++ b/mkspecs/features/qt_module.prf
@@ -46,6 +46,9 @@ CONFIG(shared, static|shared):qtConfig(framework): \
CONFIG += relative_qt_rpath # Qt libraries should be relocatable
+# Qt libraries should only use Application Extension safe APIs
+darwin:!no_app_extension_api_only: CONFIG += app_extension_api_only
+
ucmodule = $$upper($$MODULE)
isEmpty(MODULE_INCNAME): MODULE_INCNAME = $$TARGET