fix: fatbinary generation with "-out_dir"

Directories are created if needed before generating fatbinary.

Related-To: NEO-11500

Signed-off-by: Oskar Hubert Weber <oskar.hubert.weber@intel.com>
This commit is contained in:
Oskar Hubert Weber
2024-07-01 12:10:27 +00:00
committed by Compute-Runtime-Automation
parent aed96cede4
commit a7ddf7848b
3 changed files with 34 additions and 6 deletions

View File

@@ -20,6 +20,7 @@
#include "shared/source/helpers/file_io.h"
#include "shared/source/helpers/hw_info.h"
#include "shared/source/helpers/product_config_helper.h"
#include "shared/source/utilities/directory.h"
#include "igfxfmid.h"
#include "platforms.h"
@@ -424,14 +425,15 @@ int buildFatBinary(const std::vector<std::string> &args, OclocArgHelper *argHelp
std::string fatbinaryFileName = "";
if (false == outputDirectory.empty()) {
if (!outputDirectory.empty()) {
fatbinaryFileName = outputDirectory + "/";
NEO::Directory::getDirectories(outputDirectory, NEO::Directory::createDirs);
}
if (false == outputFileName.empty()) {
if (!outputFileName.empty()) {
fatbinaryFileName += outputFileName;
} else {
if (false == inputFileName.empty()) {
if (!inputFileName.empty()) {
fatbinaryFileName += OfflineCompiler::getFileNameTrunk(inputFileName) + ".ar";
}
}