diff --git a/src/codegen.cpp b/src/codegen.cpp index 9a73806f9b148..2e7523888d2ca 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -9433,6 +9433,8 @@ extern "C" JL_DLLEXPORT_CODEGEN void jl_teardown_codegen_impl() JL_NOTSAFEPOINT if (jl_ExecutionEngine) jl_ExecutionEngine->printTimers(); PrintStatistics(); + JL_LOCK(&jl_codegen_lock); // TODO: If this lock gets removed reconsider + // LLVM global state/destructors (maybe a rwlock) } // the rest of this file are convenience functions