From 64ca8565add50e3090ae048d9984db5ca6fca8c1 Mon Sep 17 00:00:00 2001 From: John Tennant Date: Mon, 27 Jul 2026 21:37:20 -0400 Subject: [PATCH] fix(build): report C++ standard correctly on MSVC Signed-off-by: John Tennant --- .cargo/config.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.cargo/config.toml b/.cargo/config.toml index d42c757d3..594c7b357 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -9,3 +9,10 @@ debug = "line-tables-only" # cmake_minimum_required < 3.5; audiopus_sys's vendored opus declares 3.1. # Same workaround CI uses. A value already set in the environment wins. CMAKE_POLICY_VERSION_MINIMUM = "3.5" + +# MSVC otherwise reports the legacy C++98 value for `__cplusplus`, even when +# cc-rs selects C++14. sstretch uses that macro to gate its C++11 +# `std::make_unique` polyfill, which collides with the MSVC standard library. +# Match sherpa-onnx's static MSVC runtime so both native audio libraries can +# link into the same Tauri binary without LNK2038 RuntimeLibrary mismatches. +CXXFLAGS_x86_64_pc_windows_msvc = "/Zc:__cplusplus /MT"