diff options
Diffstat (limited to 'tools/qmake/mkspecs/features/functions.prf')
-rw-r--r-- | tools/qmake/mkspecs/features/functions.prf | 75 |
1 files changed, 56 insertions, 19 deletions
diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf index 6545ef791..b4965129c 100644 --- a/tools/qmake/mkspecs/features/functions.prf +++ b/tools/qmake/mkspecs/features/functions.prf @@ -59,10 +59,10 @@ defineTest(isPlatformSupported) { skipBuild("Using XCode version $$QMAKE_XCODE_VERSION, but at least version 5.1 is required to build Qt WebEngine.") return(false) } - # We require OS X 10.9 (darwin version 13.0.0) or newer + # We require OS X 10.0 (darwin version 14.0.0) or newer darwin_major_version = $$section(QMAKE_HOST.version, ., 0, 0) - lessThan(darwin_major_version, 13) { - skipBuild("Qt WebEngine requires OS X version 10.9 or newer.") + lessThan(darwin_major_version, 14) { + skipBuild("Qt WebEngine requires OS X version 10.10 or newer.") return(false) } !isMinOSXSDKVersion(10, 10): { @@ -222,14 +222,26 @@ defineTest(isSanitizerLinuxClangVersionSupported) { defineTest(isGCCVersionSupported) { # The below will work for gcc 4.7 and up and also match gcc 5 - greaterThan(QT_GCC_MINOR_VERSION, 6):return(true) + CONFIG(release, debug|release): greaterThan(QT_GCC_MINOR_VERSION, 6):return(true) greaterThan(QT_GCC_MAJOR_VERSION, 4):return(true) - skipBuild("Using gcc version "$$QT_GCC_MAJOR_VERSION"."$$QT_GCC_MINOR_VERSION", but at least gcc version 4.7 is required to build Qt WebEngine.") + + # We need GCC 4.9 for debug builds because Skia handles SIMD inlines in headers poorly. + greaterThan(QT_GCC_MINOR_VERSION, 8):return(true) + CONFIG(debug, debug|release) { + skipBuild("Using gcc version "$$QT_GCC_MAJOR_VERSION"."$$QT_GCC_MINOR_VERSION", but at least gcc version 4.9 is required to build debug versions of Qt WebEngine.") + } else { + skipBuild("Using gcc version "$$QT_GCC_MAJOR_VERSION"."$$QT_GCC_MINOR_VERSION", but at least gcc version 4.7 is required to build Qt WebEngine.") + } return(false) } +defineTest(isDeveloperBuild) { + qtConfig(private_tests): return(true) # enabled for developer-build + return(false) +} + defineTest(isQMLTestSupportApiEnabled) { - qtConfig(private_tests): return(true) # enable for developer-build + isDeveloperBuild(): return(true) contains(QT_BUILD_PARTS, tests): return(true) contains(WEBENGINE_CONFIG, testsupport): return(true) return(false) @@ -385,24 +397,49 @@ defineTest(use?) { return(false) } -defineReplace(findOrBuildNinja) { - # If NINJA_PATH env var is set, prefer that. - # Fallback to locating our own bootstrapped ninja. - out = $(NINJA_PATH) - !exists($$out) { +defineReplace(ninjaPath) { src_3rd_party_dir = $$absolute_path("$${getChromiumSrcDir()}/../", "$$QTWEBENGINE_ROOT") - out = $$shadowed($$absolute_path(ninja/ninja, $$src_3rd_party_dir)) win32: out = $${out}.exe + return($$out) +} + +defineReplace(gnPath) { + src_3rd_party_dir = $$absolute_path("$${getChromiumSrcDir()}/../", "$$QTWEBENGINE_ROOT") + out = $$shadowed($$absolute_path(chromium/tools/gn/out/Release/gn, $$src_3rd_party_dir)) - # If we did not find ninja, then we bootstrap it. - !exists($$out) { - mkpath($$dirname(out)) - ninja_configure = $$absolute_path(ninja/configure.py, $$src_3rd_party_dir) - system("cd $$system_quote($$system_path($$dirname(out))) && python $$system_quote($$system_path($$ninja_configure)) --bootstrap") + win32: out = $${out}.exe + return($$out) +} + +defineReplace(gnArgs) { + linux { + contains(WEBENGINE_CONFIG, embedded_build): include($$QTWEBENGINE_ROOT/src/core/config/embedded_linux.pri) + else: include($$QTWEBENGINE_ROOT/src/core/config/desktop_linux.pri) } - } - return($$system_path($$out)) + macos: include($$QTWEBENGINE_ROOT/src/core/config/mac_osx.pri) + win32: include($$QTWEBENGINE_ROOT/src/core/config/windows.pri) + isEmpty(gn_args): error(No gn_args found please make sure you have valid configuration.) + return($$gn_args) +} + +defineReplace(gnArch) { + qtArch = $$1 + contains(qtArch, "i386"): return(x86) + contains(qtArch, "x86_64"): return(x64) + contains(qtArch, "arm"): return(arm) + contains(qtArch, "arm64"): return(arm64) + contains(qtArch, "mips"): return(mipsel) + contains(qtArch, "mips64"): return(mips64el) + return(unknown) +} + +defineReplace(gnOS) { + macos: return(mac) + win32: return(win) + linux: return(linux) + error(Unsupported platform) + return(unknown) } defineTest(skipBuild) { |