Skip to content

Commit 370c7d6

Browse files
committed
Move check to PluginManager::init
1 parent 9ff4b28 commit 370c7d6

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

offload/libomptarget/OffloadRTL.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ void initRuntime() {
4040
llvm::omp::target::ompt::connectLibrary();
4141
#endif
4242

43-
if (OffloadPolicy::isOffloadDisabled()) {
44-
DP("Offload is disabled. Skipping plugin initialization\n");
45-
return;
46-
}
4743
PM->init();
4844
PM->registerDelayedLibraries();
4945
}

offload/libomptarget/PluginManager.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ PluginManager *PM = nullptr;
3030

3131
void PluginManager::init() {
3232
TIMESCOPE();
33+
if (OffloadPolicy::isOffloadDisabled()) {
34+
DP("Offload is disabled. Skipping plugin initialization\n");
35+
return;
36+
}
37+
3338
DP("Loading RTLs...\n");
3439

3540
// Attempt to create an instance of each supported plugin.

0 commit comments

Comments
 (0)