Skip to content

Commit 082a487

Browse files
authored
[offload] Add early exit on plugin deinit when offloading is disabled (llvm#1451)
2 parents 7434b7a + d585681 commit 082a487

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

offload/libomptarget/PluginManager.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ void PluginManager::init() {
6363

6464
void PluginManager::deinit() {
6565
TIMESCOPE();
66+
if (OffloadPolicy::isOffloadDisabled()) {
67+
DP("Offload is disabled. Skipping plugin deinitialization\n");
68+
return;
69+
}
6670
DP("Unloading RTLs...\n");
6771

6872
#ifdef OMPT_SUPPORT

0 commit comments

Comments
 (0)