fix: running Blender with SYSMAN enabled on Linux

Related-To: NEO-11618

Signed-off-by: Oskar Hubert Weber <oskar.hubert.weber@intel.com>
This commit is contained in:
Oskar Hubert Weber
2024-10-14 11:32:32 +00:00
committed by Compute-Runtime-Automation
parent 5adfaa0380
commit 8527779778
20 changed files with 170 additions and 19 deletions

View File

@@ -43,6 +43,8 @@ OsLibrary::OsLibrary(const std::string &name, std::string *errorValue) {
auto dlopenFlag = RTLD_LAZY | RTLD_DEEPBIND;
/* Background: https://github.com/intel/compute-runtime/issues/122 */
#endif
dlopenFlag = OsLibrary::loadFlagsOverwrite ? *OsLibrary::loadFlagsOverwrite : dlopenFlag;
OsLibrary::loadFlagsOverwrite = nullptr;
adjustLibraryFlags(dlopenFlag);
this->handle = SysCalls::dlopen(name.c_str(), dlopenFlag);
if (!this->handle && (errorValue != nullptr)) {

View File

@@ -8,6 +8,8 @@
#include "shared/source/os_interface/os_library.h"
namespace NEO {
const int *OsLibrary::loadFlagsOverwrite = nullptr;
decltype(&OsLibrary::load) OsLibrary::loadFunc = OsLibrary::load;
} // namespace NEO

View File

@@ -31,6 +31,8 @@ class OsLibrary {
public:
virtual ~OsLibrary() = default;
static const int *loadFlagsOverwrite;
static decltype(&OsLibrary::load) loadFunc;
static OsLibrary *loadAndCaptureError(const std::string &name, std::string *errorValue);
static const std::string createFullSystemPath(const std::string &name);