summaryrefslogtreecommitdiffstats
path: root/mkspecs/features
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs/features')
-rw-r--r--mkspecs/features/create_cmake.prf6
-rw-r--r--mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in6
-rw-r--r--mkspecs/features/default_pre.prf6
-rw-r--r--mkspecs/features/mac/default_post.prf32
-rw-r--r--mkspecs/features/mac/no_warn_empty_obj_files.prf7
-rw-r--r--mkspecs/features/metatypes.prf34
-rw-r--r--mkspecs/features/qmake_use.prf2
-rw-r--r--mkspecs/features/qml_plugin.prf2
-rw-r--r--mkspecs/features/qt_build_config.prf3
-rw-r--r--mkspecs/features/qt_configure.prf110
-rw-r--r--mkspecs/features/qt_functions.prf16
-rw-r--r--mkspecs/features/qt_plugin.prf2
-rw-r--r--mkspecs/features/qt_tracepoints.prf2
-rw-r--r--mkspecs/features/simd.prf1
-rw-r--r--mkspecs/features/uic.prf2
-rw-r--r--mkspecs/features/uikit/gc_binaries.prf6
-rw-r--r--mkspecs/features/uikit/xcodebuild.mk4
-rw-r--r--mkspecs/features/uikit/xcodebuild.prf2
-rw-r--r--mkspecs/features/wasm/wasm.prf24
-rw-r--r--mkspecs/features/win32/windows_vulkan_sdk.prf5
20 files changed, 142 insertions, 130 deletions
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
index 5c561042cd..346fbf2467 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
@@ -42,6 +42,9 @@ CMAKE_INCLUDE_NAME = $$eval(QT.$${MODULE}.name)
# (or QtCore_{libinfix_suffix}, Foo_{libinfix_suffix} on macos with -framework).
CMAKE_QT_STEM = $${TARGET}
+# ANDROID_ABI is set by the android toolchain file, see https://developer.android.com/ndk/guides/cmake
+android: CMAKE_QT_STEM = $$replace(CMAKE_QT_STEM, "_$${QT_ARCH}", '_\$\{ANDROID_ABI\}')
+
# On macOS when building just a debug configuration which is not part of debug_and_release,
# $${TARGET} already contains a _debug suffix, as per the following call chain:
# qt_module.prf -> qt5LibraryTarget -> qtLibraryTarget -> qtPlatformTargetSuffix.
@@ -297,7 +300,8 @@ mac {
CMAKE_PRL_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.prl
} else {
qt_framework {
- CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}.framework/$${CMAKE_QT_STEM}_debug
+ # Intentionally there is no '_debug' infix for framework builds.
+ CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}.framework/$${CMAKE_QT_STEM}
CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.framework/$${CMAKE_QT_STEM}
CMAKE_BUILD_IS_FRAMEWORK = "true"
} else {
diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
index 4d3dc1bd35..364c23e750 100644
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
@@ -53,7 +53,11 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
set(_lib_deps)
set(_link_flags)
- get_filename_component(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/lib\" ABSOLUTE)
+!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+ set(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}\")
+!!ELSE
+ set(_qt5_install_libs \"$${CMAKE_LIB_DIR}\")
+!!ENDIF
if(EXISTS \"${prl_file_location}\")
file(STRINGS \"${prl_file_location}\" _prl_strings REGEX \"QMAKE_PRL_LIBS_FOR_CMAKE[ \\t]*=\")
diff --git a/mkspecs/features/default_pre.prf b/mkspecs/features/default_pre.prf
index 1c24bf071a..b2629d04c0 100644
--- a/mkspecs/features/default_pre.prf
+++ b/mkspecs/features/default_pre.prf
@@ -26,4 +26,10 @@ CONFIG = \
unset(today)
}
+CONFIG(debug, debug|release) {
+ DEFINES += $$DEFINES_DEBUG
+} else {
+ DEFINES += $$DEFINES_RELEASE
+}
+
load(toolchain)
diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf
index 60b2eb2117..03084c7f07 100644
--- a/mkspecs/features/mac/default_post.prf
+++ b/mkspecs/features/mac/default_post.prf
@@ -71,7 +71,8 @@ qt {
# Add the same default rpaths as Xcode does for new projects.
# This is especially important for iOS/tvOS/watchOS where no other option is possible.
!no_default_rpath {
- QMAKE_RPATHDIR += @executable_path/../Frameworks
+ uikit: QMAKE_RPATHDIR += @executable_path/Frameworks
+ else: QMAKE_RPATHDIR += @executable_path/../Frameworks
equals(TEMPLATE, lib):!plugin:lib_bundle: QMAKE_RPATHDIR += @loader_path/Frameworks
}
@@ -97,21 +98,22 @@ macx-xcode {
qmake_pkginfo_typeinfo.value = "????"
QMAKE_MAC_XCODE_SETTINGS += qmake_pkginfo_typeinfo
- !isEmpty(VERSION) {
- l = $$split(VERSION, '.') 0 0 # make sure there are at least three
- VER_MAJ = $$member(l, 0, 0)
- VER_MIN = $$member(l, 1, 1)
- VER_PAT = $$member(l, 2, 2)
- unset(l)
+ bundle_version = $$VERSION
+ isEmpty(bundle_version): bundle_version = 1.0.0
- qmake_full_version.name = QMAKE_FULL_VERSION
- qmake_full_version.value = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT}
- QMAKE_MAC_XCODE_SETTINGS += qmake_full_version
+ l = $$split(bundle_version, '.') 0 0 # make sure there are at least three
+ VER_MAJ = $$member(l, 0, 0)
+ VER_MIN = $$member(l, 1, 1)
+ VER_PAT = $$member(l, 2, 2)
+ unset(l)
- qmake_short_version.name = QMAKE_SHORT_VERSION
- qmake_short_version.value = $${VER_MAJ}.$${VER_MIN}
- QMAKE_MAC_XCODE_SETTINGS += qmake_short_version
- }
+ qmake_full_version.name = QMAKE_FULL_VERSION
+ qmake_full_version.value = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT}
+ QMAKE_MAC_XCODE_SETTINGS += qmake_full_version
+
+ qmake_short_version.name = QMAKE_SHORT_VERSION
+ qmake_short_version.value = $${VER_MAJ}.$${VER_MIN}
+ QMAKE_MAC_XCODE_SETTINGS += qmake_short_version
!isEmpty(QMAKE_XCODE_DEBUG_INFORMATION_FORMAT) {
debug_information_format.name = DEBUG_INFORMATION_FORMAT
@@ -270,7 +272,7 @@ xcode_product_bundle_identifier_setting.value = "$${xcode_product_bundle_identif
QMAKE_MAC_XCODE_SETTINGS += xcode_product_bundle_identifier_setting
!macx-xcode {
- generate_xcode_project.commands = @$(QMAKE) -spec macx-xcode $(EXPORT__PRO_FILE_) $$QMAKE_ARGS
+ generate_xcode_project.commands = @$(QMAKE) -spec macx-xcode \"$(EXPORT__PRO_FILE_)\" $$QMAKE_ARGS
generate_xcode_project.target = xcodeproj
QMAKE_EXTRA_VARIABLES += _PRO_FILE_
QMAKE_EXTRA_TARGETS += generate_xcode_project
diff --git a/mkspecs/features/mac/no_warn_empty_obj_files.prf b/mkspecs/features/mac/no_warn_empty_obj_files.prf
new file mode 100644
index 0000000000..598938ab12
--- /dev/null
+++ b/mkspecs/features/mac/no_warn_empty_obj_files.prf
@@ -0,0 +1,7 @@
+# Prevent warnings about object files without any symbols. This is a common
+# thing in Qt as we tend to build files unconditionally, and then use ifdefs
+# to compile out parts that are not relevant.
+QMAKE_RANLIB += -no_warning_for_no_symbols
+
+# We have to tell 'ar' to not run ranlib by itself
+QMAKE_AR += -S
diff --git a/mkspecs/features/metatypes.prf b/mkspecs/features/metatypes.prf
new file mode 100644
index 0000000000..a0a548eeb2
--- /dev/null
+++ b/mkspecs/features/metatypes.prf
@@ -0,0 +1,34 @@
+qtPrepareTool(MOC_COLLECT_JSON, moc)
+
+QMAKE_MOC_OPTIONS += --output-json
+
+moc_json_header.input = HEADERS
+moc_json_header.output = $$MOC_DIR/$${QMAKE_H_MOD_MOC}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_CPP)}.json
+moc_json_header.CONFIG = no_link moc_verify
+moc_json_header.depends = $$MOC_DIR/$${QMAKE_H_MOD_MOC}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_CPP)}
+moc_json_header.commands = $$escape_expand(\\n) # force creation of rule
+moc_json_header.variable_out = MOC_JSON_FILES
+
+moc_json_source.input = SOURCES
+moc_json_source.output = $$MOC_DIR/$${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_EXT_CPP_MOC}.json
+moc_json_source.CONFIG = no_link moc_verify
+moc_json_source.depends = $$MOC_DIR/$${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_EXT_CPP_MOC}
+moc_json_source.commands = $$escape_expand(\\n) # force creation of rule
+moc_json_source.variable_out = MOC_JSON_FILES
+
+MOC_COLLECT_JSON_OUTPUT = $$lower($$basename(TARGET))_metatypes.json
+
+moc_collect_json.CONFIG += no_link combine
+moc_collect_json.commands = $$MOC_COLLECT_JSON --collect-json -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
+moc_collect_json.input = MOC_JSON_FILES
+moc_collect_json.output = $$MOC_COLLECT_JSON_OUTPUT
+moc_collect_json.name = Collect moc JSON output into central file
+
+install_metatypes {
+ do_install.path = $$[QT_INSTALL_LIBS]/metatypes
+ do_install.files = $$OUT_PWD/$$MOC_COLLECT_JSON_OUTPUT
+ prefix_build: INSTALLS += do_install
+ else: COPIES += do_install
+}
+
+QMAKE_EXTRA_COMPILERS += moc_collect_json moc_json_header moc_json_source
diff --git a/mkspecs/features/qmake_use.prf b/mkspecs/features/qmake_use.prf
index ecb4f7ed41..8475e4111a 100644
--- a/mkspecs/features/qmake_use.prf
+++ b/mkspecs/features/qmake_use.prf
@@ -22,6 +22,8 @@ for(ever) {
!defined(QMAKE_LIBS_$$nu, var): \
error("Library '$$lower($$replace(nu, _, -))' is not defined.")
+ QMAKE_LIBDIR += $$eval(QMAKE_LIBDIR_$$nu)
+
android {
ABI_LIBS = $$eval(QMAKE_LIBS_$${nu}_$${QT_ARCH})
isEmpty(ABI_LIBS): ABI_LIBS = $$eval(QMAKE_LIBS_$${nu})
diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf
index 02068ae766..f1c5658b04 100644
--- a/mkspecs/features/qml_plugin.prf
+++ b/mkspecs/features/qml_plugin.prf
@@ -55,7 +55,7 @@ INSTALLS += target
# Some final setup
-TARGET = $$qt5LibraryTarget($$TARGET)
+TARGET = $$qt5LibraryTarget($$TARGET, "qml/$$TARGETPATH/")
load(qt_targets)
load(qt_common)
diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf
index 745b09a885..8273ba3fe1 100644
--- a/mkspecs/features/qt_build_config.prf
+++ b/mkspecs/features/qt_build_config.prf
@@ -88,6 +88,9 @@ cross_compile: \
android|uikit|winrt: \
CONFIG += builtin_testdata
+# Prevent warnings about object files without any symbols
+macos: CONFIG += no_warn_empty_obj_files
+
CONFIG += \
utf8_source \
create_prl link_prl \
diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf
index 1219fe1443..adac835c26 100644
--- a/mkspecs/features/qt_configure.prf
+++ b/mkspecs/features/qt_configure.prf
@@ -537,98 +537,23 @@ defineReplace(qtGccSysrootifiedPaths) {
return($$sysrootified)
}
-# libs-var, libs, in-paths, out-paths-var
+# libs-var, libs, in-paths
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", )
- gcc: lp = $$qtGccSysrootifiedPath($$lp)
- !exists($$lp/.) {
- qtLog("Library path $$val_escape(lp) is invalid.")
- ret = false
- } else {
- paths += $$lp
- }
- } else: !android: contains(l, "^-l.*") {
- lib = $$replace(l, "^-l", )
- lcan =
- integrity:contains(lib, "^.*\\.a") {
- # INTEGRITY compiler searches for exact filename
- # if -l argument has .a suffix
- lcan += $${lib}
- } else: contains(lib, "^:.*") {
- # Use exact filename when -l:filename syntax is used.
- lib ~= s/^://
- lcan += $${lib}
- } else: unix {
- # Under UNIX, we look for actual shared libraries, in addition
- # to static ones.
- shexts = $$QMAKE_EXTENSION_SHLIB $$QMAKE_EXTENSIONS_AUX_SHLIB
- for (ext, shexts) {
- lcan += $${QMAKE_PREFIX_SHLIB}$${lib}.$${ext}
- }
- lcan += \
- $${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
+ for (path, 3): \
+ pre_lflags += -L$$path
+ $$1 = $$pre_lflags $$2
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)
+ return(true)
}
# libs-var, in-paths, libs
defineTest(qtConfResolvePathLibs) {
ret = true
- gcc: 2 = $$qtGccSysrootifiedPaths($$2)
- for (libdir, 2) {
+ gcc: \
+ local_paths = $$qtGccSysrootifiedPaths($$2)
+ else: \
+ local_paths = $$2
+ for (libdir, local_paths) {
!exists($$libdir/.) {
qtLog("Library path $$val_escape(libdir) is invalid.")
ret = false
@@ -678,8 +603,11 @@ defineReplace(qtConfGetTestIncludes) {
# includes-var, in-paths, test-object-var
defineTest(qtConfResolvePathIncs) {
ret = true
- gcc: 2 = $$qtGccSysrootifiedPaths($$2)
- for (incdir, 2) {
+ gcc: \
+ local_paths = $$qtGccSysrootifiedPaths($$2)
+ else: \
+ local_paths = $$2
+ for (incdir, local_paths) {
!exists($$incdir/.) {
qtLog("Include path $$val_escape(incdir) is invalid.")
ret = false
@@ -773,11 +701,9 @@ defineTest(qtConfLibrary_inline) {
for (ld, libdir): \
libs += -L$$ld
$${1}.libs = $$libs $$eval($${1}.libs)
+ export($${1}.libs)
}
- !qtConfResolveAllLibs($$1): \
- return(false)
-
!qtConfResolvePathIncs($${1}.includedir, $$includes, $$2): \
return(false)
@@ -832,9 +758,7 @@ defineTest(qtConfLibrary_pkgConfig) {
!qtConfResolveLibs($${1}.libs, $$libs): \
return(false)
contains($${1}.libs, ".*\\.$${QMAKE_EXTENSION_STATICLIB}$") {
- qtRunLoggedCommand("$$pkg_config --static --libs-only-L $$args", libpaths)|return(false)
- qtRunLoggedCommand("$$pkg_config --static --libs-only-l $$args", libs)|return(false)
- eval(libs = $$libpaths $$libs)
+ qtRunLoggedCommand("$$pkg_config --static --libs $$args", libs)|return(false)
!qtConfResolveLibs($${1}.libs, $$libs): \
return(false)
}
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index ede494eec1..661b7dd961 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -5,7 +5,7 @@ defineReplace(qtPlatformTargetSuffix) {
else: CONFIG(debug, debug|release) {
!debug_and_release|build_pass {
mac: return($${suffix}_debug)
- win32: return($${suffix}d)
+ win32:!gcc: return($${suffix}d)
}
}
return($$suffix)
@@ -21,7 +21,13 @@ defineReplace(qtLibraryTarget) {
}
defineReplace(qt5LibraryTarget) {
- LIBRARY_NAME = $$qtLibraryTarget($$1)
+ android {
+ LIBRARY_NAME_PREFIX = $$2
+ LIBRARY_NAME_PREFIX = $$replace(LIBRARY_NAME_PREFIX, "//", "/")
+ LIBRARY_NAME_PREFIX = $$replace(LIBRARY_NAME_PREFIX, "/", "_")
+ LIBRARY_NAME = $$LIBRARY_NAME_PREFIX$$qtLibraryTarget($$1)
+ unset(LIBRARY_NAME_PREFIX)
+ } else: LIBRARY_NAME = $$qtLibraryTarget($$1)
isEmpty(QMAKE_FRAMEWORK_BUNDLE_NAME) {
# Insert the major version of Qt in the library name
# unless it's a framework build.
@@ -153,8 +159,12 @@ defineTest(qtAddToolEnv) {
!isEmpty(cmd): cmd = "$$cmd "
equals(ds, /) {
batch_name = $${batch_name}.sh
+ equals(QMAKE_HOST.os, Darwin):exists(/bin/bash): \
+ shell = /bin/bash
+ else: \
+ shell = /bin/sh
batch_cont = \
- "$$LITERAL_HASH!/bin/sh" \
+ "$$LITERAL_HASH!$$shell" \
$$batch_sets \
"exec $$cmd\"$@\""
# It would be nicer to use the '.' command (without 'exec' above),
diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf
index 6e7388c352..573d717eea 100644
--- a/mkspecs/features/qt_plugin.prf
+++ b/mkspecs/features/qt_plugin.prf
@@ -92,7 +92,7 @@ target.path = $$[QT_INSTALL_PLUGINS]/$$PLUGIN_TYPE
INSTALLS += target
qt_libinfix_plugins: TARGET = $$TARGET$$QT_LIBINFIX
-TARGET = $$qt5LibraryTarget($$TARGET)
+TARGET = $$qt5LibraryTarget($$TARGET, "plugins/$$PLUGIN_TYPE/")
CONFIG += create_cmake
diff --git a/mkspecs/features/qt_tracepoints.prf b/mkspecs/features/qt_tracepoints.prf
index d1b45a47cb..56d315e1cd 100644
--- a/mkspecs/features/qt_tracepoints.prf
+++ b/mkspecs/features/qt_tracepoints.prf
@@ -16,7 +16,7 @@ PROVIDER_NAME = qt$$lower($$MODULE)
INCLUDEPATH += $$absolute_path($$TRACEGEN_DIR, $$OUT_PWD)
HEADER_PATH = $$OUT_PWD/$$TRACEGEN_DIR/$${PROVIDER_NAME}_tracepoints_p$${first(QMAKE_EXT_H)}
-!force_bootstrap:if(qtConfig(lttng)|qtConfig(etw)) {
+if(qtConfig(lttng)|qtConfig(etw)) {
SOURCE_PATH = $$OUT_PWD/$$TRACEGEN_DIR/$${PROVIDER_NAME}_tracepoints$${first(QMAKE_EXT_CPP)}
isEmpty(BUILDS)|build_pass {
diff --git a/mkspecs/features/simd.prf b/mkspecs/features/simd.prf
index a0b40fcf11..3918c4fe73 100644
--- a/mkspecs/features/simd.prf
+++ b/mkspecs/features/simd.prf
@@ -137,6 +137,7 @@ addSimdCompiler(avx512ifma)
addSimdCompiler(avx512vbmi)
addSimdCompiler(f16c)
addSimdCompiler(rdrnd)
+addSimdCompiler(rdseed)
addSimdCompiler(neon)
addSimdCompiler(mips_dsp)
addSimdCompiler(mips_dspr2)
diff --git a/mkspecs/features/uic.prf b/mkspecs/features/uic.prf
index 1cedce5ae7..a5df0c7e8d 100644
--- a/mkspecs/features/uic.prf
+++ b/mkspecs/features/uic.prf
@@ -9,7 +9,7 @@ uic.depend_command = $$QMAKE_UIC_DEP -d ${QMAKE_FILE_IN}
uic.output = $$UI_DIR/$${QMAKE_MOD_UIC}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
uic.input = FORMS
uic.variable_out = GENERATED_FILES
-uic.CONFIG += no_link target_predeps dep_lines
+uic.CONFIG += no_link target_predeps dep_lines dep_existing_only
uic.name = UIC ${QMAKE_FILE_IN}
silent:uic.commands = @echo uic ${QMAKE_FILE_IN} && $$uic.commands
QMAKE_EXTRA_COMPILERS += uic
diff --git a/mkspecs/features/uikit/gc_binaries.prf b/mkspecs/features/uikit/gc_binaries.prf
index c4f7445951..aa27e69054 100644
--- a/mkspecs/features/uikit/gc_binaries.prf
+++ b/mkspecs/features/uikit/gc_binaries.prf
@@ -1,2 +1,6 @@
# bitcode (release mode) is incompatible with splitting sections.
-!bitcode|!release: load(gc_binaries)
+# We have to explicitly exclude Xcode, as that supports both debug
+# and release builds in the same project. Xcode already has a settting
+# for dead code stripping which is enabled by default, so we'll still
+# strip any libraries build with split sections.
+!bitcode|if(!macx-xcode:!release): load(gc_binaries)
diff --git a/mkspecs/features/uikit/xcodebuild.mk b/mkspecs/features/uikit/xcodebuild.mk
index 0c8d99f4b8..e1156d0e76 100644
--- a/mkspecs/features/uikit/xcodebuild.mk
+++ b/mkspecs/features/uikit/xcodebuild.mk
@@ -27,8 +27,8 @@ distclean: clean_all
$(EXPORT_SUBTARGETS): % : %-build
# Generic targets
-%_first: $(firstword $(call targets, %)) ;
-%_all: $(call targets, %) ;
+%_first: $(EXPORT_PRE_TARGETDEPS) $(firstword $(call targets, %)) ;
+%_all: $(EXPORT_PRE_TARGETDEPS) $(call targets, %) ;
# Actions
%-build: ACTION = build
diff --git a/mkspecs/features/uikit/xcodebuild.prf b/mkspecs/features/uikit/xcodebuild.prf
index 7a6b2acfc2..01022c7b99 100644
--- a/mkspecs/features/uikit/xcodebuild.prf
+++ b/mkspecs/features/uikit/xcodebuild.prf
@@ -29,6 +29,8 @@ cmd = "$$QMAKE_QMAKE $$system_quote($$_PRO_FILE_) -spec macx-xcode $$args"
debug(1, "Generating Xcode project in $$OUT_PWD using '$$cmd'")
system("$$QMAKE_CD $$system_quote($$OUT_PWD) && $$cmd")
+QMAKE_EXTRA_VARIABLES += PRE_TARGETDEPS
+
# Subtargets
for(build, BUILDS): \
diff --git a/mkspecs/features/wasm/wasm.prf b/mkspecs/features/wasm/wasm.prf
index 54d351bfd5..25413d7470 100644
--- a/mkspecs/features/wasm/wasm.prf
+++ b/mkspecs/features/wasm/wasm.prf
@@ -6,16 +6,6 @@ exists($$QMAKE_QT_CONFIG) {
qtConfig(thread) {
EMCC_THREAD_LFLAGS += -s USE_PTHREADS=1
- # Hardcode wasm memory size. Emscripten does not currently support memory growth
- # (ALLOW_MEMORY_GROWTH) in pthreads mode, and requires specifying the memory size
- # at build time. Further, browsers limit the maximum initial memory size to 1GB.
- TOTAL_MEMORY = 1GB
- !isEmpty(QMAKE_WASM_TOTAL_MEMORY) {
- TOTAL_MEMORY = $$QMAKE_WASM_TOTAL_MEMORY
- }
-
- message("Setting TOTAL_MEMORY to" $$TOTAL_MEMORY)
- EMCC_THREAD_LFLAGS += -s TOTAL_MEMORY=$$TOTAL_MEMORY
# Create worker threads at startup. This is supposed to be an optimization,
# however exceeding the pool size has been obesverved to hang the application.
@@ -29,6 +19,20 @@ exists($$QMAKE_QT_CONFIG) {
} else {
EMCC_THREAD_LFLAGS += -s ALLOW_MEMORY_GROWTH=1
}
+
+ qtConfig(thread) | !isEmpty(QMAKE_WASM_TOTAL_MEMORY) {
+
+ # Hardcode wasm memory size. Emscripten does not currently support memory growth
+ # (ALLOW_MEMORY_GROWTH) in pthreads mode, and requires specifying the memory size
+ # at build time. Further, browsers limit the maximum initial memory size to 1GB.
+ # QMAKE_WASM_TOTAL_MEMORY must be a multiple of 64KB
+ TOTAL_MEMORY = 1GB
+ !isEmpty(QMAKE_WASM_TOTAL_MEMORY) {
+ TOTAL_MEMORY = $$QMAKE_WASM_TOTAL_MEMORY
+ }
+ message("Setting TOTAL_MEMORY to" $$TOTAL_MEMORY)
+ EMCC_THREAD_LFLAGS += -s TOTAL_MEMORY=$$TOTAL_MEMORY
+ }
QMAKE_LFLAGS += $$EMCC_THREAD_LFLAGS
QMAKE_LFLAGS_DEBUG += $$EMCC_THREAD_LFLAGS
QMAKE_CFLAGS += $$EMCC_THREAD_LFLAGS
diff --git a/mkspecs/features/win32/windows_vulkan_sdk.prf b/mkspecs/features/win32/windows_vulkan_sdk.prf
index 2aebbd3b25..4dc0e50090 100644
--- a/mkspecs/features/win32/windows_vulkan_sdk.prf
+++ b/mkspecs/features/win32/windows_vulkan_sdk.prf
@@ -3,6 +3,11 @@ isEmpty(QMAKE_INCDIR_VULKAN) {
# headers are found out-of-the-box on typical Windows setups.
QMAKE_INCDIR_VULKAN = $$(VULKAN_SDK)/include
+ # Do not add default include paths as that can knock std headers
+ # out of their stride due to their usage of #include_next.
+ contains(QMAKE_DEFAULT_INCDIRS, $$QMAKE_INCDIR_VULKAN): \
+ QMAKE_INCDIR_VULKAN =
+
# Do not export the include dir but resolve it on every qmake call.
QMAKE_EXPORT_INCDIR_VULKAN = -
}