Skip to content

Commit e203968

Browse files
authored
[Libomptarget] Do not abort on failed plugin init (#77623)
Summary: The current code logic is supposed to skip plugins that aren't found or could not be loaded. However, the plugic ontained a call to `abort` if it failed, which prevented us from continuing if initilalization the plugin failed (such as if `dlopen` failed for the dyanmic plugins).
1 parent 2c60d59 commit e203968

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

openmp/libomptarget/plugins-nextgen/common/src/PluginInterface.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,8 +1662,8 @@ extern "C" {
16621662
int32_t __tgt_rtl_init_plugin() {
16631663
auto Err = Plugin::initIfNeeded();
16641664
if (Err) {
1665-
REPORT("Failure to initialize plugin " GETNAME(TARGET_NAME) ": %s\n",
1666-
toString(std::move(Err)).data());
1665+
[[maybe_unused]] std::string ErrStr = toString(std::move(Err));
1666+
DP("Failed to init plugin: %s", ErrStr.c_str());
16671667
return OFFLOAD_FAIL;
16681668
}
16691669

0 commit comments

Comments
 (0)