SWDEV-252745 - Guard PCH code behind __HIP_ENABLE_PCH macro

Change-Id: I12425b9d44b3d92f9cacceb797a5d09d99e4156b


[ROCm/clr commit: 9f84ea96be]
This commit is contained in:
Vladislav Sytchenko
2021-02-10 10:23:27 -05:00
committed by Jatin Chaudhary
parent f3369ee1d8
commit 69e9b5c0ee
+2 -6
View File
@@ -152,6 +152,7 @@ static void transformOptions(std::vector<const char*>& options, amd::Program* pr
std::vector<const char*> t_option;
for (auto& i : options) {
std::string t_str(i);
#ifdef __HIP_ENABLE_PCH
// Use precompiled header for hip
if (t_str == "-hip-pch") {
const char* pch = nullptr;
@@ -160,12 +161,7 @@ static void transformOptions(std::vector<const char*>& options, amd::Program* pr
program->addPreCompiledHeader(std::string(pch, pch_size));
i = "-nogpuinc";
}
// To maintain compatibility with nvrtc
if (t_str.find("--gpu-architecture=") != std::string::npos) {
auto value = getValueOf(t_str);
std::string newValue = "--offload-arch=" + value;
i = newValue.c_str();
}
#endif
}
}