Change-Id: I55db791019c511de83d8b895e3a48b3d7475aeac
Αυτή η υποβολή περιλαμβάνεται σε:
Matt Arsenault
2020-06-30 18:11:00 -04:00
υποβλήθηκε από Matthew Arsenault
γονέας a430215067
υποβολή 9e3e41ca2e
2 αρχεία άλλαξαν με 0 προσθήκες και 48 διαγραφές
@@ -132,49 +132,6 @@ bool Program::compileImpl(const std::string& sourceCode,
}
}
// ================================================================================================
#if defined(USE_COMGR_LIBRARY)
static std::string llvmBin_(amd::Os::getEnvironment("LLVM_BIN"));
#if defined(ATI_OS_LINUX)
static pthread_once_t once = PTHREAD_ONCE_INIT;
static void checkLLVM_BIN() {
if (llvmBin_.empty()) {
Dl_info info;
if (dladdr((const void*)&amd::Device::init, &info)) {
char* str = strdup(info.dli_fname);
if (str) {
llvmBin_ = dirname(str);
free(str);
size_t pos = llvmBin_.rfind("lib");
if (pos != std::string::npos) {
llvmBin_.replace(pos, 3, "bin");
}
}
}
}
#if defined(DEBUG)
static const std::string tools[] = { "clang", "llvm-link", "ld.lld" };
for (const std::string tool : tools) {
std::string exePath(llvmBin_ + "/" + tool);
struct stat buf;
if (stat(exePath.c_str(), &buf)) {
std::string msg(exePath + " not found");
LogWarning(msg.c_str());
}
else if ((buf.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)) == 0) {
std::string msg("Cannot execute " + exePath);
LogWarning(msg.c_str());
}
}
#endif // defined(DEBUG)
}
#endif // defined(ATI_OS_LINUX)
#endif // defined(USE_COMGR_LIBRARY)
// ================================================================================================
#if defined(USE_COMGR_LIBRARY)
@@ -63,11 +63,6 @@ static hsa_status_t GetKernelNamesCallback(hsa_executable_t exec, hsa_agent_t ag
return HSA_STATUS_SUCCESS;
}
/* Temporary log function for the compiler library */
static void logFunction(const char* msg, size_t size) {
std::cout << "Compiler Library log :" << msg << std::endl;
}
static inline const char* hsa_strerror(hsa_status_t status) {
const char* str = nullptr;
if (hsa_status_string(status, &str) == HSA_STATUS_SUCCESS) {