diff options
Diffstat (limited to 'mkspecs/features/default_post.prf')
-rw-r--r-- | mkspecs/features/default_post.prf | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf index fbf1f3b8df..2be446e41e 100644 --- a/mkspecs/features/default_post.prf +++ b/mkspecs/features/default_post.prf @@ -64,11 +64,13 @@ debug { QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_DEBUG QMAKE_LFLAGS += $$QMAKE_LFLAGS_DEBUG QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_DEBUG + DEFINES += $$DEFINES_DEBUG } else { QMAKE_CFLAGS += $$QMAKE_CFLAGS_RELEASE QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_RELEASE QMAKE_LFLAGS += $$QMAKE_LFLAGS_RELEASE QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_RELEASE + DEFINES += $$DEFINES_RELEASE } stack_protector_strong { @@ -78,7 +80,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 +94,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 @@ -114,22 +122,24 @@ breakpad { } c++17: CONFIG += c++1z +c++20: CONFIG += c++2a +c++latest: CONFIG *= c++2b c++2a c++1z c++14 c++11 -!c++11:!c++14:!c++1z { - # Qt requires C++11 since 5.7, check if we need to force a compiler option +!c++1z:!c++2a:!c++2b { + # Qt requires C++17 QT_COMPILER_STDCXX_no_L = $$replace(QT_COMPILER_STDCXX, "L$", "") - !greaterThan(QT_COMPILER_STDCXX_no_L, 199711): CONFIG += c++11 + !greaterThan(QT_COMPILER_STDCXX_no_L, 201402): CONFIG += c++1z } -c++11|c++14|c++1z { +c++1z|c++2a|c++2b { # Disable special compiler flags for host builds !host_build|!cross_compile { - c++1z: cxxstd = CXX1Z - else: c++14: cxxstd = CXX14 - else: cxxstd = CXX11 + c++2b: cxxstd = CXX2B + else:c++2a: cxxstd = CXX2A + else: cxxstd = CXX1Z } else { - # Fall back to c++11, because since 5.7 c++11 is required everywhere, + # Fall back to c++17, because C++17 is required everywhere, # including host builds - cxxstd = CXX11 + cxxstd = CXX1Z } # Check if we should disable compiler extensions or not @@ -145,7 +155,8 @@ c++11|c++14|c++1z { unset(cxxstd) } -c99|c11 { +c99|c11|c17|c18 { + c17|c18: cstd = C17 c11: cstd = C11 else: cstd = C99 @@ -158,7 +169,7 @@ c99|c11 { unset(cstd) } -utf8_source { +!no_utf8_source { QMAKE_CFLAGS += $$QMAKE_CFLAGS_UTF8_SOURCE QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_UTF8_SOURCE } |