P4 to Git Change 1412181 by yaxunl@yaxunl_stg_win50 on 2017/05/20 20:14:34

SWDEV-121585 - [OCL-LC-ROCm] Merge GitHub pull requests
	- Merged https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/pull/8

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/CMakeLists.txt#4 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/roccompiler.cpp#33 edit
This commit is contained in:
foreman
2017-05-23 10:30:44 -04:00
parent 738528f6f3
commit 2cea61199a
2 changed files with 14 additions and 1 deletions
+7 -1
View File
@@ -26,6 +26,12 @@
#include <libgen.h>
#endif // defined(ATI_OS_LINUX)
#define QUOTE(s) #s
#define STRING(s) QUOTE(s)
#ifndef AMDGCN_TRIPLE
#define AMDGCN_TRIPLE amdgcn-amd-amdhsa-opencl
#endif
#if defined(WITH_LIGHTNING_COMPILER)
static std::string llvmBin_(amd::Os::getEnvironment("LLVM_BIN"));
#endif // defined(WITH_LIGHTNING_COMPILER)
@@ -158,7 +164,7 @@ bool HSAILProgram::compileImpl_LC(const std::string& sourceCode,
std::ofstream f(options->getDumpFileName(".cl").c_str(), std::ios::trunc);
if (f.is_open()) {
f << "/* Compiler options:\n"
"-c -emit-llvm -target amdgcn-amd-amdhsa-opencl -x cl "
"-c -emit-llvm -target " STRING(AMDGCN_TRIPLE) " -x cl "
<< driverOptions << " -include opencl-c.h "
<< "\n*/\n\n"
<< sourceCode;