Skip to content

Commit

Permalink
[LIBOMPTARGET]Lower priority of global constructor/destructor to sile…
Browse files Browse the repository at this point in the history
…nce the warning from gcc.

Summary: fixed the warning from gcc since prios 0-100 are reserved for the internal use.

Reviewers: grokos

Subscribers: kkwli0, caomhin, openmp-commits

Tags: #openmp

Differential Revision: https://reviews.llvm.org/D75458
  • Loading branch information
alexey-bataev committed Mar 2, 2020
1 parent 1bacdcf commit c4a9d97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openmp/libomptarget/src/rtl.cpp
Expand Up @@ -37,7 +37,7 @@ std::mutex *TrlTblMtx;
HostPtrToTableMapTy *HostPtrToTableMap;
std::mutex *TblMapMtx;

__attribute__((constructor(0))) void init() {
__attribute__((constructor(101))) void init() {
DP("Init target library!\n");
RTLs = new RTLsTy();
RTLsMtx = new std::mutex();
Expand All @@ -47,7 +47,7 @@ __attribute__((constructor(0))) void init() {
TblMapMtx = new std::mutex();
}

__attribute__((destructor(0))) void deinit() {
__attribute__((destructor(101))) void deinit() {
DP("Deinit target library!\n");
delete RTLs;
delete RTLsMtx;
Expand Down

0 comments on commit c4a9d97

Please sign in to comment.