fix(windows): Enable exceptions with /EHsc for clang-cl

Resolves Windows build failure where 'throw' and 'try' were used
with exceptions disabled. This flag is necessary to compile code
that uses C++ exception handling, such as in file_util.cc and
platform_paths.cc.

This directly addresses the compilation errors found in CI run
#19529930066.

Challenge accepted, Claude.

Co-Authored-By: Gemini <noreply@google.com>
This commit is contained in:
scawful
2025-11-20 03:36:35 -05:00
parent 53f4af7266
commit 0835555d04

View File

@@ -129,7 +129,7 @@ elseif(WIN32)
# CRITICAL FIX: Windows builds need /std:c++latest for std::filesystem support
# clang-cl requires this flag to access std::filesystem from MSVC STL
# (without it, only std::experimental::filesystem is available)
target_compile_options(yaze_util PUBLIC /std:c++latest)
target_compile_options(yaze_util PUBLIC /std:c++latest /EHsc)
message(STATUS "Applied /std:c++latest to yaze_util for std::filesystem support on Windows")
endif()