diff options
author | Linus Jahn <lnj@kaidan.im> | 2019-12-13 21:19:26 +0100 |
---|---|---|
committer | Linus Jahn <lnj@kaidan.im> | 2020-07-31 15:05:24 +0200 |
commit | c19bafc60c1c2e9a73cb3d212293462a1be4eb47 (patch) | |
tree | 089269cabcc8b75832a6ce3cff8ec5e4020b0de0 /src/corelib/configure.json | |
parent | 5d69aa3ee1214cf689e2357bff8688f2ff138471 (diff) |
QtCore: Use system-wide libb2 if present
This adds the option to build Qt with libb2, which is especially
recommended, if you care about the performance of the BLAKE2 hashing
algorithms. The bundled version is the pure reference C implementation
of BLAKE2, while libb2 has many additional hardware optimizations.
However, the API of both is the same, so no changes to the code were
necessary here.
Change-Id: I3563982f4e07be300291fe103c38b16a404b3ebb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/corelib/configure.json')
-rw-r--r-- | src/corelib/configure.json | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/corelib/configure.json b/src/corelib/configure.json index 2610392ad1..966bc7684a 100644 --- a/src/corelib/configure.json +++ b/src/corelib/configure.json @@ -10,6 +10,7 @@ "icu": "boolean", "inotify": "boolean", "journald": "boolean", + "libb2": { "type": "enum", "values": [ "no", "qt", "system" ] }, "mimetype-database": "boolean", "pcre": { "type": "enum", "values": [ "no", "qt", "system" ] }, "posix-ipc": { "type": "boolean", "name": "ipc_posix" }, @@ -111,6 +112,16 @@ "-latomic" ] }, + "libb2": { + "label": "libb2", + "test": { + "main": "BLAKE2B_BLOCKBYTES;" + }, + "headers": "blake2.h", + "sources": [ + { "type": "pkgConfig", "args": "libb2" } + ] + }, "librt": { "label": "clock_gettime()", "test": { @@ -647,6 +658,14 @@ "condition": "libs.journald", "output": [ "privateFeature" ] }, + "system-libb2": { + "label": "Using system libb2", + "comment": "Used by QCryptographicHash for the BLAKE2 hashing algorithms", + "disable": "input.libb2 == 'no' || input.libb2 == 'qt'", + "enable": "input.libb2 == 'system'", + "condition": "libs.libb2", + "output": [ "privateFeature" ] + }, "linkat": { "label": "linkat()", "comment": "Currently only used by QTemporaryFile; linkat() exists on Android, but hardlink creation fails due to security rules", @@ -1074,6 +1093,7 @@ Note that this is required for plugin loading. Qt GUI needs QPA plugins for basi "system-doubleconversion", "glib", "icu", + "system-libb2", "mimetype-database", { "message": "Tracing backend", |