Skip to content

Commit 7be3166

Browse files
author
Hugh Delaney
committed
Use autogenerated tools
1 parent 5a4317e commit 7be3166

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

scripts/templates/libapi.cpp.mako

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,11 @@ try {
8282

8383
%endfor
8484
%endfor
85+
86+
// This uselessFunc is needed to ensure that pthread is linked correctly against
87+
// ur_loader.so for gcc-9
88+
void uselessFunc() {
89+
std::thread UselessThread([]{});
90+
}
91+
8592
} // extern "C"

source/loader/ur_libapi.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7743,8 +7743,10 @@ ur_result_t UR_APICALL urUsmP2PPeerAccessGetInfoExp(
77437743
return exceptionToResult(std::current_exception());
77447744
}
77457745

7746+
// This uselessFunc is needed to ensure that pthread is linked correctly against
7747+
// ur_loader.so for gcc-9
77467748
void uselessFunc() {
7747-
std::thread NullThread([](){});
7749+
std::thread UselessThread([] {});
77487750
}
77497751

77507752
} // extern "C"

0 commit comments

Comments
 (0)