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:
Aleksandra Nizio
2025-07-07 08:43:54 +00:00
committed by Compute-Runtime-Automation
parent 689839143c
commit 6975f7bb8d
13 changed files with 176 additions and 11 deletions

View File

@@ -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