SWDEV-485042 - Remove -I option passed into comgr when file type is not FILE_TYPE_ASM_TEXT

Change-Id: If8e469f881651f7b3dae364e8182ef1ba6f3a0d1


[ROCm/clr commit: ca35d93672]
This commit is contained in:
victzhan
2025-01-14 15:59:21 -05:00
committed by Victor Zhang
parent eb77b9aba6
commit 7cd780c1cb
+14 -2
View File
@@ -1227,8 +1227,20 @@ bool Program::linkImplLC(amd::option::Options* options) {
codegenOptions.push_back(optLevel.str());
// Pass clang options
codegenOptions.insert(codegenOptions.end(),
options->clangOptions.begin(), options->clangOptions.end());
if (continueCompileFrom != FILE_TYPE_ASM_TEXT) {
std::copy_if(
options->clangOptions.begin(),
options->clangOptions.end(),
std::back_inserter(codegenOptions),
[](const std::string& opt) {
return opt.rfind("-I", 0) != 0;
}
);
} else {
codegenOptions.insert(codegenOptions.end(),
options->clangOptions.begin(),
options->clangOptions.end());
}
// Temporarily disable problematic pass for some Adobe apps.
{