mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 01:35:20 +08:00
fix: Disable compiler cache if any IGC_ env is set
Related-To: NEO-12721 Signed-off-by: Aleksandra Nizio <aleksandra.nizio@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
689839143c
commit
6975f7bb8d
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2023-2024 Intel Corporation
|
||||
* Copyright (C) 2023-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -14,8 +14,10 @@
|
||||
|
||||
#include "os_inc.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <dlfcn.h>
|
||||
#include <link.h>
|
||||
#include <unistd.h>
|
||||
|
||||
namespace NEO {
|
||||
bool createCompilerCachePath(std::string &cacheDir) {
|
||||
@@ -81,4 +83,14 @@ size_t getFileSize(const std::string &path) {
|
||||
}
|
||||
return 0u;
|
||||
}
|
||||
|
||||
bool isAnyIgcEnvVarSet() {
|
||||
char **envp = NEO::SysCalls::getEnviron();
|
||||
for (int i = 0; envp && envp[i] != nullptr; i++) {
|
||||
if (strncmp(envp[i], "IGC_", 4) == 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
} // namespace NEO
|
||||
Reference in New Issue
Block a user