mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 08:53:55 +08:00
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. - Due to conflict, do not automatically append source path when CMC compiler is used. - Minor code refactor: use defined compiler options instead of local strings; wrap filename in quotes (in case of space-separated filename string). Related-To: NEO-7285 Signed-off-by: Kacper Nowak kacper.nowak@intel.com
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
66f5af0fec
commit
65f7ff2027
@@ -616,6 +616,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) && false == CompilerOptions::contains(options, CompilerOptions::useCMCompiler)) {
|
||||
auto sourcePathStringOption = CompilerOptions::generateSourcePath.str();
|
||||
sourcePathStringOption.append(" ");
|
||||
sourcePathStringOption.append(CompilerOptions::wrapInQuotes(inputFile));
|
||||
options = CompilerOptions::concatenate(options, sourcePathStringOption);
|
||||
}
|
||||
}
|
||||
|
||||
if (deviceName.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user