Skip to content

Commit

Permalink
meson: Fix MSVC build post #1742 by ensuring it's set to standards co…
Browse files Browse the repository at this point in the history
…mpliant mode
  • Loading branch information
amyspark authored and dragonmux committed Jan 27, 2024
1 parent edcc5dd commit 52c0516
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/platforms/hosted/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ bmda_deps = []

cc = is_cross_build ? cc_native : cc_host

# Ensure that MSVC is switched to standards compliant mode
if cc.get_define('_MSC_VER') != ''
standards_flags = [
'/Zc:__STDC__',
'/D_CRT_DECLARE_NONSTDC_NAMES=1'
]

bmda_args += cc.get_supported_arguments(standards_flags)
endif

# Determine if we're on a MSYS2 environment of some kind
# If the compiler is MSYS2 GCC or Clang (but not Clang-cl)
if build_machine.system() == 'windows' and cc.get_define('__MINGW32__') == '1'
Expand Down

0 comments on commit 52c0516

Please sign in to comment.