From 807904d9515e9d2aaf16f6260945a6632689f1b9 Mon Sep 17 00:00:00 2001 From: Mikael Hermansson Date: Mon, 19 Aug 2024 14:25:39 +0200 Subject: [PATCH] Enable standards conformance for MSVC --- SConstruct | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SConstruct b/SConstruct index 0ae8f1a3872..599db4b8deb 100644 --- a/SConstruct +++ b/SConstruct @@ -773,6 +773,10 @@ else: # MSVC doesn't have clear C standard support, /std only covers C++. # We apply it to CCFLAGS (both C and C++ code) in case it impacts C features. env.Prepend(CCFLAGS=["/std:c++17"]) + # MSVC is non-conforming with the C++ standard by default, so we enable more conformance. + # Note that this is still not complete conformance, as certain Windows-related headers + # don't compile under complete conformance. + env.Prepend(CCFLAGS=["/permissive-"]) # Disable exception handling. Godot doesn't use exceptions anywhere, and this # saves around 20% of binary size and very significant build time (GH-80513).