[build] Enable Zc:__cplusplus for Windows (#3625)

This makes the version actually be correct.
This commit is contained in:
Thad House
2021-10-11 20:30:22 -07:00
committed by GitHub
parent 791d8354da
commit 4e3fd7d420

View File

@@ -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"
}