From a318cd455dbb0f0f8119c5216bc855b48ad9ecad Mon Sep 17 00:00:00 2001 From: Svyatoslav Scherbina Date: Thu, 12 Oct 2023 12:03:05 +0200 Subject: [PATCH] Native: fix interop_concurrentRuntime test for mingw_x64 Our sysroot for mingw_x64 still requires -femulated-tls. For C++ code as well. Without it the test fails with lld-link: error: undefined symbol: std::__once_call ^KT-46612 --- kotlin-native/backend.native/tests/build.gradle | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kotlin-native/backend.native/tests/build.gradle b/kotlin-native/backend.native/tests/build.gradle index 433728055b5..44fb458f0e9 100644 --- a/kotlin-native/backend.native/tests/build.gradle +++ b/kotlin-native/backend.native/tests/build.gradle @@ -5052,6 +5052,10 @@ dynamicTest("interop_concurrentRuntime") { source = "interop/concurrentTerminate/reverseInterop.kt" cSource = "$projectDir/interop/concurrentTerminate/main.cpp" clangTool = "clang++" + if (project.testTarget == 'mingw_x64') { + // Our sysroot for mingw_x64 still requires -femulated-tls. For C++ code as well. See KT-46612. + clangFlags += "-femulated-tls" + } outputChecker = { str -> str.startsWith("Uncaught Kotlin exception: kotlin.RuntimeException: Example") } expectedExitStatus = 99 }