From 53a7d121e3277be886a4c66e648edceb26a6f6cc Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Wed, 13 Oct 2021 16:33:03 +0200 Subject: Add switch for static and dynamic crt Task-number: QTBUG-94046 Change-Id: I04f3ae2e05413dc34e87358cd60b359dedba3552 Reviewed-by: Allan Sandfeld Jensen --- chromium/build/config/win/BUILD.gn | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/chromium/build/config/win/BUILD.gn b/chromium/build/config/win/BUILD.gn index 2c7f785a34f..976fa426104 100644 --- a/chromium/build/config/win/BUILD.gn +++ b/chromium/build/config/win/BUILD.gn @@ -48,6 +48,8 @@ declare_args() { # This requires updated debugging and profiling tools which are not widely # distributed yet which is why it is currently opt-in. use_large_pdbs = false + + qt_uses_static_runtime = false } # This is included by reference in the //build/config/compiler config that @@ -495,7 +497,12 @@ config("default_crt") { # Component mode: dynamic CRT. Since the library is shared, it requires # exceptions or will give errors about things not matching, so keep # exceptions on. - configs = [ ":dynamic_crt" ] + if (qt_uses_static_runtime) { + # we always do is_shared, however qt can link final lib as static, with static runtime + configs = [ ":static_crt" ] + } else { + configs = [ ":dynamic_crt" ] + } } else { if (current_os == "winuwp") { # https://blogs.msdn.microsoft.com/vcblog/2014/06/10/the-great-c-runtime-crt-refactoring/ -- cgit v1.2.1