From c23923ff47f5c6515a8d09ff4c3a5f1d4354ef66 Mon Sep 17 00:00:00 2001
From: foreman
Date: Fri, 13 Dec 2019 18:10:44 -0500
Subject: [PATCH] P4 to Git Change 2045906 by gandryey@gera-win10 on 2019/12/13
18:00:26
SWDEV-197836 - Drop the use of llvm header files in opencl runtime
- Fix compilation error with configurations where COMGR disabled.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.cpp#75 edit
---
rocclr/runtime/device/devprogram.cpp | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/rocclr/runtime/device/devprogram.cpp b/rocclr/runtime/device/devprogram.cpp
index 5a08b9e8eb..0cc7330a3a 100644
--- a/rocclr/runtime/device/devprogram.cpp
+++ b/rocclr/runtime/device/devprogram.cpp
@@ -869,10 +869,9 @@ bool Program::linkImpl(const std::vector& inputPrograms,
}
// ================================================================================================
-#if defined(USE_COMGR_LIBRARY)
bool Program::linkImplLC(const std::vector& inputPrograms,
amd::option::Options* options, bool createLibrary) {
-
+#if defined(USE_COMGR_LIBRARY)
amd_comgr_data_set_t inputs;
if (amd::Comgr::create_data_set(&inputs) != AMD_COMGR_STATUS_SUCCESS) {
@@ -972,8 +971,10 @@ bool Program::linkImplLC(const std::vector& inputPrograms,
}
return linkImpl(options);
+#else // defined(USE_COMGR_LIBRARY)
+ return false;
+#endif // defined(USE_COMGR_LIBRARY)
}
-#endif // defined(USE_COMGR_LIBRARY)
// ================================================================================================
bool Program::linkImplHSAIL(const std::vector& inputPrograms,
@@ -1089,8 +1090,8 @@ static void dumpCodeObject(const std::string& image) {
}
// ================================================================================================
-#if defined(USE_COMGR_LIBRARY)
bool Program::linkImplLC(amd::option::Options* options) {
+#if defined(USE_COMGR_LIBRARY)
aclType continueCompileFrom = ACL_TYPE_LLVMIR_BINARY;
internal_ = (compileOptions_.find("-cl-internal-kernel") != std::string::npos) ?
@@ -1265,8 +1266,10 @@ bool Program::linkImplLC(amd::option::Options* options) {
setType(TYPE_EXECUTABLE);
return true;
+#else // defined(USE_COMGR_LIBRARY)
+ return false;
+#endif // defined(USE_COMGR_LIBRARY)
}
-#endif // defined(USE_COMGR_LIBRARY)
// ================================================================================================