From 093b43a800f37b232da4b362c3577cc449282f09 Mon Sep 17 00:00:00 2001 From: foreman Date: Sat, 20 Aug 2016 02:34:04 -0400 Subject: [PATCH] P4 to Git Change 1305295 by lmoriche@lmoriche_opencl_dev on 2016/08/20 02:25:17 SWDEV-94610 - Back-out CL#1305293 and pass -fno-validate-pch to clang -cc1 Affected files ... ... //depot/stg/opencl/drivers/opencl/make/amdgcn.git/headers/build/Makefile.headers#6 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/roccompiler.cpp#7 edit --- rocclr/runtime/device/rocm/roccompiler.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/rocclr/runtime/device/rocm/roccompiler.cpp b/rocclr/runtime/device/rocm/roccompiler.cpp index 943e3488be..7dc342eedc 100644 --- a/rocclr/runtime/device/rocm/roccompiler.cpp +++ b/rocclr/runtime/device/rocm/roccompiler.cpp @@ -12,7 +12,8 @@ #include "rocdevice.hpp" #include "rocprogram.hpp" #if defined(WITH_LIGHTNING_COMPILER) -#include "opencl-c.amdgcn.inc" +#include "opencl1.2-c.amdgcn.inc" +#include "opencl2.0-c.amdgcn.inc" #else // !defined(WITH_LIGHTNING_COMPILER) #include "roccompilerlib.hpp" #endif // !defined(WITH_LIGHTNING_COMPILER) @@ -117,8 +118,8 @@ HSAILProgram::compileImpl_LC(const std::string& sourceCode, amd::opencl_driver::File* pch = device().compiler()->NewTempFile( amd::opencl_driver::DT_CL_HEADER); - if (pch == NULL || !pch->WriteData((const char*) opencl_c_amdgcn, - opencl_c_amdgcn_size)) { + if (pch == NULL || !pch->WriteData((const char*) opencl2_0_c_amdgcn, + opencl2_0_c_amdgcn_size)) { buildLog_ += "Error while opening the opencl-c header "; return false; } @@ -126,6 +127,7 @@ HSAILProgram::compileImpl_LC(const std::string& sourceCode, // FIXME_lmoriche: Force OpenCL-C 2.0, since the built-ins are built that way. compileOptions_.append(" -Xclang -cl-std=CL2.0"); compileOptions_.append(" -Xclang -include-pch -Xclang " + pch->Name()); + compileOptions_.append(" -Xclang -fno-validate-pch"); compileOptions_.append(hsailOptions());