diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2018-10-12 17:00:42 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2018-10-15 09:17:04 +0000 |
commit | 922a363fb43fbedc37de7c0ffa8b937e1b12a800 (patch) | |
tree | 72f10968f065e961ac40f53707fb3d4b6eeae4d9 /src/libs | |
parent | fdde4529e8918defd6b90e38bb50c67b9650304d (diff) | |
download | qt-creator-922a363fb43fbedc37de7c0ffa8b937e1b12a800.tar.gz |
Botan: Enable optimizations in release mode
Because we override the cxx flags manually to silence some warnings, we
have to pass the -O flag too.
On my machine, this results in a speed-up of factor four when uplading
via SFTP.
Change-Id: I3279f0cc95624530fdb5b7ea868a8a51962fb4f8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/libs')
-rw-r--r-- | src/libs/botan/botan.pro | 9 | ||||
-rw-r--r-- | src/libs/botan/botan.qbs | 6 |
2 files changed, 11 insertions, 4 deletions
diff --git a/src/libs/botan/botan.pro b/src/libs/botan/botan.pro index ed5542a6f2..0f2f18b181 100644 --- a/src/libs/botan/botan.pro +++ b/src/libs/botan/botan.pro @@ -33,9 +33,14 @@ msvc: BOTAN_CXX_FLAGS += /wd4100 /wd4800 /wd4127 /wd4244 /wd4250 /wd4267 /wd4334 else: BOTAN_CXX_FLAGS += -Wno-unused-parameter macos: BOTAN_CXX_FLAGS += -mmacosx-version-min=$$QMAKE_MACOSX_DEPLOYMENT_TARGET -isysroot $$shell_quote($$QMAKE_MAC_SDK_PATH) unix: BOTAN_CXX_FLAGS += -fPIC -!isEmpty(BOTAN_CXX_FLAGS): OTHER_FLAGS += --cxxflags=$$shell_quote($$BOTAN_CXX_FLAGS) win32: OTHER_FLAGS += --link-method=hardlink -CONFIG(debug, debug|release): OTHER_FLAGS += --debug-mode +CONFIG(debug, debug|release) { + OTHER_FLAGS += --with-debug-info +} else { + msvc: BOTAN_CXX_FLAGS += /O2 + else: BOTAN_CXX_FLAGS += -O3 +} +!isEmpty(BOTAN_CXX_FLAGS): OTHER_FLAGS += --cxxflags=$$shell_quote($$BOTAN_CXX_FLAGS) CONFIGURE_FILE_PATH_FOR_SHELL = $$shell_quote($$shell_path($$BOTAN_SOURCE_DIR/configure.py)) configure_inputs = $$BOTAN_SOURCE_DIR/configure.py diff --git a/src/libs/botan/botan.qbs b/src/libs/botan/botan.qbs index e6a7369f36..004cdc2f2c 100644 --- a/src/libs/botan/botan.qbs +++ b/src/libs/botan/botan.qbs @@ -42,7 +42,8 @@ Product { + "sha2_32,sha2_32_x86,sha2_64,simd,system_rng,emsa_pkcs1,pbes2,pbkdf2"; args.push("--enable-modules=" + modules); var cxxFlags = []; - if (product.qbs.toolchain.contains("msvc")) { + var tc = product.qbs.toolchain; + if (tc.contains("msvc")) { cxxFlags.push("/wd4100", "/wd4800", "/wd4127", "/wd4244", "/wd4250", "/wd4267", "/wd4334", "/wd4702", "/wd4996", "/D_ENABLE_EXTENDED_ALIGNED_STORAGE"); } @@ -55,10 +56,11 @@ Product { } if (product.qbs.targetOS.contains("unix")) cxxFlags.push("-fPIC"); + if (product.qbs.buildVariant === "release") + cxxFlags.push(tc.contains("msvc") ? "/O2" : "-O3"); if (cxxFlags.length > 0) args.push("--cxxflags=" + cxxFlags.join(" ")); var ccOption = "--cc="; - var tc = product.qbs.toolchain; if (tc.contains("msvc")) ccOption += "msvc"; else if (tc.contains("clang")) |