summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/android-clang/qmake.conf2
-rw-r--r--mkspecs/android-g++/qmake.conf1
-rw-r--r--mkspecs/common/android-base-head.conf8
-rw-r--r--mkspecs/common/android-base-tail.conf4
-rw-r--r--mkspecs/common/msvc-desktop.conf2
-rw-r--r--mkspecs/devices/common/linux_device_pre.conf4
-rw-r--r--mkspecs/features/android/android_deployment_settings.prf26
-rw-r--r--mkspecs/features/ctest_testcase_common.prf3
-rw-r--r--mkspecs/features/data/configure.json10
-rwxr-xr-xmkspecs/features/data/mac/objc_namespace.sh2
-rw-r--r--mkspecs/features/mac/default_post.prf7
-rw-r--r--mkspecs/features/qmake_use.prf1
-rw-r--r--mkspecs/features/qml1_module.prf13
-rw-r--r--mkspecs/features/qml1_plugin.prf13
-rw-r--r--mkspecs/features/qml_module.prf12
-rw-r--r--mkspecs/features/qml_plugin.prf25
-rw-r--r--mkspecs/features/qt_configure.prf199
-rw-r--r--mkspecs/features/qt_helper_lib.prf19
-rw-r--r--mkspecs/features/toolchain.prf4
-rw-r--r--mkspecs/features/wasm/qt.prf12
-rw-r--r--mkspecs/features/wasm/wasm.prf4
-rw-r--r--mkspecs/features/winrt/package_manifest.prf29
-rw-r--r--mkspecs/integrity-armv7-imx6/qmake.conf1
-rw-r--r--mkspecs/integrity-armv7/qmake.conf2
-rw-r--r--mkspecs/integrity-armv8-rcar/qmake.conf1
-rw-r--r--mkspecs/integrity-x86/qmake.conf2
-rw-r--r--mkspecs/macx-xcode/default.xcscheme1
-rw-r--r--mkspecs/wasm-emscripten/qmake.conf20
-rw-r--r--mkspecs/win32-arm64-msvc2017/qmake.conf15
-rw-r--r--mkspecs/win32-arm64-msvc2017/qplatformdefs.h40
30 files changed, 290 insertions, 192 deletions
diff --git a/mkspecs/android-clang/qmake.conf b/mkspecs/android-clang/qmake.conf
index 1f5e690329..a0a369bb44 100644
--- a/mkspecs/android-clang/qmake.conf
+++ b/mkspecs/android-clang/qmake.conf
@@ -41,6 +41,8 @@ ANDROID_SOURCES_CXX_STL_LIBDIR = $$NDK_ROOT/sources/cxx-stl/llvm-libc++/libs/$$A
ANDROID_STDCPP_PATH = $$ANDROID_SOURCES_CXX_STL_LIBDIR/libc++_shared.so
+ANDROID_USE_LLVM = true
+
exists($$ANDROID_SOURCES_CXX_STL_LIBDIR/libc++.so): \
ANDROID_CXX_STL_LIBS = -lc++
else: \
diff --git a/mkspecs/android-g++/qmake.conf b/mkspecs/android-g++/qmake.conf
index e72c802405..0cb3558f96 100644
--- a/mkspecs/android-g++/qmake.conf
+++ b/mkspecs/android-g++/qmake.conf
@@ -16,6 +16,7 @@ QMAKE_LINK = $$QMAKE_CXX
ANDROID_SOURCES_CXX_STL_LIBDIR = $$NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$$NDK_TOOLCHAIN_VERSION/libs/$$ANDROID_TARGET_ARCH
ANDROID_STDCPP_PATH = $$ANDROID_SOURCES_CXX_STL_LIBDIR/libgnustl_shared.so
ANDROID_CXX_STL_LIBS = -lgnustl_shared -lgcc
+ANDROID_USE_LLVM = false
exists($$NDK_ROOT/sysroot/usr/include): \
QMAKE_CFLAGS += --sysroot=$$NDK_ROOT/sysroot \
diff --git a/mkspecs/common/android-base-head.conf b/mkspecs/common/android-base-head.conf
index c7c27298b9..a43fc7f23e 100644
--- a/mkspecs/common/android-base-head.conf
+++ b/mkspecs/common/android-base-head.conf
@@ -4,9 +4,7 @@ load(device_config)
isEmpty(DEFAULT_ANDROID_NDK_ROOT): return()
NDK_ROOT = $$(ANDROID_NDK_ROOT)
-!exists($$NDK_ROOT) {
- NDK_ROOT = $$DEFAULT_ANDROID_NDK_ROOT
-}
+isEmpty(NDK_ROOT): NDK_ROOT = $$DEFAULT_ANDROID_NDK_ROOT
NDK_HOST = $$(ANDROID_NDK_HOST)
isEmpty(NDK_HOST): NDK_HOST = $$DEFAULT_ANDROID_NDK_HOST
@@ -69,10 +67,6 @@ CONFIG += $$ANDROID_PLATFORM
QMAKE_CFLAGS = -D__ANDROID_API__=$$replace(ANDROID_PLATFORM, "android-", "")
ANDROID_PLATFORM_ROOT_PATH = $$NDK_ROOT/platforms/$$ANDROID_PLATFORM/arch-$$ANDROID_ARCHITECTURE/
-ANDROID_PLATFORM_PATH = $$ANDROID_PLATFORM_ROOT_PATH/usr
-
-equals(ANDROID_TARGET_ARCH, x86_64)|equals(ANDROID_TARGET_ARCH, mips64): \
- QMAKE_ANDROID_PLATFORM_LIBDIR = $${QMAKE_ANDROID_PLATFORM_LIBDIR}64
CROSS_COMPILE = $$NDK_TOOLCHAIN_PATH/bin/$$NDK_TOOLS_PREFIX-
diff --git a/mkspecs/common/android-base-tail.conf b/mkspecs/common/android-base-tail.conf
index e239fa01c5..f403ef9330 100644
--- a/mkspecs/common/android-base-tail.conf
+++ b/mkspecs/common/android-base-tail.conf
@@ -69,7 +69,6 @@ QMAKE_LIBDIR_OPENGL =
QMAKE_LINK_SHLIB = $$QMAKE_LINK
QMAKE_LFLAGS = --sysroot=$$ANDROID_PLATFORM_ROOT_PATH
-QMAKE_RPATHLINK = $$QMAKE_ANDROID_PLATFORM_LIBDIR
QMAKE_LFLAGS_APP = -Wl,--no-undefined -Wl,-z,noexecstack -shared
QMAKE_LFLAGS_SHLIB = -Wl,--no-undefined -Wl,-z,noexecstack -shared
QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
@@ -88,6 +87,3 @@ QMAKE_LIBS_OPENGL_ES2 = -lGLESv2
!exists($$NDK_ROOT): error("You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.")
load(qt_config)
-
-QMAKE_DEFAULT_LIBDIRS = $$QMAKE_LIBDIR
-QMAKE_DEFAULT_INCDIRS = $$QMAKE_INCDIR
diff --git a/mkspecs/common/msvc-desktop.conf b/mkspecs/common/msvc-desktop.conf
index a4fadeb029..c0d4bd2acc 100644
--- a/mkspecs/common/msvc-desktop.conf
+++ b/mkspecs/common/msvc-desktop.conf
@@ -106,7 +106,7 @@ QMAKE_LIBS_OPENGL_ES2_DEBUG = gdi32.lib user32.lib
QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib ws2_32.lib
QMAKE_LIBS_QT_ENTRY = -lqtmain
-QMAKE_IDL = midl /NOLOGO
+QMAKE_IDL = midl
QMAKE_LIB = lib /NOLOGO
QMAKE_RC = rc /NOLOGO
diff --git a/mkspecs/devices/common/linux_device_pre.conf b/mkspecs/devices/common/linux_device_pre.conf
index 8c6c87d0b7..5b6a9bfcfa 100644
--- a/mkspecs/devices/common/linux_device_pre.conf
+++ b/mkspecs/devices/common/linux_device_pre.conf
@@ -24,5 +24,9 @@ QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy
QMAKE_NM = $${CROSS_COMPILE}nm -P
QMAKE_STRIP = $${CROSS_COMPILE}strip
+# modifications to gcc-base.conf
+QMAKE_AR_LTCG = $${CROSS_COMPILE}gcc-ar cqs
+QMAKE_NM_LTCG = $${CROSS_COMPILE}gcc-nm -P
+
contains(DISTRO_OPTS, deb-multi-arch): \
QMAKE_PKG_CONFIG = $${CROSS_COMPILE}pkg-config
diff --git a/mkspecs/features/android/android_deployment_settings.prf b/mkspecs/features/android/android_deployment_settings.prf
index e6b2431f9a..0db3230ce7 100644
--- a/mkspecs/features/android/android_deployment_settings.prf
+++ b/mkspecs/features/android/android_deployment_settings.prf
@@ -17,17 +17,22 @@ contains(TEMPLATE, ".*app"):!build_pass:!android-embedded {
isEmpty(NDK_ROOT): NDK_ROOT = $$DEFAULT_ANDROID_NDK_ROOT
FILE_CONTENT += " \"ndk\": $$emitString($$NDK_ROOT),"
- NDK_TOOLCHAIN_PREFIX = $$(ANDROID_NDK_TOOLCHAIN_PREFIX)
- isEmpty(NDK_TOOLCHAIN_PREFIX) {
- equals(ANDROID_TARGET_ARCH, x86): NDK_TOOLCHAIN_PREFIX = x86
- else: equals(ANDROID_TARGET_ARCH, x86_64): NDK_TOOLCHAIN_PREFIX = x86_64
- else: equals(ANDROID_TARGET_ARCH, mips): NDK_TOOLCHAIN_PREFIX = mipsel-linux-android
- else: equals(ANDROID_TARGET_ARCH, mips64): NDK_TOOLCHAIN_PREFIX = mips64el-linux-android
- else: equals(ANDROID_TARGET_ARCH, arm64-v8a): NDK_TOOLCHAIN_PREFIX = aarch64-linux-android
- else: NDK_TOOLCHAIN_PREFIX = arm-linux-androideabi
+ equals(ANDROID_USE_LLVM, true) {
+ FILE_CONTENT += " \"toolchain-prefix\": \"llvm\","
+ FILE_CONTENT += " \"tool-prefix\": \"llvm\","
+ } else {
+ NDK_TOOLCHAIN_PREFIX = $$(ANDROID_NDK_TOOLCHAIN_PREFIX)
+ isEmpty(NDK_TOOLCHAIN_PREFIX) {
+ equals(ANDROID_TARGET_ARCH, x86): NDK_TOOLCHAIN_PREFIX = x86
+ else: equals(ANDROID_TARGET_ARCH, x86_64): NDK_TOOLCHAIN_PREFIX = x86_64
+ else: equals(ANDROID_TARGET_ARCH, mips): NDK_TOOLCHAIN_PREFIX = mipsel-linux-android
+ else: equals(ANDROID_TARGET_ARCH, mips64): NDK_TOOLCHAIN_PREFIX = mips64el-linux-android
+ else: equals(ANDROID_TARGET_ARCH, arm64-v8a): NDK_TOOLCHAIN_PREFIX = aarch64-linux-android
+ else: NDK_TOOLCHAIN_PREFIX = arm-linux-androideabi
+ }
+ FILE_CONTENT += " \"toolchain-prefix\": $$emitString($$NDK_TOOLCHAIN_PREFIX),"
+ FILE_CONTENT += " \"tool-prefix\": $$emitString($$NDK_TOOLS_PREFIX),"
}
- FILE_CONTENT += " \"toolchain-prefix\": $$emitString($$NDK_TOOLCHAIN_PREFIX),"
- FILE_CONTENT += " \"tool-prefix\": $$emitString($$NDK_TOOLS_PREFIX),"
NDK_TOOLCHAIN_VERSION = $$(ANDROID_NDK_TOOLCHAIN_VERSION)
isEmpty(NDK_TOOLCHAIN_VERSION): NDK_TOOLCHAIN_VERSION = $$DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION
@@ -63,6 +68,7 @@ contains(TEMPLATE, ".*app"):!build_pass:!android-embedded {
QML_ROOT_PATH = $$_PRO_FILE_PWD_
FILE_CONTENT += " \"qml-root-path\": $$emitString($$QML_ROOT_PATH),"
FILE_CONTENT += " \"stdcpp-path\": $$emitString($$ANDROID_STDCPP_PATH),"
+ FILE_CONTENT += " \"useLLVM\": $$ANDROID_USE_LLVM,"
FILE_CONTENT += " \"application-binary\": $$emitString($$absolute_path($$DESTDIR, $$OUT_PWD)/$$TARGET)"
FILE_CONTENT += "}"
diff --git a/mkspecs/features/ctest_testcase_common.prf b/mkspecs/features/ctest_testcase_common.prf
index 63e31f5415..ea90bf89cd 100644
--- a/mkspecs/features/ctest_testcase_common.prf
+++ b/mkspecs/features/ctest_testcase_common.prf
@@ -65,7 +65,8 @@ for (MODULE_UNDER_TEST, CMAKE_QT_MODULES_UNDER_TEST) {
CMAKE_MODULES_UNDER_TEST = $$join(CMAKE_MODULES_UNDER_TEST, ;)
check.commands = \
- $(MKDIR) $$BUILD_DIR && $$QMAKE_CD $$BUILD_DIR && \
+ $$sprintf($$QMAKE_MKDIR_CMD, $$BUILD_DIR) $$escape_expand(\\n\\t) \
+ $$QMAKE_CD $$BUILD_DIR && \
cmake $$CMAKE_TEST_LOCATION $$CMAKE_GENERATOR \
-DCMAKE_C_COMPILER=$$QMAKE_CC \
-DCMAKE_CXX_COMPILER=$$QMAKE_CXX \
diff --git a/mkspecs/features/data/configure.json b/mkspecs/features/data/configure.json
index 167c502e82..faa89231a0 100644
--- a/mkspecs/features/data/configure.json
+++ b/mkspecs/features/data/configure.json
@@ -17,5 +17,15 @@
"list-features": "void",
"list-libraries": "void"
}
+ },
+
+ "testTypeDependencies": {
+ "library": [ "library-paths" ]
+ },
+
+ "features": {
+ "library-paths": {
+ "output": [ "libraryPaths" ]
+ }
}
}
diff --git a/mkspecs/features/data/mac/objc_namespace.sh b/mkspecs/features/data/mac/objc_namespace.sh
index 6ac004fe2d..ceff2df324 100755
--- a/mkspecs/features/data/mac/objc_namespace.sh
+++ b/mkspecs/features/data/mac/objc_namespace.sh
@@ -146,7 +146,7 @@ inspect_binary() {
echo "found namespaced class names, updating class entries..."
fi
- classes=$(otool -o "$target" | grep class_ro_t)
+ classes=$(otool -o -v "$target" | grep class_ro_t)
while read -a class; do
address="$(sanitize_address ${class[1]})"
diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf
index 99f68b78f5..c01e99fe8e 100644
--- a/mkspecs/features/mac/default_post.prf
+++ b/mkspecs/features/mac/default_post.prf
@@ -259,3 +259,10 @@ isEmpty(xcode_product_bundle_target): \
xcode_product_bundle_target = ${PRODUCT_NAME:rfc1034identifier}
xcode_product_bundle_identifier_setting.value = "$${xcode_product_bundle_identifier_setting.value}.$${xcode_product_bundle_target}"
QMAKE_MAC_XCODE_SETTINGS += xcode_product_bundle_identifier_setting
+
+!macx-xcode {
+ generate_xcode_project.commands = @$(QMAKE) -spec macx-xcode $(EXPORT__PRO_FILE_)
+ generate_xcode_project.target = xcodeproj
+ QMAKE_EXTRA_VARIABLES += _PRO_FILE_
+ QMAKE_EXTRA_TARGETS += generate_xcode_project
+}
diff --git a/mkspecs/features/qmake_use.prf b/mkspecs/features/qmake_use.prf
index f81d1cece4..dba45de92a 100644
--- a/mkspecs/features/qmake_use.prf
+++ b/mkspecs/features/qmake_use.prf
@@ -9,7 +9,6 @@ for(ever) {
error("Library '$$name' is not defined.")
!contains(use, nolink) {
- QMAKE_LIBDIR += $$eval(QMAKE_LIBDIR_$$nu)
debug: \
LIBS$${suffix} += $$eval(QMAKE_LIBS_$${nu}_DEBUG) $$eval(QMAKE_LIBS_$$nu)
else: \
diff --git a/mkspecs/features/qml1_module.prf b/mkspecs/features/qml1_module.prf
deleted file mode 100644
index 33c3e44808..0000000000
--- a/mkspecs/features/qml1_module.prf
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# W A R N I N G
-# -------------
-#
-# This file is not part of the Qt API. It exists purely as an
-# implementation detail. It may change from version to version
-# without notice, or even be removed.
-#
-# We mean it.
-#
-
-CONFIG += qml1_target
-load(qml_module)
diff --git a/mkspecs/features/qml1_plugin.prf b/mkspecs/features/qml1_plugin.prf
deleted file mode 100644
index cb1f0ce267..0000000000
--- a/mkspecs/features/qml1_plugin.prf
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# W A R N I N G
-# -------------
-#
-# This file is not part of the Qt API. It exists purely as an
-# implementation detail. It may change from version to version
-# without notice, or even be removed.
-#
-# We mean it.
-#
-
-CONFIG += qml1_target
-load(qml_plugin)
diff --git a/mkspecs/features/qml_module.prf b/mkspecs/features/qml_module.prf
index 65212b2abf..bd84ce597a 100644
--- a/mkspecs/features/qml_module.prf
+++ b/mkspecs/features/qml_module.prf
@@ -23,15 +23,9 @@ for(qmlf, AUX_QML_FILES): fq_aux_qml_files += $$absolute_path($$qmlf, $$_PRO_FIL
load(qt_build_paths)
-qml1_target {
- DESTDIR = $$MODULE_BASE_OUTDIR/imports/$$TARGETPATH
- instbase = $$[QT_INSTALL_IMPORTS]
-} else {
- DESTDIR = $$MODULE_BASE_OUTDIR/qml/$$TARGETPATH
- instbase = $$[QT_INSTALL_QML]
-}
+DESTDIR = $$MODULE_BASE_OUTDIR/qml/$$TARGETPATH
-!qml1_target:static: \
+static: \
CONFIG += builtin_resources
else: \
CONFIG += install_qml_files
@@ -52,7 +46,7 @@ qmldir.base = $$_PRO_FILE_PWD_
# Tools need qmldir and plugins.qmltypes always installed on the file system
qmldir.files = $$qmldir_file $$fq_aux_qml_files
install_qml_files: qmldir.files += $$fq_qml_files
-qmldir.path = $$instbase/$$TARGETPATH
+qmldir.path = $$[QT_INSTALL_QML]/$$TARGETPATH
INSTALLS += qmldir
!debug_and_release|!build_all|CONFIG(release, debug|release) {
diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf
index cd6377dcc6..ad8ecdf5f1 100644
--- a/mkspecs/features/qml_plugin.prf
+++ b/mkspecs/features/qml_plugin.prf
@@ -48,15 +48,9 @@ exists($$QMLTYPEFILE): AUX_QML_FILES += $$QMLTYPEFILE
load(qt_build_paths)
-qml1_target {
- DESTDIR = $$MODULE_BASE_OUTDIR/imports/$$TARGETPATH
- instbase = $$[QT_INSTALL_IMPORTS]
-} else {
- DESTDIR = $$MODULE_BASE_OUTDIR/qml/$$TARGETPATH
- instbase = $$[QT_INSTALL_QML]
-}
+DESTDIR = $$MODULE_BASE_OUTDIR/qml/$$TARGETPATH
-target.path = $$instbase/$$TARGETPATH
+target.path = $$[QT_INSTALL_QML]/$$TARGETPATH
INSTALLS += target
# Some final setup
@@ -75,20 +69,11 @@ load(qt_common)
# directory. Then review and commit the changes made to plugins.qmltypes.
#
!cross_compile {
- qml1_target {
- qmlplugindump = qml1plugindump
- importpath.name = QML_IMPORT_PATH
- } else {
- qmlplugindump = qmlplugindump
- importpath.name = QML2_IMPORT_PATH
- }
+ qmlplugindump = qmlplugindump
+ importpath.name = QML2_IMPORT_PATH
importpath.value =
for(qmod, QTREPOS) {
- qml1_target: \
- qmod = $$qmod/imports
- else: \
- qmod = $$qmod/qml
- exists($$qmod): importpath.value += $$shell_path($$qmod)
+ exists($$qmod/qml): importpath.value += $$shell_path($$qmod/qml)
}
importpath.value = $$unique(importpath.value)
QT_TOOL_ENV = importpath
diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf
index 81b820978a..44d8a3e639 100644
--- a/mkspecs/features/qt_configure.prf
+++ b/mkspecs/features/qt_configure.prf
@@ -365,9 +365,13 @@ defineTest(qtConfTest_linkerSupportsFlag) {
}
defineReplace(qtConfFindInPathList) {
+ # This nesting is consistent with Apple ld -search_paths_first,
+ # and presumably with GNU ld (no actual documentation found).
for (dir, 2) {
- exists("$$dir/$${1}"): \
- return("$$dir/$${1}")
+ for (file, 1) {
+ exists("$$dir/$$file"): \
+ return("$$dir/$$file")
+ }
}
return()
}
@@ -488,6 +492,110 @@ defineTest(qtConfSetupLibraries) {
}
}
+# libs-var, libs, in-paths, out-paths-var
+defineTest(qtConfResolveLibs) {
+ ret = true
+ paths = $$3
+ out =
+ copy = false
+ for (l, 2) {
+ $$copy {
+ copy = false
+ out += $$l
+ } else: equals(l, "-s") {
+ # em++ flag to link libraries from emscripten-ports; passed on literally.
+ copy = true
+ out += $$l
+ } else: contains(l, "^-L.*") {
+ lp = $$replace(l, "^-L", )
+ !exists($$lp/.) {
+ qtLog("Library path $$val_escape(lp) is invalid.")
+ ret = false
+ } else {
+ paths += $$lp
+ }
+ } else: contains(l, "^-l.*") {
+ lib = $$replace(l, "^-l", )
+ lcan =
+ unix {
+ # Under UNIX, we look for actual shared libraries, in addition
+ # to static ones.
+ lcan += \
+ $${QMAKE_PREFIX_SHLIB}$${lib}.$${QMAKE_EXTENSION_SHLIB} \
+ $${QMAKE_PREFIX_STATICLIB}$${lib}.$${QMAKE_EXTENSION_STATICLIB}
+ } else {
+ # Under Windows, we look only for static libraries, as even for DLLs
+ # one actually links against a static import library.
+ mingw {
+ lcan += \
+ # MinGW supports UNIX-style library naming in addition to
+ # the MSVC style.
+ lib$${lib}.dll.a lib$${lib}.a \
+ # Fun fact: prefix-less libraries are also supported.
+ $${lib}.dll.a $${lib}.a
+ }
+ lcan += $${lib}.lib
+ }
+ l = $$qtConfFindInPathList($$lcan, $$paths $$EXTRA_LIBDIR $$QMAKE_DEFAULT_LIBDIRS)
+ isEmpty(l) {
+ qtLog("None of [$$val_escape(lcan)] found in [$$val_escape(paths)] and global paths.")
+ ret = false
+ } else {
+ out += $$l
+ }
+ } else {
+ out += $$l
+ }
+ }
+ $$1 = $$out
+ export($$1)
+ !isEmpty(4) {
+ $$4 = $$paths
+ export($$4)
+ }
+ return($$ret)
+}
+
+# source-var
+defineTest(qtConfResolveAllLibs) {
+ ret = true
+ !qtConfResolveLibs($${1}.libs, $$eval($${1}.libs), , $${1}.libdirs): \
+ ret = false
+ for (b, $${1}.builds._KEYS_): \
+ !qtConfResolveLibs($${1}.builds.$${b}, $$eval($${1}.builds.$${b}), $$eval($${1}.libdirs), ): \
+ ret = false
+ return($$ret)
+}
+
+# libs-var, in-paths, libs
+defineTest(qtConfResolvePathLibs) {
+ ret = true
+ for (libdir, 2) {
+ !exists($$libdir/.) {
+ qtLog("Library path $$val_escape(libdir) is invalid.")
+ ret = false
+ }
+ }
+ !qtConfResolveLibs($$1, $$3, $$2): \
+ ret = false
+ return($$ret)
+}
+
+# includes-var, includes
+defineTest(qtConfResolvePathIncs) {
+ ret = true
+ for (incdir, 2) {
+ !exists($$incdir/.) {
+ qtLog("Include path $$val_escape(incdir) is invalid.")
+ ret = false
+ }
+ }
+ 2 -= $$QMAKE_DEFAULT_INCDIRS
+ $$1 = $$2
+ export($$1)
+ return($$ret)
+}
+
# the library is specified inline in a 'libs' field.
# overrides from the command line are accepted.
defineTest(qtConfLibrary_inline) {
@@ -517,7 +625,6 @@ defineTest(qtConfLibrary_inline) {
vars += $$eval(config.commandline.rev_assignments.$${iv})
defined(config.input.$${iv}, var) {
eval($${1}.builds.$${b} = $$eval(config.input.$${iv}))
- export($${1}.builds.$${b})
$${1}.builds._KEYS_ *= $${b}
any = true
} else {
@@ -532,35 +639,30 @@ defineTest(qtConfLibrary_inline) {
export($${1}.builds._KEYS_)
# we also reset the generic libs, to avoid surprises.
$${1}.libs =
- export($${1}.libs)
}
# direct libs. overwrites inline libs.
- defined(config.input.$${input}.libs, var) {
+ defined(config.input.$${input}.libs, var): \
eval($${1}.libs = $$eval(config.input.$${input}.libs))
- export($${1}.libs)
- }
+
+ includes = $$eval(config.input.$${input}.incdir)
# prefix. prepends to (possibly overwritten) inline libs.
prefix = $$eval(config.input.$${input}.prefix)
!isEmpty(prefix) {
- $${1}.includedir = $$prefix/include
- export($${1}.includedir)
+ includes += $$prefix/include
$${1}.libs = -L$$prefix/lib $$eval($${1}.libs)
- export($${1}.libs)
- }
-
- incdir = $$eval(config.input.$${input}.incdir)
- !isEmpty(incdir) {
- $${1}.includedir = $$incdir
- export($${1}.includedir)
}
libdir = $$eval(config.input.$${input}.libdir)
- !isEmpty(libdir) {
+ !isEmpty(libdir): \
$${1}.libs = -L$$libdir $$eval($${1}.libs)
- export($${1}.libs)
- }
+
+ !qtConfResolveAllLibs($$1): \
+ return(false)
+
+ !qtConfResolvePathIncs($${1}.includedir, $$includes): \
+ return(false)
return(true)
}
@@ -572,17 +674,13 @@ defineTest(qtConfLibrary_makeSpec) {
isEmpty(spec): \
error("makeSpec source in library '$$eval($${1}.library)' does not specify 'spec'.")
- $${1}.includedir = $$eval(QMAKE_INCDIR_$$spec)
- export($${1}.includedir)
- $${1}.libs =
- for (l, QMAKE_LIBDIR_$$spec): \
- $${1}.libs += -L$$l
- $${1}.libs += $$eval(QMAKE_LIBS_$$spec)
- export($${1}.libs)
+ !qtConfResolvePathLibs($${1}.libs, $$eval(QMAKE_LIBDIR_$$spec), $$eval(QMAKE_LIBS_$$spec)): \
+ return(false)
+
+ !qtConfResolvePathIncs($${1}.includedir, $$eval(QMAKE_INCDIR_$$spec)): \
+ return(false)
- # the library definition is always in scope, so no point in exporting it.
- $${1}.export = false
- export($${1}.export)
+ # note that the object is re-exported, because we resolve the libraries.
return(true)
}
@@ -602,13 +700,15 @@ defineTest(qtConfLibrary_pkgConfig) {
}
qtRunLoggedCommand("$$pkg_config --modversion $$args", version)|return(false)
- qtRunLoggedCommand("$$pkg_config --libs-only-L $$args", libpaths)|return(false)
- qtRunLoggedCommand("$$pkg_config --libs-only-l $$args", libs)|return(false)
version ~= s/[^0-9.].*$//
$${1}.version = $$first(version)
export($${1}.version)
- eval($${1}.libs = $$libpaths $$libs)
- export($${1}.libs)
+
+ qtRunLoggedCommand("$$pkg_config --libs-only-L $$args", libpaths)|return(false)
+ qtRunLoggedCommand("$$pkg_config --libs-only-l $$args", libs)|return(false)
+ eval(libs = $$libpaths $$libs)
+ !qtConfResolveLibs($${1}.libs, $$libs): \
+ return(false)
qtRunLoggedCommand("$$pkg_config --cflags $$args", $${1}.cflags)|return(false)
# Split CFLAGS into stuff that goes into DEFINES, INCLUDEPATH, and other stuff.
@@ -633,10 +733,11 @@ defineTest(qtConfLibrary_pkgConfig) {
}
!isEmpty(ignored): \
qtLog("Note: Dropped compiler flags '$$ignored'.")
+ !qtConfResolvePathIncs($${1}.includedir, $$includes): \
+ return(false)
$${1}.defines = $$defines
export($${1}.defines)
- $${1}.includedir = $$includes
- export($${1}.includedir)
+
return(true)
}
@@ -1156,7 +1257,7 @@ defineTest(qtConfSetupTestTypeDeps) {
}
}
-defineTest(qtConfEnsureTestTypeDeps) {
+defineTest(qtConfEnsureTestTypeDepsOne) {
depsn = $${currentConfig}.testTypeDependencies.$${1}._KEYS_
!isEmpty($$depsn) {
for (dep, $$depsn) {
@@ -1170,12 +1271,18 @@ defineTest(qtConfEnsureTestTypeDeps) {
fwdsn = $${currentConfig}.testTypeForwards.$${1}
!isEmpty($$fwdsn) {
for (fwd, $$fwdsn): \
- qtConfEnsureTestTypeDeps($$fwd)
+ qtConfEnsureTestTypeDepsOne($$fwd)
$$fwdsn =
export($$fwdsn)
}
}
+defineTest(qtConfEnsureTestTypeDeps) {
+ qtConfEnsureTestTypeDepsOne($$1)
+ currentConfig = config.builtins
+ qtConfEnsureTestTypeDepsOne($$1)
+}
+
defineTest(qtRunSingleTest) {
tpfx = $${currentConfig}.tests.$${1}
defined($${tpfx}.result, var): \
@@ -1660,6 +1767,11 @@ defineTest(qtConfCheckErrors) {
# output generation
#
+defineTest(qtConfOutput_libraryPaths) {
+ qtLog("Global lib dirs: [$$val_escape(EXTRA_LIBDIR)] [$$val_escape(QMAKE_DEFAULT_LIBDIRS)]")
+ qtLog("Global inc dirs: [$$val_escape(EXTRA_INCLUDEPATH)] [$$val_escape(QMAKE_DEFAULT_INCDIRS)]")
+}
+
# qtConfOutputVar(modifier, output, name, value)
defineTest(qtConfOutputVar) {
modifier = $$1
@@ -2028,6 +2140,9 @@ for(ever) {
}
configsToProcess = $$subconfigs $$configsToProcess
}
+# 'builtins' is used for command line parsing and test type dependency
+# injection, but its features must not be processed regularly.
+allModuleConfigs = $$member(allConfigs, 1, -1)
QMAKE_SAVED_ARGS = $$QMAKE_EXTRA_ARGS
QMAKE_REDO_CONFIG = false
@@ -2036,7 +2151,7 @@ qtConfCheckErrors()
!isEmpty(config.input.list-features) {
all_ft =
- for (currentConfig, allConfigs) {
+ for (currentConfig, allModuleConfigs) {
for (k, $${currentConfig}.features._KEYS_) {
pp = $$eval($${currentConfig}.features.$${k}.purpose)
!isEmpty(pp) {
@@ -2056,7 +2171,7 @@ qtConfCheckErrors()
!isEmpty(config.input.list-libraries) {
logn()
- for (currentConfig, allConfigs) {
+ for (currentConfig, allModuleConfigs) {
!isEmpty($${currentConfig}.exports._KEYS_) {
!isEmpty($${currentConfig}.module): \
logn($$eval($${currentConfig}.module):)
@@ -2093,7 +2208,7 @@ qtLog("Command line: $$qtSystemQuote($$QMAKE_SAVED_ARGS)")
$$QMAKE_REDO_CONFIG: \
qtLog("config.opt: $$qtSystemQuote($$QMAKE_EXTRA_REDO_ARGS)")
-for (currentConfig, allConfigs) {
+for (currentConfig, allModuleConfigs) {
qtConfSetModuleName()
qtConfSetupModuleOutputs()
# do early checks, mainly to validate the command line
@@ -2137,7 +2252,7 @@ CONFIG += qt_conf_tests_allowed
logn()
logn("Running configuration tests...")
-for (currentConfig, allConfigs) {
+for (currentConfig, allModuleConfigs) {
tdir = $$eval($${currentConfig}.testDir)
isEmpty(tdir): tdir = config.tests
QMAKE_CONFIG_TESTS_DIR = $$absolute_path($$tdir, $$eval($${currentConfig}.dir))
@@ -2201,7 +2316,7 @@ qtConfPrintReport()
logn()
logn("Qt is now configured for building. Just run '$$QMAKE_MAKE_NAME'.")
pfx = $$[QT_INSTALL_PREFIX]
-equals(pfx, $$[QT_INSTALL_PREFIX/get]) {
+exists($$pfx/.qmake.cache) {
logn("Once everything is built, Qt is installed.")
logn("You should NOT run '$$QMAKE_MAKE_NAME install'.")
logn("Note that this build cannot be deployed to other machines or devices.")
diff --git a/mkspecs/features/qt_helper_lib.prf b/mkspecs/features/qt_helper_lib.prf
index b3e49e4626..1a8446acb4 100644
--- a/mkspecs/features/qt_helper_lib.prf
+++ b/mkspecs/features/qt_helper_lib.prf
@@ -34,19 +34,30 @@ THE_TARGET = $$qt5LibraryTarget($$TARGET)
MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_ext_$${MODULE}.pri
ucmodule = $$upper($$MODULE)
+ win32|CONFIG(static, static|shared) {
+ prefix = $$QMAKE_PREFIX_STATICLIB
+ suffix = $$QMAKE_EXTENSION_STATICLIB
+ } else {
+ prefix = $$QMAKE_PREFIX_SHLIB
+ suffix = $$QMAKE_EXTENSION_SHLIB
+ }
MODULE_PRI_CONT = \
"QMAKE_INCDIR_$${ucmodule} = $$val_escape(MODULE_INCLUDEPATH)" \
"QMAKE_DEFINES_$${ucmodule} = $$val_escape(MODULE_DEFINES)"
debug_and_release {
- win32: MODULE_DEBUG_LIBS = -L$$DESTDIR -l$${TARGET}d
- darwin: MODULE_DEBUG_LIBS = -L$$DESTDIR -l$${TARGET}_debug
- MODULE_RELEASE_LIBS = -L$$DESTDIR -l$$TARGET
+ win32: \
+ MODULE_DEBUG_LIBS = $$DESTDIR/$$prefix$${TARGET}d.$$suffix
+ else: darwin: \
+ MODULE_DEBUG_LIBS = $$DESTDIR/$$prefix$${TARGET}_debug.$$suffix
+ else: \
+ error("'$$QMAKE_PLATFORM' does not do debug_and_release.")
+ MODULE_RELEASE_LIBS = $$DESTDIR/$$prefix$${TARGET}.$$suffix
MODULE_PRI_CONT += \
"QMAKE_LIBS_$${ucmodule} =" \ # Needed for the module to be recognized.
"QMAKE_LIBS_$${ucmodule}_DEBUG = $$val_escape(MODULE_DEBUG_LIBS)" \
"QMAKE_LIBS_$${ucmodule}_RELEASE = $$val_escape(MODULE_RELEASE_LIBS)"
} else {
- MODULE_LIBS = -L$$DESTDIR -l$$THE_TARGET
+ MODULE_LIBS = $$DESTDIR/$$prefix$${THE_TARGET}.$$suffix
MODULE_PRI_CONT += \
"QMAKE_LIBS_$${ucmodule} = $$val_escape(MODULE_LIBS)"
}
diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf
index 4ecfb8d889..6039c52bd0 100644
--- a/mkspecs/features/toolchain.prf
+++ b/mkspecs/features/toolchain.prf
@@ -128,8 +128,8 @@ isEmpty($${target_prefix}.INCDIRS) {
# paths, so it can't just be used in place of the above code).
# What's more, -print-search-dirs can't be used on clang on Apple because it
# won't print all the library paths (only the clang-internal ones).
- output = $$system("$$cmd_prefix $$QMAKE_CXX -print-search-dirs", lines, ec)
- !equals(ec, 0): qtCompilerErrror($$QMAKE_CXX, $$output)
+ output = $$system("$$cmd_prefix $$QMAKE_LINK $$QMAKE_LFLAGS -print-search-dirs", lines, ec)
+ !equals(ec, 0): qtCompilerErrror($$QMAKE_LINK, $$output)
for (line, output) {
contains(line, "^libraries: .*") {
diff --git a/mkspecs/features/wasm/qt.prf b/mkspecs/features/wasm/qt.prf
deleted file mode 100644
index 9b9b58d3de..0000000000
--- a/mkspecs/features/wasm/qt.prf
+++ /dev/null
@@ -1,12 +0,0 @@
-
-qt_depends = $$resolve_depends(QT, "QT.")
-equals(TEMPLATE, app):contains(qt_depends, gui(-private)?) {
- LIBS *= -L$$[QT_INSTALL_PLUGINS/get]/platforms
-
- lib_name = wasm
- lib_path_and_base = $$[QT_INSTALL_PLUGINS/get]/platforms/lib$${lib_name}$$qtPlatformTargetSuffix()
- LIBS += -l$${lib_name}$$qtPlatformTargetSuffix() $$fromfile($${lib_path_and_base}.prl, QMAKE_PRL_LIBS)
-}
-
-load(qt)
-
diff --git a/mkspecs/features/wasm/wasm.prf b/mkspecs/features/wasm/wasm.prf
index 278a6719c7..13ac43443d 100644
--- a/mkspecs/features/wasm/wasm.prf
+++ b/mkspecs/features/wasm/wasm.prf
@@ -41,14 +41,14 @@ contains(TEMPLATE, .*app) {
appjs.name = application qtloader.js
appjs.output = $$DESTDIR/qtloader.js
- appjs.commands = $$QMAKE_COPY $$WASM_PLUGIN_PATH/qtloader.js $$DESTDIR
+ appjs.commands = $$QMAKE_COPY $$shell_path($$WASM_PLUGIN_PATH/qtloader.js) $$shell_path($$DESTDIR)
appjs.input = $$WASM_PLUGIN_PATH/qtloader.js
appjs.depends = $$appjs.input
QMAKE_EXTRA_COMPILERS += appjs
appsvg.name = application qtlogo.svg
appsvg.output = $$DESTDIR/qtlogo.svg
- appsvg.commands = $$QMAKE_COPY $$WASM_PLUGIN_PATH/qtlogo.svg $$DESTDIR
+ appsvg.commands = $$QMAKE_COPY $$shell_path($$WASM_PLUGIN_PATH/qtlogo.svg) $$shell_path($$DESTDIR)
appsvg.input = $$WASM_PLUGIN_PATH/qtlogo.svg
appsvg.depends = $$appsvg.input
QMAKE_EXTRA_COMPILERS += appsvg
diff --git a/mkspecs/features/winrt/package_manifest.prf b/mkspecs/features/winrt/package_manifest.prf
index d850254dcf..143b884dbf 100644
--- a/mkspecs/features/winrt/package_manifest.prf
+++ b/mkspecs/features/winrt/package_manifest.prf
@@ -5,34 +5,7 @@
# Afterwards, they can override the default template by assigning their template to WINRT_MANIFEST.
#
# All subkeys in WINRT_MANIFEST will be replaced if defined/found, so new variables can be easily
-# added. The following keys have default values and are present in the default templates:
-# WINRT_MANIFEST: The name of the input manifest file. Defaults to a file defined by the mkspec.
-# WINRT_MANIFEST.target: The name of the target (.exe). Defaults to TARGET.
-# WINRT_MANIFEST.identity: The unique ID of the app. Defaults to reusing the existing generated manifest's UUID, or generates a new UUID if none is present.
-# WINRT_MANIFEST.name: The name of the package as displayed to the user. Defaults to TARGET.
-# WINRT_MANIFEST.architecture: The target architecture. Defaults to VCPROJ_ARCH.
-# WINRT_MANIFEST.version: The version number of the package. Defaults to "1.0.0.0".
-# WINRT_MANIFEST.publisher: Display name of the publisher. Defaults to "Default publisher display name".
-# WINRT_MANIFEST.publisher_id: The publisher's distinguished name (default: CN=MyCN).
-# WINRT_MANIFEST.phone_product_id: The GUID of the product. Defaults to the value of WINRT_MANIFEST.identity. (Windows Phone only)
-# WINRT_MANIFEST.phone_publisher_id: The GUID of the publisher. Defaults to an invalid GUID. (Windows Phone only)
-# WINRT_MANIFEST.description: Package description. Defaults to "Default package description".
-# WINRT_MANIFEST.background: Tile background color. Defaults to "green".
-# WINRT_MANIFEST.foreground: Tile foreground (text) color (Windows 8/RT only). Defaults to "light".
-# WINRT_MANIFEST.logo_store: Logo image file for Windows Store. Default provided by the mkspec.
-# WINRT_MANIFEST.logo_small: Small logo image file. Default provided by the mkspec.
-# WINRT_MANIFEST.logo_medium: Medium logo image file. Default provided by the mkspec.
-# WINRT_MANIFEST.logo_large: Large logo image file. Default provided by the mkspec.
-# WINRT_MANIFEST.splash_screen: Splash screen image file. Default provided by the mkspec.
-# WINRT_MANIFEST.rotation_preference: Orientation specification. Default is empty. (portrait, landscape, landscapeFlipped)
-# WINRT_MANIFEST.iconic_tile_icon: Image file for the "iconic" tile template icon. Default provided by the mkspec.
-# WINRT_MANIFEST.iconic_tile_small: Image file for the small "iconic" tile template logo. Default provided by the mkspec.
-# WINRT_MANIFEST.default_language: Specifies the default language of the application
-# WINRT_MANIFEST.capabilities: Specifies capabilities to add to the capability list.
-# WINRT_MANIFEST.capabilities_device: Specifies device capabilities to add to the capability list. (location, webcam...)
-# WINRT_MANIFEST.dependencies: Specifies dependencies required by the package.
-# WINRT_MANIFEST.minVersion: Specifies the minimum required Windows version to run the package. Defaults to %UCRTVersion%
-# WINRT_MANIFEST.maxVersionTested: Specifies the maximum Windows version the package has been tested against. Defaults to WINRT_MANIFEST.minVersion
+# added.
# The manifest is generated for each build pass for normal apps, and only once for vcapps.
# - Normal apps have their package root directory in the same place as the target (one for each build pass).
diff --git a/mkspecs/integrity-armv7-imx6/qmake.conf b/mkspecs/integrity-armv7-imx6/qmake.conf
index 3bf2abd844..eed6d41d35 100644
--- a/mkspecs/integrity-armv7-imx6/qmake.conf
+++ b/mkspecs/integrity-armv7-imx6/qmake.conf
@@ -6,7 +6,6 @@ include(../common/ghs-integrity-armv7.conf)
DEFINES += QT_STATICPLUGIN
-QTPLUGIN.platforms += qeglfs qeglfs-viv-integration
QT_QPA_DEFAULT_PLATFORM = eglfs
QMAKE_LIBS_EGL += -lEGL -lGAL -lVSC -lGLSLC -lGLESv2 -lfbdev -livfs
diff --git a/mkspecs/integrity-armv7/qmake.conf b/mkspecs/integrity-armv7/qmake.conf
index 7a2ffaba14..002c8b544e 100644
--- a/mkspecs/integrity-armv7/qmake.conf
+++ b/mkspecs/integrity-armv7/qmake.conf
@@ -5,5 +5,3 @@
include(../common/ghs-integrity-armv7.conf)
DEFINES += QT_STATICPLUGIN
-
-QTPLUGIN.platforms += integrityfb
diff --git a/mkspecs/integrity-armv8-rcar/qmake.conf b/mkspecs/integrity-armv8-rcar/qmake.conf
index 46091f6a91..2dbe924086 100644
--- a/mkspecs/integrity-armv8-rcar/qmake.conf
+++ b/mkspecs/integrity-armv8-rcar/qmake.conf
@@ -11,7 +11,6 @@ DEFINES += INTEGRITY
# parameter types as Symbian. The parameter types are defined in eglplatform.h.
DEFINES += __WINSCW__
-QTPLUGIN.platforms += qeglfs
QT_QPA_DEFAULT_PLATFORM = eglfs
QMAKE_LIBS_EGL += -lEGL -lIMGegl -lsrv_um -lsrv_init -lpvrWSEGL_WM -lncg_usr.a -lmmgr_usr -lwm_usr -lprr_usr
diff --git a/mkspecs/integrity-x86/qmake.conf b/mkspecs/integrity-x86/qmake.conf
index 13d4a6c082..9e3569d15c 100644
--- a/mkspecs/integrity-x86/qmake.conf
+++ b/mkspecs/integrity-x86/qmake.conf
@@ -6,5 +6,3 @@ include(../common/ghs-integrity-x86.conf)
QMAKE_CFLAGS += -cpu=Corei
DEFINES += QT_STATICPLUGIN
-
-QTPLUGIN.platforms += integrityfb
diff --git a/mkspecs/macx-xcode/default.xcscheme b/mkspecs/macx-xcode/default.xcscheme
index bd2cb0e565..170174ed2b 100644
--- a/mkspecs/macx-xcode/default.xcscheme
+++ b/mkspecs/macx-xcode/default.xcscheme
@@ -26,6 +26,7 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "NO"
+ disableMainThreadChecker = "YES"
buildConfiguration = "Debug">
<Testables>
<TestableReference
diff --git a/mkspecs/wasm-emscripten/qmake.conf b/mkspecs/wasm-emscripten/qmake.conf
index c3b67310c8..2539770b51 100644
--- a/mkspecs/wasm-emscripten/qmake.conf
+++ b/mkspecs/wasm-emscripten/qmake.conf
@@ -12,11 +12,6 @@ EMTERP_FLAGS = \
-s ASSERTIONS=1 \
--profiling-funcs
-EMCC_COMMON_CFLAGS = \
- -s USE_LIBPNG=1 \
- -s USE_FREETYPE=1 \
- -s USE_ZLIB=1
-
EMCC_COMMON_LFLAGS = \
-s WASM=1 \
-s FULL_ES2=1 \
@@ -28,6 +23,8 @@ EMCC_COMMON_LFLAGS = \
-s \"BINARYEN_METHOD=\'native-wasm\'\" \
-s \"BINARYEN_TRAP_MODE=\'clamp\'\"
+# The -s arguments can also be used with release builds,
+# but are here in debug for clarity.
EMCC_COMMON_LFLAGS_DEBUG = \
$$EMCC_COMMON_LFLAGS \
-s ASSERTIONS=2 \
@@ -38,17 +35,11 @@ EMCC_COMMON_LFLAGS_DEBUG = \
# -s SOCKET_DEBUG \ #print out socket,network data transfer
-s GL_DEBUG=1
-# the -s arguments can also be used with release builds
-# but here in debug for clarity
-
QMAKE_COMPILER += emscripten
QMAKE_CC = emcc
QMAKE_CXX = em++
-QMAKE_CFLAGS += $$EMCC_COMMON_CFLAGS
-QMAKE_CXXFLAGS += $$EMCC_COMMON_CFLAGS
-
# Practical debugging setup:
# "-g4" preserves function names for stack traces
# "-Os" produces reasonably sized binaries
@@ -63,8 +54,8 @@ QMAKE_CXXFLAGS_RELEASE += -O3
QMAKE_CFLAGS_RELEASE -= -O2
QMAKE_CFLAGS_RELEASE += -O3
QMAKE_LFLAGS_RELEASE += -O3
-MAKE_CFLAGS_OPTIMIZE += -O3
-MAKE_CFLAGS_OPTIMIZE_FULL += -Oz
+QMAKE_CFLAGS_OPTIMIZE += -O3
+QMAKE_CFLAGS_OPTIMIZE_FULL += -Oz
QMAKE_LINK = $$QMAKE_CXX
QMAKE_LINK_SHLIB = $$QMAKE_CXX
@@ -84,7 +75,4 @@ QMAKE_EXTENSION_STATICLIB = a # llvm bitcode
QMAKE_AR = emar cqs
QMAKE_DISTCLEAN += *.html *.js *.wasm
-QT_QPA_DEFAULT_PLATFORM = wasm
-
-QTPLUGIN.platforms = wasm
load(qt_config)
diff --git a/mkspecs/win32-arm64-msvc2017/qmake.conf b/mkspecs/win32-arm64-msvc2017/qmake.conf
new file mode 100644
index 0000000000..ee10f9cc40
--- /dev/null
+++ b/mkspecs/win32-arm64-msvc2017/qmake.conf
@@ -0,0 +1,15 @@
+#
+# qmake configuration for win32-arm64-msvc2017
+#
+# Written for Microsoft C/C++ Optimizing Compiler targeting arm64.
+#
+
+include(../common/msvc-desktop.conf)
+
+WINSDK_VER = 10.0
+VCPROJ_ARCH = ARM64
+
+DEFINES += WIN64
+QMAKE_COMPILER_DEFINES += _WIN64
+
+load(qt_config)
diff --git a/mkspecs/win32-arm64-msvc2017/qplatformdefs.h b/mkspecs/win32-arm64-msvc2017/qplatformdefs.h
new file mode 100644
index 0000000000..8a3afa7630
--- /dev/null
+++ b/mkspecs/win32-arm64-msvc2017/qplatformdefs.h
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the qmake spec of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "../win32-msvc/qplatformdefs.h"