summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2016-11-24 12:32:08 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2016-11-24 12:32:39 +0100
commitf2f20462e146508868d488f9bc370c53e000d2d9 (patch)
tree52022ca4c648807543ae2b8f48421b2e5a6df7d6 /tools
parentb4f8480fd41a806abe04e8eb2a4c416b2eff53c6 (diff)
parentecfb3ba8a7eb116c838a1acd5b82ca59ce76b082 (diff)
Merge remote-tracking branch 'origin/5.8' into dev
Diffstat (limited to 'tools')
-rw-r--r--tools/about_credits_entry.tmpl2
-rw-r--r--tools/qmake/mkspecs/features/configure.prf105
-rw-r--r--tools/qmake/mkspecs/features/default_post.prf11
-rw-r--r--tools/qmake/mkspecs/features/default_pre.prf14
-rw-r--r--tools/qmake/mkspecs/features/functions.prf142
-rwxr-xr-xtools/scripts/take_snapshot.py6
6 files changed, 199 insertions, 81 deletions
diff --git a/tools/about_credits_entry.tmpl b/tools/about_credits_entry.tmpl
index dd74c880a..20bbb28a0 100644
--- a/tools/about_credits_entry.tmpl
+++ b/tools/about_credits_entry.tmpl
@@ -1,6 +1,6 @@
/*!
\contentspage qtwebengine-licensing.html
-\page qtwebengine-3rdparty-{{name-sanitized}}.html
+\page qtwebengine-3rdparty-{{name-sanitized}}.html attribution
\ingroup qtwebengine-licensing
\brief {{license-type}}
\title {{name}}
diff --git a/tools/qmake/mkspecs/features/configure.prf b/tools/qmake/mkspecs/features/configure.prf
index 89fa3a242..c6f07e39d 100644
--- a/tools/qmake/mkspecs/features/configure.prf
+++ b/tools/qmake/mkspecs/features/configure.prf
@@ -28,40 +28,62 @@ defineTest(runConfigure) {
!cross_compile: qtConfig(xcb): REQUIRED_PACKAGES += libdrm xcomposite xcursor xi xrandr xscrnsaver xtst
contains(QT_CONFIG, pulseaudio): REQUIRED_PACKAGES += libpulse
qtConfig(system-png): REQUIRED_PACKAGES += libpng
- qtConfig(system-harfbuzz): REQUIRED_PACKAGES += harfbuzz
+ qtConfig(system-harfbuzz) {
+ packagesExist("\'harfbuzz >= 1.2.0\'"): WEBENGINE_CONFIG += use_system_harfbuzz
+ else: log("System harfbuzz is too old (min. version 1.2). Using Chromium's copy.$${EOL}")
+ }
!cross_compile: REQUIRED_PACKAGES += libpci
for(package, $$list($$REQUIRED_PACKAGES)) {
!packagesExist($$package):skipBuild("Unmet dependency: $$package")
}
- packagesExist(minizip, zlib): WEBENGINE_CONFIG += use_system_minizip
+ packagesExist(minizip, zlib): WEBENGINE_CONFIG += use_system_minizip use_system_zlib
else: log("System zlib or minizip not found. Using Chromium's copies.$${EOL}")
- packagesExist(libwebp,libwebpdemux): WEBENGINE_CONFIG += use_system_libwebp
+ packagesExist(libwebp,libwebpdemux): WEBENGINE_CONFIG += use_system_libwebp use_system_libwebpdemux
else: log("System libwebp or libwebpdemux not found. Using Chromium's copies.$${EOL}")
- packagesExist(libxml-2.0,libxslt): WEBENGINE_CONFIG += use_system_libxslt
+ packagesExist(libxml-2.0,libxslt): WEBENGINE_CONFIG += use_system_libxslt use_system_libxml2
else: log("System libxml2 or libxslt not found. Using Chromium's copies.$${EOL}")
for(package, $$list("libevent jsoncpp opus protobuf")) {
packagesExist($$package): WEBENGINE_CONFIG += use_system_$$package
- else: log("System $$package not found. Using Chromium's copy.$${EOL}")
+ else {
+ log("System $$package not found. Using Chromium's copy.$${EOL}")
+ WEBENGINE_CONFIG += use_bundled_$$package
+ }
}
use?(system_protobuf) {
!system("which protoc > /dev/null") {
log("Protobuf compiler not found. Using Chromium's copy of protobuf.$${EOL}")
WEBENGINE_CONFIG -= use_system_protobuf
+ WEBENGINE_CONFIG += use_bundled_protobuf
}
}
config_libvpx: WEBENGINE_CONFIG += use_system_vpx
- else: log("Compatible system libvpx not found. Using Chromium's copy.$${EOL}")
+ else {
+ log("Compatible system libvpx not found. Using Chromium's copy.$${EOL}")
+ WEBENGINE_CONFIG += use_bundled_libvpx
+ }
config_srtp: WEBENGINE_CONFIG += use_system_libsrtp
- else: log("System libsrtp not found. Using Chromium's copy.$${EOL}")
+ else {
+ log("System libsrtp not found. Using Chromium's copy.$${EOL}")
+ WEBENGINE_CONFIG += use_bundled_srtp
+ }
config_snappy: WEBENGINE_CONFIG += use_system_snappy
- else: log("System snappy not found. Using Chromium's copy.$${EOL}")
+ else {
+ log("System snappy not found. Using Chromium's copy.$${EOL}")
+ WEBENGINE_CONFIG += use_bundled_snappy
+ }
!cross_compile {
packagesExist(nss): WEBENGINE_CONFIG += use_nss
else: log("System NSS not found, BoringSSL will be used.$${EOL}")
}
}
+ isQtMinimum(5, 8) {
+ include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri)
+ QT_FOR_CONFIG += webengine-private
+ qtConfig(proprietary-codecs): WEBENGINE_CONFIG += use_proprietary_codecs
+ qtConfig(spellchecker): WEBENGINE_CONFIG += use_spellchecker
+ }
isEmpty(skipBuildReason): {
cache(CONFIG, add, $$list(webengine_successfully_configured))
@@ -70,61 +92,80 @@ defineTest(runConfigure) {
export(WEBENGINE_CONFIG)
}
}
-}
-# This is called from default_post, at which point we've also parsed
-# command line options
-defineTest(finalizeConfigure) {
- linux {
- use?(nss) {
- log("Certificate handling.............. Using system NSS$${EOL}")
- } else {
- log("Certificate handling.............. Using bundled BoringSSL$${EOL}")
- }
+ unix:!darwin {
+ log("System library dependencies:$${EOL}")
use?(system_icu) {
packagesExist("icu-uc icu-i18n") {
- log("ICU............................... Using system version$${EOL}")
+ log(" ICU ................................ Using system version$${EOL}")
} else {
- log("ICU............................... System ICU not found$${EOL}")
+ log(" ICU ................................ System ICU not found$${EOL}")
skipBuild("Unmet dependencies: icu-uc, icu-i18n")
}
} else {
- log("ICU............................... Using internal copy (Default, force system ICU with WEBENGINE_CONFIG+=use_system_icu)$${EOL}")
+ log(" ICU ................................ Using internal copy (Default, force system ICU with WEBENGINE_CONFIG+=use_system_icu)$${EOL}")
+ WEBENGINE_CONFIG += use_bundled_icu
}
use?(system_ffmpeg) {
packagesExist("libavcodec libavformat libavutil") {
packagesExist("libwebp, libwebpdemux, opus, \'vpx >= 1.4\'"){
- log("FFMPEG............................ Using system version$${EOL}")
+ log(" FFMPEG ............................. Using system version$${EOL}")
} else {
- log("FFMPEG............................ Conflicting FFMPEG dependencies$${EOL}")
+ log(" FFMPEG ............................. Conflicting FFMPEG dependencies$${EOL}")
skipBuild("Unmet dependencies: opus, vpx, libwebp, libwebpdemux")
}
} else {
- log("FFMPEG............................ System FFMPEG not found$${EOL}")
+ log(" FFMPEG ............................. System FFMPEG not found$${EOL}")
skipBuild("Unmet dependencies: libavcodec, libavformat, libavutil")
}
} else {
- log("FFMPEG............................ Using internal copy (Default, force system FFMPEG with WEBENGINE_CONFIG+=use_system_ffmpeg)$${EOL}")
+ log(" FFMPEG ............................. Using internal copy (Default, force system FFMPEG with WEBENGINE_CONFIG+=use_system_ffmpeg)$${EOL}")
+ WEBENGINE_CONFIG += use_bundled_ffmpeg
}
+ for(config, WEBENGINE_CONFIG) {
+ match = $$find(config, "^use_system_")
+ !isEmpty(match) {
+ use_system += $$replace(match, ^use_system_,)
+ }
+ match = $$find(config, "^use_bundled_")
+ !isEmpty(match) {
+ use_bundled += $$replace(match, ^use_bundled_,)
+ }
+ }
+ !isEmpty(use_system): log(" Optional system libraries used ..... $$use_system$${EOL}")
+ !isEmpty(use_bundled): log(" Optional bundled libraries used .... $$use_bundled$${EOL}")
}
+ log("Configurable features:$${EOL}")
use?(proprietary_codecs) {
- log("Proprietary codecs (H264, MP3).... Enabled$${EOL}")
+ log(" Proprietary codecs (H264, MP3) ..... Enabled$${EOL}")
} else {
- log("Proprietary codecs (H264, MP3).... Not enabled (Default, enable with WEBENGINE_CONFIG+=use_proprietary_codecs)$${EOL}")
+ log(" Proprietary codecs (H264, MP3) ..... Not enabled (Default, enable with WEBENGINE_CONFIG+=use_proprietary_codecs)$${EOL}")
}
qtHaveModule(positioning): {
- log("Geolocation....................... Enabled$${EOL}")
+ log(" Geolocation ........................ Enabled$${EOL}")
} else {
- log("Geolocation....................... Not enabled (Requires Qt Positioning module)$${EOL}")
+ log(" Geolocation ........................ Not enabled (Requires Qt Positioning module)$${EOL}")
+ }
+ unix:!darwin {
+ use?(nss) {
+ log(" Certificate handling ............... Using system NSS$${EOL}")
+ } else {
+ log(" Certificate handling ............... Using bundled BoringSSL$${EOL}")
+ }
}
osx {
use?(appstore_compliant_code) {
- log("AppStore Compliant ............... Enabled$${EOL}")
+ log(" Mac App Store Compliant ............ Enabled$${EOL}")
+ } else {
+ log(" Mac App Store Compliant ............ Not enabled (Default, enable with WEBENGINE_CONFIG+=use_appstore_compliant_code)$${EOL}")
+ }
+ use?(native_spellchecker) {
+ log("Native Spellchecker .............. Enabled$${EOL}")
} else {
- log("AppStore Compliant ............... Not enabled (Default, enable with WEBENGINE_CONFIG+=use_appstore_compliant_code)$${EOL}")
+ log("Native Spellchecker .............. Not enabled (Default, enable with WEBENGINE_CONFIG+=use_native_spellchecker)$${EOL}")
}
!isMinOSXSDKVersion(10, 10, 3) {
- log("Force Touch API usage ............ Not enabled (Because the OS X SDK version to be used \"$${WEBENGINE_OSX_SDK_PRODUCT_VERSION}\" is lower than the required \"10.10.3\")$${EOL}")
+ log(" Force Touch API usage .............. Not enabled (Because the OS X SDK version to be used \"$${WEBENGINE_OSX_SDK_PRODUCT_VERSION}\" is lower than the required \"10.10.3\")$${EOL}")
}
}
}
diff --git a/tools/qmake/mkspecs/features/default_post.prf b/tools/qmake/mkspecs/features/default_post.prf
deleted file mode 100644
index 64e8cb1fe..000000000
--- a/tools/qmake/mkspecs/features/default_post.prf
+++ /dev/null
@@ -1,11 +0,0 @@
-load(default_post)
-load(functions)
-
-root_project_file:isPlatformSupported(): finalizeConfigure()
-
-!isEmpty(skipBuildReason) {
- SUBDIRS =
- export(SUBDIRS)
- log($${skipBuildReason}$${EOL})
- log(QtWebEngine will not be built.$${EOL})
-}
diff --git a/tools/qmake/mkspecs/features/default_pre.prf b/tools/qmake/mkspecs/features/default_pre.prf
index 27aded013..77e437bc9 100644
--- a/tools/qmake/mkspecs/features/default_pre.prf
+++ b/tools/qmake/mkspecs/features/default_pre.prf
@@ -1,6 +1,3 @@
-# Resolve root directories for sources
-QTWEBENGINE_ROOT = $$replace(PWD, /tools/qmake/mkspecs/features$,)
-
# We depend on libc++ to build chromium so our macosx-version-min has to be 10.7
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7
@@ -24,14 +21,3 @@ EOL = $$escape_expand(\\n)
# Call the original default_pre.
load(default_pre)
load(functions)
-
-# Check platform support and run config tests early enough to bail
-equals(_PRO_FILE_, "$$QTWEBENGINE_ROOT/qtwebengine.pro"): CONFIG += root_project_file
-
-root_project_file:isPlatformSupported() {
- !exists($$QTWEBENGINE_ROOT/src/3rdparty/chromium) {
- error("Submodule qtwebengine-chromium does not exist. Run 'git submodule update --init'.")
- }
- load(configure)
- runConfigure()
-}
diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf
index d109e2859..6ee9be57d 100644
--- a/tools/qmake/mkspecs/features/functions.prf
+++ b/tools/qmake/mkspecs/features/functions.prf
@@ -43,14 +43,14 @@ defineTest(isPlatformSupported) {
return(false)
}
} else:osx {
- lessThan(QMAKE_XCODE_VERSION, 6.3) {
- skipBuild("Using XCode version $$QMAKE_XCODE_VERSION, but at least version 6.3 is required to build Qt WebEngine.")
+ lessThan(QMAKE_XCODE_VERSION, 5.1) {
+ 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.10 (darwin version 14.0.0) or newer
+ # We require OS X 10.9 (darwin version 13.0.0) or newer
darwin_major_version = $$section(QMAKE_HOST.version, ., 0, 0)
- lessThan(darwin_major_version, 14) {
- skipBuild("Qt WebEngine requires OS X version 10.10 or newer.")
+ lessThan(darwin_major_version, 13) {
+ skipBuild("Qt WebEngine requires OS X version 10.9 or newer.")
return(false)
}
!isMinOSXSDKVersion(10, 10): {
@@ -75,9 +75,20 @@ defineTest(isPlatformSupported) {
return(false)
}
!isPythonVersionSupported(): return(false)
+ !isArchSupported(): return(false)
+ isSanitizerEnabled():!isSanitizerSupported():!forceSanitizerBuild(): return(false)
return(true)
}
+defineTest(isArchSupported) {
+ contains(QT_ARCH, "i386")|contains(QT_ARCH, "x86_64"): return(true)
+ contains(QT_ARCH, "arm")|contains(QT_ARCH, "arm64"): return(true)
+ contains(QT_ARCH, "mips")|contains(QT_ARCH, "mips64"): return(true)
+
+ skipBuild("QtWebEngine can only be built for x86, x86-64, ARM, Aarch64, MIPSel, and MIPS64 architectures.")
+ return(false)
+}
+
defineTest(isPythonVersionSupported) {
python_error_msg = "Python version 2 (2.7.5 or later) is required to build Qt WebEngine."
python_version = $$system('python -c "import sys; print(sys.version_info[0:3])"')
@@ -97,6 +108,106 @@ defineTest(isPythonVersionSupported) {
return(false)
}
+defineTest(isSanitizerEnabled) {
+ sanitize_address|sanitize_memory|sanitize_undefined|sanitize_thread: return(true)
+ return(false)
+}
+
+defineTest(forceSanitizerBuild) {
+ contains(WEBENGINE_CONFIG, force_sanitizer_build): return(true)
+ skipBuild("Chosen sanitizer configuration is not supported. Use WEBENGINE_CONFIG+=force_sanitizer_build to force build with the chosen sanitizer configuration.")
+ return(false)
+}
+
+defineTest(isSanitizerSupported) {
+ sanitizer_combo_supported = true
+ sanitize_address {
+ asan_supported = false
+ linux-clang-libc++:isSanitizerSupportedOnLinux() {
+ asan_supported = true
+ } else:macos:isSanitizerSupportedOnMacOS() {
+ asan_supported = true
+ }
+ !$$asan_supported {
+ sanitizer_combo_supported = false
+ warning("An address sanitizer-enabled Qt WebEngine build can only be built on Linux or macOS using Clang and libc++.")
+ }
+ }
+
+ sanitize_memory {
+ sanitizer_combo_supported = false
+ warning("A memory sanitizer-enabled Qt WebEngine build is not supported.")
+ }
+
+ sanitize_undefined {
+ ubsan_supported = false
+ linux-clang-libc++:isSanitizerSupportedOnLinux():CONFIG(release, debug|release):!debug_and_release {
+ ubsan_supported = true
+ }
+ !$$ubsan_supported {
+ sanitizer_combo_supported = false
+ warning("An undefined behavior sanitizer-enabled Qt WebEngine build can only be built on Linux using Clang and libc++ in release mode.")
+ }
+ }
+
+ sanitize_thread {
+ tsan_supported = false
+ linux-clang-libc++:isSanitizerSupportedOnLinux() {
+ tsan_supported = true
+ }
+ !$$tsan_supported {
+ sanitizer_combo_supported = false
+ warning("A thread sanitizer-enabled Qt WebEngine build can only be built on Linux using Clang and libc++.")
+ }
+ }
+
+ $$sanitizer_combo_supported: return(true)
+ return(false)
+}
+
+defineTest(isSanitizerSupportedOnLinux) {
+ isSanitizerLinuxClangVersionSupported(): return(true)
+ return(false)
+}
+
+defineTest(isSanitizerSupportedOnMacOS) {
+ isEmpty(QT_APPLE_CLANG_MAJOR_VERSION) {
+ QTWEBENGINE_CLANG_IS_APPLE = false
+ } else {
+ QTWEBENGINE_CLANG_IS_APPLE = true
+ }
+ $$QTWEBENGINE_CLANG_IS_APPLE:isSanitizerMacOSAppleClangVersionSupported(): return(true)
+ else:isSanitizerMacOSClangVersionSupported(): return(true)
+ return(false)
+}
+
+defineTest(isSanitizerMacOSAppleClangVersionSupported) {
+ # Clang sanitizer suppression attributes work from Apple Clang version 7.3.0+.
+ greaterThan(QT_APPLE_CLANG_MAJOR_VERSION, 7): return(true)
+ greaterThan(QT_APPLE_CLANG_MINOR_VERSION, 2): return(true)
+
+ warning("Using Apple Clang version $${QT_APPLE_CLANG_MAJOR_VERSION}.$${QT_APPLE_CLANG_MINOR_VERSION}.$${QT_APPLE_CLANG_PATCH_VERSION}, but at least Apple Clang version 7.3.0 is required to build a sanitizer-enabled Qt WebEngine.")
+ return(false)
+}
+
+defineTest(isSanitizerMacOSClangVersionSupported) {
+ # Clang sanitizer suppression attributes work from non-apple Clang version 3.7+.
+ greaterThan(QT_CLANG_MAJOR_VERSION, 3): return(true)
+ greaterThan(QT_CLANG_MINOR_VERSION, 6): return(true)
+
+ warning("Using Clang version $${QT_CLANG_MAJOR_VERSION}.$${QT_CLANG_MINOR_VERSION}, but at least Clang version 3.7 is required to build a sanitizer-enabled Qt WebEngine.")
+ return(false)
+}
+
+defineTest(isSanitizerLinuxClangVersionSupported) {
+ # Clang sanitizer suppression attributes work from Clang version 3.7+.
+ greaterThan(QT_CLANG_MAJOR_VERSION, 3): return(true)
+ greaterThan(QT_CLANG_MINOR_VERSION, 6): return(true)
+
+ warning("Using Clang version $${QT_CLANG_MAJOR_VERSION}.$${QT_CLANG_MINOR_VERSION}, but at least Clang version 3.7 is required to build a sanitizer-enabled Qt WebEngine.")
+ return(false)
+}
+
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)
@@ -264,28 +375,17 @@ defineReplace(findOrBuildNinja) {
!exists($$out) {
src_3rd_party_dir = $$absolute_path("$${getChromiumSrcDir()}/../", "$$QTWEBENGINE_ROOT")
- out = $$shadowed($$absolute_path("ninja/ninja", "$$src_3rd_party_dir"))
+ out = $$shadowed($$absolute_path(ninja/ninja, $$src_3rd_party_dir))
win32: out = $${out}.exe
- out = $$system_path($$out)
# If we did not find ninja, then we bootstrap it.
!exists($$out) {
- # If we are making a shadow build, copy the ninja sources to the build directory.
- !equals(PWD, $${OUT_PWD}) {
- log("Build directory is different from source directory - copying ninja sources to the build tree...")
- shadow_3rd_party_path = $$system_path($$shadowed($$src_3rd_party_dir))
-
- !exists($$dirname(out)): mkpath($$dirname(out))
- copy_dir_files {
- system("$$QMAKE_COPY_DIR $$system_quote($$system_path($$absolute_path("ninja", "$$src_3rd_party_dir"))) $$system_quote($$dirname(out))")
- } else {
- system("$$QMAKE_COPY_DIR $$system_quote($$system_path($$absolute_path("ninja", "$$src_3rd_party_dir"))) $$system_quote($$shadow_3rd_party_path)")
- }
- }
- system("cd $$system_quote($$dirname(out)) && python configure.py --bootstrap")
+ 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")
}
}
- return($$out)
+ return($$system_path($$out))
}
defineTest(skipBuild) {
diff --git a/tools/scripts/take_snapshot.py b/tools/scripts/take_snapshot.py
index 053746f79..316805b6d 100755
--- a/tools/scripts/take_snapshot.py
+++ b/tools/scripts/take_snapshot.py
@@ -44,8 +44,6 @@ os.chdir(qtwebengine_root)
def isInGitBlacklist(file_path):
# We do need all the gyp files.
- if file_path.endswith('.gyp') or file_path.endswith('.gypi') or file_path.endswith('.isolate'):
- False
if ( '.gitignore' in file_path
or '.gitmodules' in file_path
or '.gitattributes' in file_path
@@ -59,6 +57,10 @@ def isInChromiumBlacklist(file_path):
# We do need all the gyp files.
if file_path.endswith('.gyp') or file_path.endswith('.gypi') or file_path.endswith('.isolate'):
return False
+ # We do need all the gn file.
+ if file_path.endswith('.gn') or file_path.endswith('.gni') or file_path.endswith('typemap') or \
+ file_path.endswith('.mojom'):
+ return False
if ( '_jni' in file_path
or 'jni_' in file_path
or 'testdata/' in file_path