mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +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. Related-To: NEO-7285 Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
710c8cf5ef
commit
301be3c21b
@@ -30,6 +30,11 @@ bool contains(const std::string &options, ConstStringRef optionToFind) {
|
||||
return contains(options.c_str(), optionToFind);
|
||||
}
|
||||
|
||||
std::string wrapInQuotes(const std::string &stringToWrap) {
|
||||
std::string quoteEscape{"\""};
|
||||
return std::string{quoteEscape + stringToWrap + quoteEscape};
|
||||
}
|
||||
|
||||
TokenizedString tokenize(ConstStringRef src, char sperator) {
|
||||
TokenizedString ret;
|
||||
const char *it = src.begin();
|
||||
|
||||
@@ -29,6 +29,7 @@ constexpr ConstStringRef fastRelaxedMath = "-cl-fast-relaxed-math";
|
||||
constexpr ConstStringRef preserveVec3Type = "-fpreserve-vec3-type";
|
||||
constexpr ConstStringRef createLibrary = "-create-library";
|
||||
constexpr ConstStringRef generateDebugInfo = "-g";
|
||||
constexpr ConstStringRef generateSourcePath = "-s";
|
||||
constexpr ConstStringRef bindlessMode = "-cl-intel-use-bindless-mode -cl-intel-use-bindless-advanced-mode";
|
||||
constexpr ConstStringRef uniformWorkgroupSize = "-cl-uniform-work-group-size";
|
||||
constexpr ConstStringRef forceEmuInt32DivRem = "-cl-intel-force-emu-int32divrem";
|
||||
@@ -176,6 +177,8 @@ bool contains(const char *options, ConstStringRef optionToFind);
|
||||
|
||||
bool contains(const std::string &options, ConstStringRef optionToFind);
|
||||
|
||||
std::string wrapInQuotes(const std::string &stringToWrap);
|
||||
|
||||
using TokenizedString = StackVec<ConstStringRef, 32>;
|
||||
TokenizedString tokenize(ConstStringRef src, char sperator = ' ');
|
||||
} // namespace CompilerOptions
|
||||
|
||||
Reference in New Issue
Block a user