diff --git a/src/libs/botan/botan.pro b/src/libs/botan/botan.pro index ed5542a6f27..0f2f18b1812 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 e6a7369f368..004cdc2f2cd 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"))