Avoid MSVC warning D9025 when pdf_use_cxx20=false When using MSVC and pdf_use_cxx20=false, we currently get lots of D9025 warnings because we pass both the /std:c++20 and /std:c++17 options. We can avoid this warning by using the //build/config/compiler config's "msvc_use_cxx17" variable when using MSVC (is_win && !is_clang), instead of PDFium's //build_overrides/compiler:force_cxx17 config. Bug: pdfium:1932 Change-Id: Ic42e76378acade2bf2baf472f076c7033fb1e50d Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/102350 Commit-Queue: K. Moon <kmoon@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Auto-Submit: K. Moon <kmoon@chromium.org>
diff --git a/build_overrides/BUILDCONFIG.gn b/build_overrides/BUILDCONFIG.gn index c425b91..dce6fba 100644 --- a/build_overrides/BUILDCONFIG.gn +++ b/build_overrides/BUILDCONFIG.gn
@@ -404,7 +404,11 @@ # ============================================================================= import("//pdfium.gni") if (!pdf_use_cxx20) { - default_compiler_configs += [ "//build_overrides/compiler:force_cxx17" ] + if (is_win && !is_clang) { + msvc_use_cxx17 = true + } else { + default_compiler_configs += [ "//build_overrides/compiler:force_cxx17" ] + } } # =============================================================================