diff options
Diffstat (limited to 'openmp/libomptarget/src/rtl.cpp')
-rw-r--r-- | openmp/libomptarget/src/rtl.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/openmp/libomptarget/src/rtl.cpp b/openmp/libomptarget/src/rtl.cpp index 9c7cc355d054..5360d9784cb6 100644 --- a/openmp/libomptarget/src/rtl.cpp +++ b/openmp/libomptarget/src/rtl.cpp @@ -43,6 +43,10 @@ PluginManager *PM; static char *ProfileTraceFile = nullptr; +#ifdef OMPT_SUPPORT +extern void InitOmptLibomp(); +#endif + __attribute__((constructor(101))) void init() { DP("Init target library!\n"); @@ -65,6 +69,11 @@ __attribute__((constructor(101))) void init() { if (ProfileTraceFile) timeTraceProfilerInitialize(500 /* us */, "libomptarget"); + #ifdef OMPT_SUPPORT + // Initialize OMPT first + InitOmptLibomp(); + #endif + PM->RTLs.loadRTLs(); PM->registerDelayedLibraries(); } |