From 4e3fd7d4208862891bd1684e2e3b7df95a280cb0 Mon Sep 17 00:00:00 2001 From: Thad House Date: Mon, 11 Oct 2021 20:30:22 -0700 Subject: [PATCH] [build] Enable Zc:__cplusplus for Windows (#3625) This makes the version actually be correct. --- shared/config.gradle | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/shared/config.gradle b/shared/config.gradle index 4243a2b1a1..b9fe5c0cae 100644 --- a/shared/config.gradle +++ b/shared/config.gradle @@ -27,8 +27,11 @@ nativeUtils.setSinglePrintPerPlatform() nativeUtils.enableSourceLink() nativeUtils.platformConfigs.each { - if (it.name.contains('windows')) return - it.linker.args << '-Wl,-rpath,\'$ORIGIN\'' + if (it.name.contains('windows')) { + it.cppCompiler.args.add("/Zc:__cplusplus") + return + } + it.linker.args << '-Wl,-rpath,\'$ORIGIN\'' if (it.name == 'osxx86-64') { it.linker.args << "-headerpad_max_install_names" }