Skip to content

Commit 8bcf5bd

Browse files
lwesiersAlexeySachkov
authored andcommitted
Fix for attaching opencl-c-base.h into libopencl-clang.so ress
After that commit: llvm-mirror/clang@1d69674 opencl-c.h now is splitted into opencl-c.h and opencl-c-base.h libopencl-clang.so needs to have the second header too.
1 parent 16f6202 commit 8bcf5bd

File tree

6 files changed

+10
-1
lines changed

6 files changed

+10
-1
lines changed

cl_headers/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ else(USE_PREBUILT_LLVM)
1818
set(OPENCL_HEADERS_DIR "${CLANG_SOURCE_DIR}/lib/Headers")
1919
endif(USE_PREBUILT_LLVM)
2020
copy_file(${OPENCL_HEADERS_DIR}/opencl-c.h opencl-c.h)
21+
copy_file(${OPENCL_HEADERS_DIR}/opencl-c-base.h opencl-c-base.h)
2122

2223
add_custom_target (
2324
opencl.headers.target
2425
DEPENDS
2526
opencl-c.h
27+
opencl-c-base.h
2628
)
2729

2830

@@ -39,8 +41,10 @@ if(WIN32)
3941
list(APPEND CL_HEADERS_SRC OpenCL.rc)
4042
else()
4143
pack_to_obj(opencl-c.h opencl-c.h.cpp "PCM_OPENCL_C_H")
44+
pack_to_obj(opencl-c-base.h opencl-c-base.h.cpp "PCM_OPENCL_C_BASE_H")
4245
list(APPEND CL_HEADERS_SRC
43-
opencl-c.h.cpp
46+
opencl-c.h.cpp
47+
opencl-c-base.h.cpp
4448
)
4549
endif()
4650

cl_headers/OpenCL.rc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ END
1212
//
1313

1414
OPENCL_C_H PCM "opencl-c.h"
15+
OPENCL_C_BASE_H PCM "opencl-c-base.h"

cl_headers/resource.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ Copyright (c) Intel Corporation (2009-2017).
2020
#define __RESOURCE__
2121

2222
#define OPENCL_C_H "OPENCL_C_H"
23+
#define OPENCL_C_BASE_H "OPENCL_C_BASE_H"
2324

2425
#endif /* __RESOURCE__ */

common_clang.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ void CommonClangInitialize() {
115115
static bool GetHeaders(std::vector<Resource> &Result) {
116116
struct {const char *ID; const char *Name;} Headers[] = {
117117
{OPENCL_C_H, "opencl-c.h"},
118+
{OPENCL_C_BASE_H, "opencl-c-base.h"},
118119
};
119120

120121
Result.clear();

common_clang.map

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ global:
77
Link;
88
GetKernelArgInfo;
99
PCM_OPENCL_C_H*;
10+
PCM_OPENCL_C_BASE_H*;
1011
};
1112
local: *;
1213
};

options_compile.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ std::string EffectiveOptionsFilter::processOptions(const OpenCLArgList &args,
198198

199199
effectiveArgs.push_back("-include");
200200
effectiveArgs.push_back("opencl-c.h");
201+
effectiveArgs.push_back("opencl-c-base.h");
201202

202203
// Don't optimize in the frontend
203204
// clang defaults to -O0, and in that mode, does not produce IR that is

0 commit comments

Comments
 (0)