summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/common/clang.conf4
-rw-r--r--mkspecs/common/g++-win32.conf2
-rw-r--r--mkspecs/common/gcc-base-unix.conf2
-rw-r--r--mkspecs/common/gcc-base.conf2
-rw-r--r--mkspecs/common/msvc-desktop.conf1
-rw-r--r--mkspecs/common/windows-desktop.conf5
-rw-r--r--mkspecs/common/winrt_winphone/qmake.conf2
-rw-r--r--mkspecs/features/android/sdk.prf2
-rw-r--r--mkspecs/features/coverage.prf7
-rw-r--r--mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in105
-rw-r--r--mkspecs/features/default_post.prf6
-rw-r--r--mkspecs/features/qml_plugin.prf4
-rw-r--r--mkspecs/features/qt.prf2
-rw-r--r--mkspecs/features/qt_common.prf4
-rw-r--r--mkspecs/features/qt_configure.prf8
-rw-r--r--mkspecs/features/rtti.prf (renamed from mkspecs/features/win32/rtti.prf)0
-rw-r--r--mkspecs/features/rtti_off.prf (renamed from mkspecs/features/win32/rtti_off.prf)0
-rw-r--r--mkspecs/features/wasm/wasm.prf40
-rw-r--r--mkspecs/features/wayland-scanner.prf6
-rw-r--r--mkspecs/features/winrt/package_manifest.prf7
-rw-r--r--mkspecs/linux-clang-32/qmake.conf20
-rw-r--r--mkspecs/linux-clang-32/qplatformdefs.h40
-rw-r--r--mkspecs/linux-clang-libc++-32/qmake.conf10
-rw-r--r--mkspecs/linux-clang-libc++-32/qplatformdefs.h40
-rw-r--r--mkspecs/wasm-emscripten/qmake.conf58
-rw-r--r--mkspecs/win32-g++/qmake.conf1
26 files changed, 344 insertions, 34 deletions
diff --git a/mkspecs/common/clang.conf b/mkspecs/common/clang.conf
index 5800aaa5b4..dacd1539cf 100644
--- a/mkspecs/common/clang.conf
+++ b/mkspecs/common/clang.conf
@@ -44,3 +44,7 @@ QMAKE_LFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
QMAKE_AR_LTCG = llvm-ar cqs
QMAKE_NM_LTCG = llvm-nm -P
QMAKE_RANLIB_LTCG = true # No need to run, since llvm-ar has "s"
+
+QMAKE_CFLAGS_COVERAGE_TRACE_PC_GUARD = -fsanitize-coverage=trace-pc-guard
+QMAKE_CXXFLAGS_COVERAGE_TRACE_PC_GUARD = -fsanitize-coverage=trace-pc-guard
+QMAKE_LFLAGS_COVERAGE_TRACE_PC_GUARD = -fsanitize-coverage=trace-pc-guard
diff --git a/mkspecs/common/g++-win32.conf b/mkspecs/common/g++-win32.conf
index f0df324b64..c3a1f3a373 100644
--- a/mkspecs/common/g++-win32.conf
+++ b/mkspecs/common/g++-win32.conf
@@ -31,8 +31,6 @@ QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS_SSE2 += -mstackrealign
-QMAKE_CXXFLAGS_RTTI_ON = -frtti
-QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti
QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads
QMAKE_INCDIR =
diff --git a/mkspecs/common/gcc-base-unix.conf b/mkspecs/common/gcc-base-unix.conf
index 700f228c36..a456c8f3eb 100644
--- a/mkspecs/common/gcc-base-unix.conf
+++ b/mkspecs/common/gcc-base-unix.conf
@@ -20,7 +20,9 @@ QMAKE_LFLAGS_RPATH = -Wl,-rpath,
QMAKE_LFLAGS_RPATHLINK = -Wl,-rpath-link,
QMAKE_LFLAGS_NEW_DTAGS = -Wl,--enable-new-dtags
QMAKE_LFLAGS_GDB_INDEX = -Wl,--gdb-index
+QMAKE_LFLAGS_USE_BFD = -fuse-ld=bfd
QMAKE_LFLAGS_USE_GOLD = -fuse-ld=gold
+QMAKE_LFLAGS_USE_LLD = -fuse-ld=lld
# -Bsymbolic-functions (ld) support
QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions
diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf
index c2669e4833..44b4267207 100644
--- a/mkspecs/common/gcc-base.conf
+++ b/mkspecs/common/gcc-base.conf
@@ -68,6 +68,8 @@ QMAKE_CXXFLAGS_APP += $$QMAKE_CFLAGS_APP
QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden
QMAKE_CXXFLAGS_EXCEPTIONS_OFF += $$QMAKE_CFLAGS_EXCEPTIONS_OFF
+QMAKE_CXXFLAGS_RTTI_ON = -frtti
+QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti
QMAKE_CXXFLAGS_SPLIT_SECTIONS += $$QMAKE_CFLAGS_SPLIT_SECTIONS
QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
QMAKE_CXXFLAGS_LTCG_FATOBJECTS = $$QMAKE_CFLAGS_LTCG_FATOBJECTS
diff --git a/mkspecs/common/msvc-desktop.conf b/mkspecs/common/msvc-desktop.conf
index c0d4bd2acc..0b94e5a3f5 100644
--- a/mkspecs/common/msvc-desktop.conf
+++ b/mkspecs/common/msvc-desktop.conf
@@ -115,4 +115,5 @@ VCSOLUTION_EXTENSION = .sln
VCPROJ_KEYWORD = Qt4VSv1.0
include(angle.conf)
+include(windows-desktop.conf)
include(windows-vulkan.conf)
diff --git a/mkspecs/common/windows-desktop.conf b/mkspecs/common/windows-desktop.conf
new file mode 100644
index 0000000000..c1f2955e1b
--- /dev/null
+++ b/mkspecs/common/windows-desktop.conf
@@ -0,0 +1,5 @@
+# This file contains initializations for Windows Desktop platforms (non-UWP)
+
+WINDOWS_TARGET_PLATFORM_VERSION = $$(WindowsSDKVersion)
+# The version number might have a trailing backslash due to a VS bug.
+WINDOWS_TARGET_PLATFORM_VERSION ~= s/\\\\$//
diff --git a/mkspecs/common/winrt_winphone/qmake.conf b/mkspecs/common/winrt_winphone/qmake.conf
index 375e084127..03fb96f2c5 100644
--- a/mkspecs/common/winrt_winphone/qmake.conf
+++ b/mkspecs/common/winrt_winphone/qmake.conf
@@ -97,6 +97,8 @@ WINRT_ASSETS_PATH = $$PWD/assets
WINRT_MANIFEST.capabilities = defaults
WINRT_MANIFEST.capabilities_device = defaults
+WINDOWS_TARGET_PLATFORM_VERSION = $$(UCRTVERSION)
+
include(../angle.conf)
load(qt_config)
diff --git a/mkspecs/features/android/sdk.prf b/mkspecs/features/android/sdk.prf
index eee7ac2d5d..fe7b9a27bd 100644
--- a/mkspecs/features/android/sdk.prf
+++ b/mkspecs/features/android/sdk.prf
@@ -1,6 +1,6 @@
API_VERSION_TO_USE = $$(ANDROID_API_VERSION)
isEmpty(API_VERSION_TO_USE): API_VERSION_TO_USE = $$API_VERSION
-isEmpty(API_VERSION_TO_USE): API_VERSION_TO_USE = android-16
+isEmpty(API_VERSION_TO_USE): API_VERSION_TO_USE = android-21
ANDROID_JAR_FILE = $$ANDROID_SDK_ROOT/platforms/$$API_VERSION_TO_USE/android.jar
!exists($$ANDROID_JAR_FILE) {
diff --git a/mkspecs/features/coverage.prf b/mkspecs/features/coverage.prf
new file mode 100644
index 0000000000..b8b37e1b80
--- /dev/null
+++ b/mkspecs/features/coverage.prf
@@ -0,0 +1,7 @@
+# Coverage flags
+
+coverage_trace_pc_guard {
+ QMAKE_CFLAGS += $$QMAKE_CFLAGS_COVERAGE_TRACE_PC_GUARD
+ QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_COVERAGE_TRACE_PC_GUARD
+ QMAKE_LFLAGS += $$QMAKE_LFLAGS_COVERAGE_TRACE_PC_GUARD
+}
diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
index 3ed6dd5889..d6773d6e98 100644
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
@@ -48,6 +48,59 @@ but not all the files it references.
endif()
endmacro()
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
+function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configuration lib_deps link_flags)
+ set(_lib_deps)
+ set(_link_flags)
+
+ get_filename_component(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/lib\" ABSOLUTE)
+
+ if(EXISTS \"${prl_file_location}\")
+ file(STRINGS \"${prl_file_location}\" _prl_strings REGEX \"QMAKE_PRL_LIBS[ \\t]*=\")
+ string(REGEX REPLACE \"QMAKE_PRL_LIBS[ \\t]*=[ \\t]*([^\\n]*)\" \"\\\\1\" _static_depends ${_prl_strings})
+ string(REGEX REPLACE \"[ \\t]+\" \";\" _static_depends ${_static_depends})
+ set(_search_paths)
+ string(REPLACE \"\\$\\$[QT_INSTALL_LIBS]\" \"${_qt5_install_libs}\" _static_depends \"${_static_depends}\")
+ foreach(_flag ${_static_depends})
+ if(_flag MATCHES \"^-l(.*)$\")
+ # Handle normal libraries passed as -lfoo
+ set(_lib \"${CMAKE_MATCH_1}\")
+ if(_lib MATCHES \"^pthread$\")
+ find_package(Threads REQUIRED)
+ list(APPEND _lib_deps Threads::Threads)
+ else()
+ if(_search_paths)
+ find_library(_Qt5$${CMAKE_MODULE_NAME}_${Configuration}_${_lib}_PATH ${_lib} HINTS ${_search_paths} NO_DEFAULT_PATH)
+ endif()
+ find_library(_Qt5$${CMAKE_MODULE_NAME}_${Configuration}_${_lib}_PATH ${_lib})
+ mark_as_advanced(_Qt5$${CMAKE_MODULE_NAME}_${Configuration}_${_lib}_PATH)
+ if(_Qt5$${CMAKE_MODULE_NAME}_${Configuration}_${_lib}_PATH)
+ list(APPEND _lib_deps
+ ${_Qt5$${CMAKE_MODULE_NAME}_${Configuration}_${_lib}_PATH}
+ )
+ else()
+ message(FATAL_ERROR \"Library not found: ${_lib}\")
+ endif()
+ endif()
+ elseif(EXISTS \"${_flag}\")
+ # The flag is an absolute path to an existing library
+ list(APPEND _lib_deps \"${_flag}\")
+ elseif(_flag MATCHES \"^-L(.*)$\")
+ # Handle -Lfoo flags by putting their paths in the search path used by find_library above
+ list(APPEND _search_paths \"${CMAKE_MATCH_1}\")
+ else()
+ # Handle all remaining flags by simply passing them to the linker
+ list(APPEND _link_flags ${_flag})
+ endif()
+ endforeach()
+ endif()
+
+ string(REPLACE \";\" \" \" _link_flags \"${_link_flags}\")
+ set(${lib_deps} ${_lib_deps} PARENT_SCOPE)
+ set(${link_flags} \"SHELL:${_link_flags}\" PARENT_SCOPE)
+endfunction()
+!!ENDIF
+
!!IF !equals(TEMPLATE, aux)
macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATION IMPLIB_LOCATION)
set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
@@ -58,15 +111,29 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI
set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
!!ENDIF
_qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
+ set(_deps
+ ${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
+ ${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES}
+!!ENDIF
+ )
set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
- \"INTERFACE_LINK_LIBRARIES\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\"
+ \"INTERFACE_LINK_LIBRARIES\" \"${_deps}\"
\"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
!!IF !isEmpty(CMAKE_LIB_SONAME)
\"IMPORTED_SONAME_${Configuration}\" \"$${CMAKE_LIB_SONAME}\"
!!ENDIF
# For backward compatibility with CMake < 2.8.12
- \"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}\" \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\"
+ \"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}\" \"${_deps}\"
)
+!!IF !isEmpty(CMAKE_STATIC_TYPE)
+
+ if(NOT CMAKE_VERSION VERSION_LESS \"3.13\")
+ set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
+ \"INTERFACE_LINK_OPTIONS\" \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LINK_FLAGS}\"
+ )
+ endif()
+!!ENDIF
!!IF !isEmpty(CMAKE_WINDOWS_BUILD)
!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
@@ -215,6 +282,40 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
!!ENDIF
!!IF !isEmpty(CMAKE_STATIC_TYPE)
+ if(NOT Qt5_EXCLUDE_STATIC_DEPENDENCIES)
+!!IF !isEmpty(CMAKE_DEBUG_TYPE)
+!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
+ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LINK_FLAGS
+ )
+!!ELSE
+ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
+ \"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LINK_FLAGS
+ )
+!!ENDIF
+!!ENDIF
+
+!!IF !isEmpty(CMAKE_RELEASE_TYPE)
+!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
+ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
+ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LINK_FLAGS
+ )
+!!ELSE
+ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
+ \"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES
+ _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LINK_FLAGS
+ )
+!!ENDIF
+!!ENDIF
+ endif()
+
add_library(Qt5::$${CMAKE_MODULE_NAME} STATIC IMPORTED)
set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX")
!!ELSE
diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf
index fbf1f3b8df..69da78c5b7 100644
--- a/mkspecs/features/default_post.prf
+++ b/mkspecs/features/default_post.prf
@@ -78,7 +78,9 @@ stack_protector_strong {
# disable special linker flags for host builds (no proper test for host support yet)
!host_build|!cross_compile {
+ use_bfd_linker: QMAKE_LFLAGS += $$QMAKE_LFLAGS_USE_BFD
use_gold_linker: QMAKE_LFLAGS += $$QMAKE_LFLAGS_USE_GOLD
+ use_lld_linker: QMAKE_LFLAGS += $$QMAKE_LFLAGS_USE_LLD
enable_new_dtags: QMAKE_LFLAGS += $$QMAKE_LFLAGS_NEW_DTAGS
enable_gdb_index: QMAKE_LFLAGS += $$QMAKE_LFLAGS_GDB_INDEX
}
@@ -90,6 +92,10 @@ staticlib:unix {
QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_STATIC_LIB
}
+defined(WINDOWS_TARGET_PLATFORM_VERSION, var):isEmpty(WINDOWS_TARGET_PLATFORM_MIN_VERSION) {
+ WINDOWS_TARGET_PLATFORM_MIN_VERSION = $$WINDOWS_TARGET_PLATFORM_VERSION
+}
+
incredibuild_xge {
CONFIG -= incredibuild_xge
CONFIG = incredibuild_xge $$CONFIG
diff --git a/mkspecs/features/qml_plugin.prf b/mkspecs/features/qml_plugin.prf
index ad8ecdf5f1..02068ae766 100644
--- a/mkspecs/features/qml_plugin.prf
+++ b/mkspecs/features/qml_plugin.prf
@@ -94,7 +94,7 @@ load(qt_common)
}
load(resolve_target)
- TARGETPATHBASE = $$replace(TARGETPATH, \\.\\d+\$, )
+ isEmpty(IMPORT_NAME): IMPORT_NAME = $$replace(TARGETPATH, \\.\\d+\$, )
!qml1_target {
isEmpty(QMAKE_PLUGINDUMP_DEPENDENCIES_FILE):exists($$_PRO_FILE_PWD_/dependencies.json): \
@@ -104,7 +104,7 @@ load(qt_common)
}
qmltypes.target = qmltypes
- qmltypes.commands = $$QMLPLUGINDUMP -nonrelocatable $$QMAKE_QMLPLUGINDUMP_FLAGS $$replace(TARGETPATHBASE, /, .) $$IMPORT_VERSION > $$QMLTYPEFILE
+ qmltypes.commands = $$QMLPLUGINDUMP -nonrelocatable $$QMAKE_QMLPLUGINDUMP_FLAGS $$replace(IMPORT_NAME, /, .) $$IMPORT_VERSION > $$QMLTYPEFILE
qmltypes.depends = $$QMAKE_RESOLVED_TARGET
} else {
qmltypes.CONFIG += recursive
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index d8d5acaafd..5ac640190a 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -2,7 +2,7 @@
# due to required Qt modules being missing.
!isEmpty(QMAKE_FAILED_REQUIREMENTS): return()
-CONFIG *= thread
+qtConfig(thread): CONFIG *= thread
#handle defines
win32 {
diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf
index 6cb2e78c1c..ae859a81ff 100644
--- a/mkspecs/features/qt_common.prf
+++ b/mkspecs/features/qt_common.prf
@@ -105,10 +105,10 @@ warnings_are_errors:warning_clean {
# compiler.
clang {
# Apple clang 4.0-4.2,5.0-5.1,6.0-6.4,7.0-7.3,8.0-8.3,9.0-9.2
- # Regular clang 3.x-6.0
+ # Regular clang 3.x-7.0
apple_ver = $${QT_APPLE_CLANG_MAJOR_VERSION}.$${QT_APPLE_CLANG_MINOR_VERSION}
reg_ver = $${QT_CLANG_MAJOR_VERSION}.$${QT_CLANG_MINOR_VERSION}
- contains(apple_ver, "4\\.[012]|5\\.[01]|6\\.[01234]|7\\.[0123]|8\\.[0123]|9\\.[012]")|contains(reg_ver, "[345]\\.|6\\.0") {
+ contains(apple_ver, "4\\.[012]|5\\.[01]|6\\.[01234]|7\\.[0123]|8\\.[0123]|9\\.[012]")|contains(reg_ver, "[345]\\.|[67]\\.0") {
QMAKE_CXXFLAGS_WARN_ON += -Werror -Wno-error=\\$${LITERAL_HASH}warnings -Wno-error=deprecated-declarations $$WERROR
}
} else:intel_icc:linux {
diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf
index e845bf1577..3f6914e243 100644
--- a/mkspecs/features/qt_configure.prf
+++ b/mkspecs/features/qt_configure.prf
@@ -380,8 +380,12 @@ defineTest(qtConfTest_compilerSupportsFlag) {
defineTest(qtConfTest_linkerSupportsFlag) {
flag = $$eval($${1}.flag)
+ use_bfd_linker: \
+ LFLAGS = -fuse-ld=bfd
use_gold_linker: \
LFLAGS = -fuse-ld=gold
+ use_lld_linker: \
+ LFLAGS = -fuse-ld=lld
return($$qtConfToolchainSupportsFlag($$LFLAGS "-Wl,$$flag"))
}
@@ -1232,8 +1236,12 @@ defineTest(qtConfTest_compile) {
else: \
qmake_configs = "static"
+ use_bfd_linker: \
+ qmake_configs += "use_bfd_linker"
use_gold_linker: \
qmake_configs += "use_gold_linker"
+ use_lld_linker: \
+ qmake_configs += "use_lld_linker"
# disable warnings from the builds, since they're just noise at this point.
qmake_configs += "warn_off"
diff --git a/mkspecs/features/win32/rtti.prf b/mkspecs/features/rtti.prf
index 6d720d2438..6d720d2438 100644
--- a/mkspecs/features/win32/rtti.prf
+++ b/mkspecs/features/rtti.prf
diff --git a/mkspecs/features/win32/rtti_off.prf b/mkspecs/features/rtti_off.prf
index b520bfa8b7..b520bfa8b7 100644
--- a/mkspecs/features/win32/rtti_off.prf
+++ b/mkspecs/features/rtti_off.prf
diff --git a/mkspecs/features/wasm/wasm.prf b/mkspecs/features/wasm/wasm.prf
index 13ac43443d..de726c674c 100644
--- a/mkspecs/features/wasm/wasm.prf
+++ b/mkspecs/features/wasm/wasm.prf
@@ -2,6 +2,39 @@
# DESTDIR will be empty if not set in the app .pro file; make sure it has a value
isEmpty(DESTDIR): DESTDIR = $$OUT_PWD
+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.
+ POOL_SIZE = 4
+ !isEmpty(QMAKE_WASM_PTHREAD_POOL_SIZE) {
+ POOL_SIZE = $$QMAKE_WASM_PTHREAD_POOL_SIZE
+ }
+
+ message("Setting PTHREAD_POOL_SIZE to" $$POOL_SIZE)
+ EMCC_THREAD_LFLAGS += -s PTHREAD_POOL_SIZE=$$POOL_SIZE
+ } else {
+ EMCC_THREAD_LFLAGS += -s ALLOW_MEMORY_GROWTH=1
+ }
+ QMAKE_LFLAGS += $$EMCC_THREAD_LFLAGS
+ QMAKE_LFLAGS_DEBUG += $$EMCC_THREAD_LFLAGS
+ QMAKE_CFLAGS += $$EMCC_THREAD_LFLAGS
+ QMAKE_CXXFLAGS += $$EMCC_THREAD_LFLAGS
+}
+
# Create js and wasm files for applications
contains(TEMPLATE, .*app) {
TARGET_BASE = $${TARGET}
@@ -72,6 +105,13 @@ contains(TEMPLATE, .*app) {
}
}
+# Pass --source-map-base on the linker line. This informs the
+# browser where to find the source files when debugging.
+WASM_SOURCE_MAP_BASE = http://localhost:8000/
+!isEmpty(QMAKE_WASM_SOURCE_MAP_BASE):\
+ WASM_SOURCE_MAP_BASE = $$QMAKE_WASM_SOURCE_MAP_BASE
+CONFIG(debug): QMAKE_LFLAGS += --source-map-base $$WASM_SOURCE_MAP_BASE
+
# Creates the stand-alone version of the library from bitcode
!static:contains(TEMPLATE, .*lib): {
load(resolve_target)
diff --git a/mkspecs/features/wayland-scanner.prf b/mkspecs/features/wayland-scanner.prf
index 2360917a3b..79bf02f25b 100644
--- a/mkspecs/features/wayland-scanner.prf
+++ b/mkspecs/features/wayland-scanner.prf
@@ -22,7 +22,7 @@ wayland_server_header.name = wayland ${QMAKE_FILE_BASE}
wayland_server_header.input = WAYLANDSERVERSOURCES WAYLANDSERVERSOURCES_SYSTEM
wayland_server_header.variable_out = HEADERS
wayland_server_header.output = wayland-${QMAKE_FILE_BASE}-server-protocol$${first(QMAKE_EXT_H)}
-wayland_server_header.commands = $$QMAKE_WAYLAND_SCANNER server-header < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
+wayland_server_header.commands = $$QMAKE_WAYLAND_SCANNER --include-core-only server-header < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
silent:wayland_server_header.commands = @echo Wayland server header ${QMAKE_FILE_IN} && $$wayland_server_header.commands
QMAKE_EXTRA_COMPILERS += wayland_server_header
@@ -30,7 +30,7 @@ wayland_client_header.name = wayland ${QMAKE_FILE_BASE}
wayland_client_header.input = WAYLANDCLIENTSOURCES WAYLANDCLIENTSOURCES_SYSTEM
wayland_client_header.variable_out = HEADERS
wayland_client_header.output = wayland-${QMAKE_FILE_BASE}-client-protocol$${first(QMAKE_EXT_H)}
-wayland_client_header.commands = $$QMAKE_WAYLAND_SCANNER client-header < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
+wayland_client_header.commands = $$QMAKE_WAYLAND_SCANNER --include-core-only client-header < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
silent:wayland_client_header.commands = @echo Wayland client header ${QMAKE_FILE_IN} && $$wayland_client_header.commands
QMAKE_EXTRA_COMPILERS += wayland_client_header
@@ -38,7 +38,7 @@ wayland_code.name = wayland ${QMAKE_FILE_BASE}
wayland_code.input = WAYLANDCLIENTSOURCES WAYLANDSERVERSOURCES
wayland_code.variable_out = SOURCES
wayland_code.output = wayland-${QMAKE_FILE_BASE}-protocol.c
-wayland_code.commands = $$QMAKE_WAYLAND_SCANNER code < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
+wayland_code.commands = $$QMAKE_WAYLAND_SCANNER --include-core-only code < ${QMAKE_FILE_IN} > ${QMAKE_FILE_OUT}
silent:wayland_code.commands = @echo Wayland code header ${QMAKE_FILE_IN} && $$wayland_code.commands
QMAKE_EXTRA_COMPILERS += wayland_code
diff --git a/mkspecs/features/winrt/package_manifest.prf b/mkspecs/features/winrt/package_manifest.prf
index 143b884dbf..969343cfd7 100644
--- a/mkspecs/features/winrt/package_manifest.prf
+++ b/mkspecs/features/winrt/package_manifest.prf
@@ -69,9 +69,10 @@
isEmpty(WINRT_MANIFEST.foreground): WINRT_MANIFEST.foreground = light
isEmpty(WINRT_MANIFEST.default_language): WINRT_MANIFEST.default_language = en
*-msvc2015|*-msvc2017 {
- isEmpty(WINRT_MANIFEST.minVersion): WINRT_MANIFEST.minVersion = $$(UCRTVersion)
- isEmpty(WINRT_MANIFEST.minVersion): error("No UCRTVersion found in environment."))
- isEmpty(WINRT_MANIFEST.maxVersionTested): WINRT_MANIFEST.maxVersionTested = $$WINRT_MANIFEST.minVersion
+ isEmpty(WINRT_MANIFEST.minVersion): \
+ WINRT_MANIFEST.minVersion = $$WINDOWS_TARGET_PLATFORM_VERSION
+ isEmpty(WINRT_MANIFEST.maxVersionTested): \
+ WINRT_MANIFEST.maxVersionTested = $$WINDOWS_TARGET_PLATFORM_MIN_VERSION
}
INDENT = "$$escape_expand(\\r\\n) "
diff --git a/mkspecs/linux-clang-32/qmake.conf b/mkspecs/linux-clang-32/qmake.conf
new file mode 100644
index 0000000000..de872e7431
--- /dev/null
+++ b/mkspecs/linux-clang-32/qmake.conf
@@ -0,0 +1,20 @@
+#
+# qmake configuration for linux-clang
+#
+
+MAKEFILE_GENERATOR = UNIX
+CONFIG += incremental
+
+QMAKE_INCREMENTAL_STYLE = sublib
+
+include(../common/linux.conf)
+
+QMAKE_CFLAGS = -m32
+QMAKE_LFLAGS = -m32
+
+include(../common/gcc-base-unix.conf)
+include(../common/clang.conf)
+
+QMAKE_LFLAGS += -ccc-gcc-name g++
+
+load(qt_config)
diff --git a/mkspecs/linux-clang-32/qplatformdefs.h b/mkspecs/linux-clang-32/qplatformdefs.h
new file mode 100644
index 0000000000..8f5ce17858
--- /dev/null
+++ b/mkspecs/linux-clang-32/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 "../linux-clang/qplatformdefs.h"
diff --git a/mkspecs/linux-clang-libc++-32/qmake.conf b/mkspecs/linux-clang-libc++-32/qmake.conf
new file mode 100644
index 0000000000..f4c006d383
--- /dev/null
+++ b/mkspecs/linux-clang-libc++-32/qmake.conf
@@ -0,0 +1,10 @@
+#
+# qmake configuration for linux-clang and libc++
+#
+
+include(../linux-clang-32/qmake.conf)
+
+QMAKE_CXXFLAGS += -stdlib=libc++
+QMAKE_LFLAGS += -stdlib=libc++
+
+load(qt_config)
diff --git a/mkspecs/linux-clang-libc++-32/qplatformdefs.h b/mkspecs/linux-clang-libc++-32/qplatformdefs.h
new file mode 100644
index 0000000000..8f5ce17858
--- /dev/null
+++ b/mkspecs/linux-clang-libc++-32/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 "../linux-clang/qplatformdefs.h"
diff --git a/mkspecs/wasm-emscripten/qmake.conf b/mkspecs/wasm-emscripten/qmake.conf
index e7b45d312d..c80f2bfb92 100644
--- a/mkspecs/wasm-emscripten/qmake.conf
+++ b/mkspecs/wasm-emscripten/qmake.conf
@@ -5,6 +5,17 @@ QMAKE_PLATFORM = wasm unix
include(../common/gcc-base.conf)
include(../common/clang.conf)
+load(device_config)
+
+# Support setting WASM_OBJECT_FILES with -device-option WASM_OBJECT_FILES=1
+!isEmpty(WASM_OBJECT_FILES): {
+ !equals(WASM_OBJECT_FILES, 1):!equals(WASM_OBJECT_FILES, 0): \
+ message(Error: The value for WASM_OBJECT_FILES must be 0 or 1)
+ QMAKE_CFLAGS += -s WASM_OBJECT_FILES=$$WASM_OBJECT_FILES
+ QMAKE_CXXFLAGS += -s WASM_OBJECT_FILES=$$WASM_OBJECT_FILES
+ QMAKE_LFLAGS += -s WASM_OBJECT_FILES=$$WASM_OBJECT_FILES
+}
+
EMTERP_FLAGS = \
-s EMTERPRETIFY=1 \
-s EMTERPRETIFY_ASYNC=1 \
@@ -15,7 +26,6 @@ EMTERP_FLAGS = \
EMCC_COMMON_LFLAGS = \
-s WASM=1 \
-s FULL_ES2=1 \
- -s ALLOW_MEMORY_GROWTH=1 \
-s USE_WEBGL2=1 \
-s NO_EXIT_RUNTIME=0 \
-s ERROR_ON_UNDEFINED_SYMBOLS=1 \
@@ -34,28 +44,40 @@ EMCC_COMMON_LFLAGS_DEBUG = \
# -s SOCKET_DEBUG \ #print out socket,network data transfer
-s GL_DEBUG=1
+# Set up debug/optimization flags
+QMAKE_CXXFLAGS_RELEASE -= -O2
+QMAKE_CFLAGS_RELEASE -= -O2
+equals(WASM_OBJECT_FILES, 1) {
+ QMAKE_LFLAGS_DEBUG += -g
+
+ QMAKE_CXXFLAGS_RELEASE += -O3
+ QMAKE_CFLAGS_RELEASE += -O3
+ QMAKE_LFLAGS_RELEASE += -O3
+ QMAKE_CFLAGS_OPTIMIZE += -O3
+ QMAKE_CFLAGS_OPTIMIZE_FULL += -Oz
+} else {
+ # Practical debugging setup:
+ # "-g4" preserves function names for stack traces
+ # "-Os" produces reasonably sized binaries
+ QMAKE_CFLAGS_DEBUG -= -g
+ QMAKE_CXXFLAGS_DEBUG -= -g
+ QMAKE_CFLAGS_DEBUG += -Os -g4
+ QMAKE_CXXFLAGS_DEBUG += -Os -g4
+ QMAKE_LFLAGS_DEBUG += -Os -g4
+
+ QMAKE_CXXFLAGS_RELEASE += -O3
+ QMAKE_CFLAGS_RELEASE += -O3
+ QMAKE_LFLAGS_RELEASE += -O3
+ QMAKE_CFLAGS_OPTIMIZE += -O3
+ QMAKE_CFLAGS_OPTIMIZE_FULL += -Oz
+}
+
+
QMAKE_COMPILER += emscripten
QMAKE_CC = emcc
QMAKE_CXX = em++
-# Practical debugging setup:
-# "-g4" preserves function names for stack traces
-# "-Os" produces reasonably sized binaries
-QMAKE_CFLAGS_DEBUG -= -g
-QMAKE_CXXFLAGS_DEBUG -= -g
-QMAKE_CFLAGS_DEBUG += -Os -g4
-QMAKE_CXXFLAGS_DEBUG += -Os -g4
-QMAKE_LFLAGS_DEBUG += -Os -g4
-
-QMAKE_CXXFLAGS_RELEASE -= -O2
-QMAKE_CXXFLAGS_RELEASE += -O3
-QMAKE_CFLAGS_RELEASE -= -O2
-QMAKE_CFLAGS_RELEASE += -O3
-QMAKE_LFLAGS_RELEASE += -O3
-QMAKE_CFLAGS_OPTIMIZE += -O3
-QMAKE_CFLAGS_OPTIMIZE_FULL += -Oz
-
QMAKE_LINK = $$QMAKE_CXX
QMAKE_LINK_SHLIB = $$QMAKE_CXX
QMAKE_LINK_C = $$QMAKE_CC
diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf
index ed131c6823..9bd2f5525f 100644
--- a/mkspecs/win32-g++/qmake.conf
+++ b/mkspecs/win32-g++/qmake.conf
@@ -8,6 +8,7 @@
#
include(../common/g++-win32.conf)
+include(../common/windows-desktop.conf)
# modifications to g++-win32.conf