Disable running checkers by default (#4644)

* Make checkers be disabled by default

* Allow running checkers in test launcher
This commit is contained in:
Alexander Shabalin
2021-01-22 12:23:53 +03:00
committed by Nikolay Krasko
parent 71f44dce0f
commit 77e2b9f9a0
22 changed files with 82 additions and 76 deletions
@@ -1,5 +1,7 @@
package knlibrary
import kotlin.native.Platform
// The following 2 singletons are unused. However, since we are generating C bindings for them,
// they should be marked as used, so that the code generator emits their deinitialization.
@@ -8,3 +10,7 @@ object A {}
class B {
companion object {}
}
fun enableMemoryChecker() {
Platform.isMemoryLeakCheckerActive = true
}
@@ -6,6 +6,8 @@ int main() {
auto t = std::thread([] {
auto lib = testlib_symbols();
lib->kotlin.root.knlibrary.enableMemoryChecker();
// Initialize A and B.Companion and get their stable pointers.
auto a = lib->kotlin.root.knlibrary.A._instance();
auto bCompanion = lib->kotlin.root.knlibrary.B.Companion._instance();