Skip to content

Commit 6642d84

Browse files
committed
[SYCL] Move SYCL headers from standard clang location
SYCL headers were moved from default clang include directory (lib/clang/11.0.0/include) to (include/sycl) to support mixed compilers (e.g. gcc for host code and clang for device code) during build of SYCL application. Clang driver adds new directory to system include search path. For non-clang compilers the user should add option below to compiler command line to let it find SYCL headers: -I <path_to_sycl_compiler>/include/sycl Additional diagnostic can be raised depending on compiler which is used (see examples for clang below). It can be ignored. /localdisk2/bbsycl/res/include/sycl/CL/__spirv/spirv_ops.hpp:74:8: error: SYCL 1.2.1 specification does not allow 'sycl_device' attribute applied to a function with a raw pointer parameter type [-Wsycl-strict] extern SYCL_EXTERNAL __ocl_event_t __spirv_GroupAsyncCopy( /localdisk2/bbsycl/res/include/sycl/CL/sycl/ordered_queue.hpp:267:37: warning: 'ordered_queue' is deprecated: Replaced by in_order queue property [-Wdeprecated-declarations] size_t operator()(const cl::sycl::ordered_queue &q) const { Signed-off-by: Vladimir Lazarev [email protected]
1 parent 0caff4d commit 6642d84

34 files changed

+51
-45
lines changed

clang/lib/Driver/ToolChains/SYCL.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,12 @@ SYCLToolChain::GetCXXStdlibType(const ArgList &Args) const {
532532

533533
void SYCLToolChain::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
534534
ArgStringList &CC1Args) const {
535+
SmallString<128> P(getDriver().getInstalledDir());
536+
llvm::sys::path::append(P, "..");
537+
llvm::sys::path::append(P, "include");
538+
llvm::sys::path::append(P, "sycl");
539+
CC1Args.push_back("-internal-isystem");
540+
CC1Args.push_back(DriverArgs.MakeArgString(P));
535541
HostTC.AddClangSystemIncludeArgs(DriverArgs, CC1Args);
536542
}
537543

clang/test/Driver/sycl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// RUN: %clangxx -### %s 2>&1 | FileCheck %s --check-prefix=DISABLED
88

99
// ENABLED: "-cc1"{{.*}} "-fsycl-is-device"
10+
// ENABLED: "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"
1011
// DISABLED-NOT: "-fsycl-is-device"
1112

1213
// RUN: %clang -### -fsycl-device-only -c %s 2>&1 | FileCheck %s --check-prefix=DEFAULT

sycl/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ endif()
5454
# Unlike PACKAGE_VERSION, CLANG_VERSION does not include LLVM_VERSION_SUFFIX.
5555
set(CLANG_VERSION "${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}.${CLANG_VERSION_PATCHLEVEL}")
5656

57-
set(LLVM_INST_INC_DIRECTORY "lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include")
58-
set(dst_dir ${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}/include)
59-
set(dst_deploy_dir ${CMAKE_INSTALL_PREFIX}/lib/clang/${CLANG_VERSION}/include)
57+
set(SYCL_INST_INC_DIRECTORY "include/sycl")
58+
set(dst_dir ${LLVM_BINARY_DIR}/${SYCL_INST_INC_DIRECTORY})
59+
set(dst_deploy_dir ${CMAKE_INSTALL_PREFIX}/${SYCL_INST_INC_DIRECTORY})
6060

6161
# Find OpenCL headers and libraries installed in the system and use them to
6262
# build SYCL runtime.
@@ -137,7 +137,7 @@ target_include_directories(OpenCL-Headers
137137
INTERFACE ${OPENCL_INCLUDE}
138138
)
139139
install(DIRECTORY ${OPENCL_INCLUDE}/CL
140-
DESTINATION ${LLVM_INST_INC_DIRECTORY}
140+
DESTINATION ${dst_deploy_dir}
141141
COMPONENT opencl-headers
142142
)
143143

@@ -159,7 +159,7 @@ COMMAND ${CMAKE_COMMAND} -E copy_directory ${sycl_inc_dir}/CL ${dst_dir}/CL
159159
COMMENT "Copying SYCL headers ...")
160160

161161
# Configure SYCL headers
162-
install(DIRECTORY "${sycl_inc_dir}/." DESTINATION "${LLVM_INST_INC_DIRECTORY}" COMPONENT sycl-headers)
162+
install(DIRECTORY "${sycl_inc_dir}/." DESTINATION ${dst_deploy_dir} COMPONENT sycl-headers)
163163

164164
set(SYCL_RT_LIBS sycl)
165165
if (MSVC)

sycl/test/basic_tests/buffer/buffer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// REQUIRES: opencl
22

3-
// RUN: %clangxx %s -o %t1.out -lsycl
3+
// RUN: %clangxx %s -o %t1.out -lsycl -I %sycl_include
44
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
55
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t2.out
66
// RUN: env SYCL_DEVICE_TYPE=HOST %t2.out

sycl/test/basic_tests/buffer/buffer_ctad.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -std=c++17 -fsyntax-only -Xclang -verify %s
1+
// RUN: %clangxx -std=c++17 -fsyntax-only -Xclang -verify %s -I %sycl_include -Xclang -verify-ignore-unexpected=note,warning
22
// expected-no-diagnostics
33
//==------------------- buffer_ctad.cpp - SYCL buffer CTAD test ----------------==//
44
//

sycl/test/basic_tests/buffer/buffer_dev_to_dev.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
1+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
22
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
33
// RUN: %CPU_RUN_PLACEHOLDER %t.out
44
// RUN: %GPU_RUN_PLACEHOLDER %t.out

sycl/test/basic_tests/buffer/buffer_full_copy.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// RUN: %clangxx %s -o %t1.out -lsycl
1+
// RUN: %clangxx %s -o %t1.out -lsycl -I %sycl_include
22
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
3-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t2.out
3+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t2.out
44
// RUN: env SYCL_DEVICE_TYPE=HOST %t2.out
55
// RUN: %CPU_RUN_PLACEHOLDER %t2.out
66
// RUN: %GPU_RUN_PLACEHOLDER %t2.out

sycl/test/basic_tests/context.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx %s -o %t.out -lsycl
1+
// RUN: %clangxx %s -o %t.out -lsycl -I %sycl_include
22
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
33

44
//==--------------- context.cpp - SYCL context test ------------------------==//

sycl/test/basic_tests/device.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx %s -o %t.out -lsycl
1+
// RUN: %clangxx %s -o %t.out -I %sycl_include -lsycl
22
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
33

44
//==--------------- device.cpp - SYCL device test --------------------------==//

sycl/test/basic_tests/id_ctad.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -std=c++17 -fsyntax-only -Xclang -verify %s
1+
// RUN: %clangxx -std=c++17 -fsyntax-only -Xclang -verify %s -I %sycl_include -Xclang -verify-ignore-unexpected=note,warning
22
// expected-no-diagnostics
33
//==--------------- id_ctad.cpp - SYCL id CTAD test ----------------------==//
44
//

sycl/test/basic_tests/image_accessor_types.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not %clangxx -fsyntax-only %s 2>&1 | FileCheck %s
1+
// RUN: not %clangxx -fsyntax-only %s -I %sycl_include 2>&1 | FileCheck %s
22
#include <CL/sycl.hpp>
33
#include <iostream>
44

sycl/test/basic_tests/image_api.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
// REQUIRES: opencl
22

33
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -I %sycl_source_dir %s -o %t1.out
4-
// RUN: %clangxx -I %sycl_source_dir %s -o %t3.out -lsycl
4+
// RUN: %clangxx -I %sycl_source_dir %s -o %t3.out -lsycl -I %sycl_include
55
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
66
// RUN: env SYCL_DEVICE_TYPE=HOST %t3.out
77
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
88
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
99
// RUN: %ACC_RUN_PLACEHOLDER %t1.out
1010

11-
1211
#include <CL/sycl.hpp>
1312
// FIXME do not use internal methods in tests.
1413
#include <CL/sycl/detail/cg.hpp>

sycl/test/basic_tests/image_constructors.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx %s -o %t1.out -lsycl
1+
// RUN: %clangxx %s -o %t1.out -lsycl -I %sycl_include
22
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
33
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t2.out
44
// RUN: env SYCL_DEVICE_TYPE=HOST %t2.out

sycl/test/basic_tests/implicit_conversion_error.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsyntax-only -Xclang -verify %s -Xclang -verify-ignore-unexpected=note,warning
1+
// RUN: %clangxx -fsyntax-only -Xclang -verify %s -I %sycl_include -Xclang -verify-ignore-unexpected=note,warning
22
//==-- implicit_conversion_error.cpp - Unintended implicit conversion check --==//
33
//
44
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.

sycl/test/basic_tests/kernel_info.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -L %opencl_libs_dir -lOpenCL
1+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
22
// RUN: %CPU_RUN_PLACEHOLDER %t.out
33
// RUN: %GPU_RUN_PLACEHOLDER %t.out
44
// RUN: %ACC_RUN_PLACEHOLDER %t.out
@@ -64,4 +64,4 @@ int main() {
6464
const cl_ulong prvMemSize =
6565
krn.get_work_group_info<info::kernel_work_group::private_mem_size>(dev);
6666
CHECK(prvMemSize == 0);
67-
}
67+
}

sycl/test/basic_tests/parallel_for_indexers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx %s -o %t1.out -lsycl
1+
// RUN: %clangxx %s -o %t1.out -lsycl -I %sycl_include -Wno-sycl-strict -Xclang -verify-ignore-unexpected=note,warning
22
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
33
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t2.out
44
// RUN: env SYCL_DEVICE_TYPE=HOST %t2.out

sycl/test/basic_tests/property_list.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx %s -o %t.out -lsycl
1+
// RUN: %clangxx %s -o %t.out -lsycl -I%sycl_include
22
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
33
//
44
// CHECK: PASSED

sycl/test/basic_tests/range_ctad.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -std=c++17 -fsyntax-only -Xclang -verify %s
1+
// RUN: %clangxx -std=c++17 -fsyntax-only -Xclang -verify %s -I %sycl_include -Xclang -verify-ignore-unexpected=note,warning
22
// expected-no-diagnostics
33
//==--------------- range_ctad.cpp - SYCL range CTAD test ----------------------==//
44
//

sycl/test/basic_tests/range_error.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -Xclang -verify %s -Xclang -verify-ignore-unexpected=note,warning -fsyntax-only
1+
// RUN: %clangxx -Xclang -verify %s -I %sycl_include -Xclang -verify-ignore-unexpected=note,warning -fsyntax-only
22
//==--------------- range_error.cpp - SYCL range error test ----------------==//
33
//
44
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.

sycl/test/basic_tests/valid_kernel_args.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
//===----------------------------------------------------------------------===//
88

99
// The test checks that the types can be used to pass kernel parameters by value
10-
// RUN: %clangxx -fsyntax-only %s
10+
// RUN: %clangxx -fsyntax-only %s -I %sycl_include -Wno-sycl-strict -Xclang -verify-ignore-unexpected=note,warning
1111

1212
// Check that the test can be compiled with device compiler as well.
13-
// RUN: %clangxx -fsycl-device-only -fsyntax-only %s
13+
// RUN: %clangxx -fsycl-device-only -fsyntax-only %s -I %sycl_include -Wno-sycl-strict
1414

1515
#include <CL/sycl.hpp>
1616

@@ -33,4 +33,4 @@ struct SomeStructure {
3333
CHECK_PASSING_TO_KERNEL_BY_VALUE(int)
3434
CHECK_PASSING_TO_KERNEL_BY_VALUE(cl::sycl::cl_uchar4)
3535
CHECK_PASSING_TO_KERNEL_BY_VALUE(SomeStructure)
36-
#endif
36+
#endif

sycl/test/basic_tests/vectors/ctad.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -std=c++17 -fsyntax-only -Xclang -verify %s
1+
// RUN: %clangxx -std=c++17 -I %sycl_include -fsyntax-only -Xclang -verify %s -Xclang -verify-ignore-unexpected=note,warning
22
// expected-no-diagnostics
33
//==--------------- ctad.cpp - SYCL vector CTAD test --------------------==//
44
//

sycl/test/basic_tests/vectors/ctad_fail.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -std=c++17 -fsyntax-only -Xclang -verify -Xclang -verify-ignore-unexpected %s
1+
// RUN: %clangxx -std=c++17 -fsyntax-only -Xclang -verify %s -I %sycl_include -Xclang -verify-ignore-unexpected
22
//==--------------- ctad.cpp - SYCL vector CTAD fail test ------------------==//
33
//
44
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.

sycl/test/basic_tests/vectors/vectors.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx %s -o %t.out -lsycl
1+
// RUN: %clangxx %s -o %t.out -lsycl -I %sycl_include
22
// RUN: %t.out
33
//==--------------- vectors.cpp - SYCL vectors test ------------------------==//
44
//

sycl/test/check_device_code/kernel_arguments_as.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl-device-only -Xclang -fsycl-is-device -emit-llvm %s -S -o %t.ll
1+
// RUN: %clangxx -fsycl-device-only -Xclang -fsycl-is-device -emit-llvm %s -S -o %t.ll -I %sycl_include -Wno-sycl-strict -Xclang -verify-ignore-unexpected=note,warning
22
// RUN: FileCheck %s --input-file %t.ll
33
//
44
// Check the address space of the pointer in accessor class.

sycl/test/kernel_from_file/hw.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//-fsycl-targets=%sycl_triple
2-
// RUN: %clangxx -fsycl-device-only -fno-sycl-use-bitcode -Xclang -fsycl-int-header=%t.h -c %s -o %t.spv
3-
// RUN: %clangxx -include %t.h -g %s -o %t.out -lsycl
2+
// RUN: %clangxx -fsycl-device-only -fno-sycl-use-bitcode -Xclang -fsycl-int-header=%t.h -c %s -o %t.spv -I %sycl_include -Xclang -verify-ignore-unexpected=note,warning -Wno-sycl-strict
3+
// RUN: %clangxx -include %t.h -g %s -o %t.out -lsycl -I %sycl_include -Xclang -verify-ignore-unexpected=note,warning
44
// RUN: env SYCL_USE_KERNEL_SPV=%t.spv %t.out | FileCheck %s
55
// CHECK: Passed
66

sycl/test/multi_ptr/ctad.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -std=c++17 -fsyntax-only -Xclang -verify %s
1+
// RUN: %clangxx -std=c++17 -fsyntax-only -Xclang -verify %s -I %sycl_include -Xclang -verify-ignore-unexpected=note,warning
22
// expected-no-diagnostics
33
//==--------------- ctad.cpp - SYCL multi_ptr CTAD test --------------------==//
44
//

sycl/test/regression/constexpr-fp16-numeric-limits.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl-device-only -fsyntax-only -Xclang -verify %s
1+
// RUN: %clangxx -fsycl-device-only -fsyntax-only -Xclang -verify %s -I %sycl_include -Xclang -verify-ignore-unexpected=note,warning -Wno-sycl-strict
22
// expected-no-diagnostics
33
#include <CL/sycl.hpp>
44

sycl/test/regression/macro_conflict.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsyntax-only -Xclang -verify %s -o %t.out
1+
// RUN: %clangxx -fsyntax-only -I %sycl_include -Xclang -verify %s -o %t.out -Xclang -verify-ignore-unexpected=note,warning
22
// expected-no-diagnostics
33
//
44
//===----------------------------------------------------------------------===//

sycl/test/regression/sub-group-store-const-ref.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -I %sycl_include -fsyntax-only -Xclang -verify %s
1+
// RUN: %clangxx -fsyntax-only -Xclang -verify %s -I %sycl_include -Xclang -verify-ignore-unexpected=note,warning
22
// expected-no-diagnostics
33
//
44
//==-- sub-group-store-const-ref.cpp ---------------------------------------==//

sycl/test/regression/unable-to-redeclare-device.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -I %sycl_include -fsyntax-only -Xclang -verify -DCL_TARGET_OPENCL_VERSION=220 %s
1+
// RUN: %clangxx -fsyntax-only -Xclang -verify -DCL_TARGET_OPENCL_VERSION=220 %s -I %sycl_include -Xclang -verify-ignore-unexpected=note,warning
22
// expected-no-diagnostics
33
//
44
//==-- unable-to-redeclare-device.cpp --------------------------------------==//

sycl/test/regression/vec-to-half.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang -O0 -fsyntax-only -Xclang -verify %s
1+
// RUN: %clang -O0 -fsyntax-only -Xclang -verify %s -I %sycl_include -Xclang -verify-ignore-unexpected=note,warning
22
// expected-no-diagnostics
33

44
#include <CL/sycl.hpp>

sycl/test/separate-compile/test.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// >> ---- compile src1
22
// >> device compilation...
3-
// RUN: %clangxx -fsycl-device-only -Xclang -fsycl-int-header=sycl_ihdr_a.h %s -c -o a_kernel.bc
3+
// RUN: %clangxx -fsycl-device-only -Xclang -fsycl-int-header=sycl_ihdr_a.h %s -c -o a_kernel.bc -I %sycl_include -Wno-sycl-strict
44
// >> host compilation...
5-
// RUN: %clangxx -include sycl_ihdr_a.h -g -c %s -o a.o
5+
// RUN: %clangxx -include sycl_ihdr_a.h -g -c %s -o a.o -I %sycl_include -Wno-sycl-strict
66
//
77
// >> ---- compile src2
88
// >> device compilation...
9-
// RUN: %clangxx -DB_CPP=1 -fsycl-device-only -Xclang -fsycl-int-header=sycl_ihdr_b.h %s -c -o b_kernel.bc
9+
// RUN: %clangxx -DB_CPP=1 -fsycl-device-only -Xclang -fsycl-int-header=sycl_ihdr_b.h %s -c -o b_kernel.bc -I %sycl_include -Wno-sycl-strict
1010
// >> host compilation...
11-
// RUN: %clangxx -DB_CPP=1 -include sycl_ihdr_b.h -g -c %s -o b.o
11+
// RUN: %clangxx -DB_CPP=1 -include sycl_ihdr_b.h -g -c %s -o b.o -I %sycl_include -Wno-sycl-strict
1212
//
1313
// >> ---- bundle .o with .spv
1414
// >> run bundler

sycl/test/xmethods/accessors-device.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl-device-only -c -fno-color-diagnostics -Xclang -ast-dump %s | FileCheck %s
1+
// RUN: %clangxx -fsycl-device-only -c -fno-color-diagnostics -Xclang -ast-dump %s -I %sycl_include -Wno-sycl-strict | FileCheck %s
22
// UNSUPPORTED: windows
33
#include <CL/sycl/accessor.hpp>
44

sycl/test/xmethods/accessors.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -c -fno-color-diagnostics -Xclang -ast-dump %s | FileCheck %s
1+
// RUN: %clangxx -c -fno-color-diagnostics -I %sycl_include -Xclang -ast-dump %s | FileCheck %s
22
// UNSUPPORTED: windows
33
#include <CL/sycl/accessor.hpp>
44

0 commit comments

Comments
 (0)