Ocloc: Add -s to options string for non-spirv input with -g option passed

Automatically add "-s" (source path) option if -g flag is present.
This applies only to non-spirv input.
Related-To: NEO-7285
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
This commit is contained in:
Kacper Nowak
2022-08-29 13:01:10 +00:00
committed by Compute-Runtime-Automation
parent 710c8cf5ef
commit 301be3c21b
4 changed files with 109 additions and 0 deletions

View File

@@ -576,6 +576,12 @@ int OfflineCompiler::initialize(size_t numArgs, const std::vector<std::string> &
if (hwInfo.platform.eRenderCoreFamily >= IGFX_GEN9_CORE) {
internalOptions = CompilerOptions::concatenate(internalOptions, CompilerOptions::debugKernelEnable);
}
if (false == inputFileSpirV && false == CompilerOptions::contains(options, CompilerOptions::generateSourcePath)) {
auto sourcePathStringOption = CompilerOptions::generateSourcePath.str();
sourcePathStringOption.append(" ");
sourcePathStringOption.append(CompilerOptions::wrapInQuotes(inputFile));
options = CompilerOptions::concatenate(options, sourcePathStringOption);
}
}
if (deviceName.empty()) {