diff --git a/clang/lib/Driver/ToolChains/SYCL.cpp b/clang/lib/Driver/ToolChains/SYCL.cpp index e730eda58d2f7..beb14b24222af 100644 --- a/clang/lib/Driver/ToolChains/SYCL.cpp +++ b/clang/lib/Driver/ToolChains/SYCL.cpp @@ -532,6 +532,12 @@ SYCLToolChain::GetCXXStdlibType(const ArgList &Args) const { void SYCLToolChain::AddClangSystemIncludeArgs(const ArgList &DriverArgs, ArgStringList &CC1Args) const { + SmallString<128> P(getDriver().getInstalledDir()); + llvm::sys::path::append(P, ".."); + llvm::sys::path::append(P, "include"); + llvm::sys::path::append(P, "sycl"); + CC1Args.push_back("-internal-isystem"); + CC1Args.push_back(DriverArgs.MakeArgString(P)); HostTC.AddClangSystemIncludeArgs(DriverArgs, CC1Args); } diff --git a/clang/test/Driver/sycl.c b/clang/test/Driver/sycl.c index 31ae4a2216a9b..8dffd9699e34b 100644 --- a/clang/test/Driver/sycl.c +++ b/clang/test/Driver/sycl.c @@ -7,6 +7,7 @@ // RUN: %clangxx -### %s 2>&1 | FileCheck %s --check-prefix=DISABLED // ENABLED: "-cc1"{{.*}} "-fsycl-is-device" +// ENABLED: "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl" // DISABLED-NOT: "-fsycl-is-device" // RUN: %clang -### -fsycl-device-only -c %s 2>&1 | FileCheck %s --check-prefix=DEFAULT diff --git a/sycl/CMakeLists.txt b/sycl/CMakeLists.txt index a7c9ef2732f38..767ebfa3f27cb 100644 --- a/sycl/CMakeLists.txt +++ b/sycl/CMakeLists.txt @@ -54,9 +54,9 @@ endif() # Unlike PACKAGE_VERSION, CLANG_VERSION does not include LLVM_VERSION_SUFFIX. set(CLANG_VERSION "${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR}.${CLANG_VERSION_PATCHLEVEL}") -set(LLVM_INST_INC_DIRECTORY "lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include") -set(dst_dir ${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}/include) -set(dst_deploy_dir ${CMAKE_INSTALL_PREFIX}/lib/clang/${CLANG_VERSION}/include) +set(SYCL_INCLUDE_DIR "include/sycl") +set(SYCL_INCLUDE_BUILD_DIR ${LLVM_BINARY_DIR}/${SYCL_INCLUDE_DIR}) +set(SYCL_INCLUDE_DEPLOY_DIR ${CMAKE_INSTALL_PREFIX}/${SYCL_INCLUDE_DIR}) # Find OpenCL headers and libraries installed in the system and use them to # build SYCL runtime. @@ -78,7 +78,7 @@ if( NOT OpenCL_INCLUDE_DIRS ) GIT_TAG origin/master SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/OpenCL/inc" CONFIGURE_COMMAND "" - BUILD_COMMAND ${CMAKE_COMMAND} -E copy_directory ${OpenCL_INCLUDE_DIRS}/CL ${dst_dir}/CL + BUILD_COMMAND ${CMAKE_COMMAND} -E copy_directory ${OpenCL_INCLUDE_DIRS}/CL ${SYCL_INCLUDE_BUILD_DIR}/CL INSTALL_COMMAND "" STEP_TARGETS build COMMENT "Downloading OpenCL headers." @@ -86,7 +86,7 @@ if( NOT OpenCL_INCLUDE_DIRS ) else() add_custom_target( ocl-headers ALL DEPENDS ${OpenCL_INCLUDE_DIRS} - COMMAND ${CMAKE_COMMAND} -E copy_directory ${OpenCL_INCLUDE_DIRS}/CL ${dst_dir}/CL + COMMAND ${CMAKE_COMMAND} -E copy_directory ${OpenCL_INCLUDE_DIRS}/CL ${SYCL_INCLUDE_BUILD_DIR}/CL COMMENT "Copying OpenCL headers ..." ) endif() @@ -137,7 +137,7 @@ target_include_directories(OpenCL-Headers INTERFACE ${OPENCL_INCLUDE} ) install(DIRECTORY ${OPENCL_INCLUDE}/CL - DESTINATION ${LLVM_INST_INC_DIRECTORY} + DESTINATION ${SYCL_INCLUDE_DEPLOY_DIR} COMPONENT opencl-headers ) @@ -155,11 +155,11 @@ configure_file("${version_header}.in" "${version_header}") # Copy SYCL headers add_custom_target(sycl-headers ALL -COMMAND ${CMAKE_COMMAND} -E copy_directory ${sycl_inc_dir}/CL ${dst_dir}/CL +COMMAND ${CMAKE_COMMAND} -E copy_directory ${sycl_inc_dir}/CL ${SYCL_INCLUDE_BUILD_DIR}/CL COMMENT "Copying SYCL headers ...") # Configure SYCL headers -install(DIRECTORY "${sycl_inc_dir}/." DESTINATION "${LLVM_INST_INC_DIRECTORY}" COMPONENT sycl-headers) +install(DIRECTORY "${sycl_inc_dir}/." DESTINATION ${SYCL_INCLUDE_DEPLOY_DIR} COMPONENT sycl-headers) set(SYCL_RT_LIBS sycl) if (MSVC) diff --git a/sycl/test/CMakeLists.txt b/sycl/test/CMakeLists.txt index 68feb07fc2d76..ec7e5e035d98b 100644 --- a/sycl/test/CMakeLists.txt +++ b/sycl/test/CMakeLists.txt @@ -2,10 +2,10 @@ set(LLVM_TOOLS_DIR "${LLVM_BINARY_DIR}/bin/") get_target_property(SYCL_BINARY_DIR sycl-toolchain BINARY_DIR) -set(SYCL_INCLUDE "${dst_dir}") +set(SYCL_INCLUDE "${SYCL_INCLUDE_BUILD_DIR}") set(RT_TEST_ARGS ${RT_TEST_ARGS} "-v") -set(DEPLOY_RT_TEST_ARGS ${DEPLOY_RT_TEST_ARGS} "-v -D SYCL_TOOLS_DIR=${CMAKE_INSTALL_PREFIX}/bin -D SYCL_LIBS_DIR=${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX} -D SYCL_INCLUDE=${dst_deploy_dir}") +set(DEPLOY_RT_TEST_ARGS ${DEPLOY_RT_TEST_ARGS} "-v -D SYCL_TOOLS_DIR=${CMAKE_INSTALL_PREFIX}/bin -D SYCL_LIBS_DIR=${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX} -D SYCL_INCLUDE=${SYCL_INCLUDE_BUILD_DIR}") configure_lit_site_cfg( ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in diff --git a/sycl/test/basic_tests/buffer/buffer.cpp b/sycl/test/basic_tests/buffer/buffer.cpp index c587a8d9ee865..bfb776830d213 100644 --- a/sycl/test/basic_tests/buffer/buffer.cpp +++ b/sycl/test/basic_tests/buffer/buffer.cpp @@ -1,6 +1,6 @@ // REQUIRES: opencl -// RUN: %clangxx %s -o %t1.out -lsycl +// RUN: %clangxx %s -o %t1.out -lsycl -I %sycl_include // RUN: env SYCL_DEVICE_TYPE=HOST %t1.out // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t2.out // RUN: env SYCL_DEVICE_TYPE=HOST %t2.out diff --git a/sycl/test/basic_tests/buffer/buffer_ctad.cpp b/sycl/test/basic_tests/buffer/buffer_ctad.cpp index 1b3a5067083bb..1f7f9fd8ed6e4 100644 --- a/sycl/test/basic_tests/buffer/buffer_ctad.cpp +++ b/sycl/test/basic_tests/buffer/buffer_ctad.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -std=c++17 -fsyntax-only -Xclang -verify %s +// RUN: %clangxx -std=c++17 -fsyntax-only -Xclang -verify %s -I %sycl_include -Xclang -verify-ignore-unexpected=note,warning // expected-no-diagnostics //==------------------- buffer_ctad.cpp - SYCL buffer CTAD test ----------------==// // diff --git a/sycl/test/basic_tests/buffer/buffer_dev_to_dev.cpp b/sycl/test/basic_tests/buffer/buffer_dev_to_dev.cpp index cc160ffafc2e3..f7caf5d070d2d 100644 --- a/sycl/test/basic_tests/buffer/buffer_dev_to_dev.cpp +++ b/sycl/test/basic_tests/buffer/buffer_dev_to_dev.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out +// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out diff --git a/sycl/test/basic_tests/buffer/buffer_full_copy.cpp b/sycl/test/basic_tests/buffer/buffer_full_copy.cpp index f729f8d6d96a4..f9c2047510e31 100644 --- a/sycl/test/basic_tests/buffer/buffer_full_copy.cpp +++ b/sycl/test/basic_tests/buffer/buffer_full_copy.cpp @@ -1,6 +1,6 @@ -// RUN: %clangxx %s -o %t1.out -lsycl +// RUN: %clangxx %s -o %t1.out -lsycl -I %sycl_include // RUN: env SYCL_DEVICE_TYPE=HOST %t1.out -// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t2.out +// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t2.out // RUN: env SYCL_DEVICE_TYPE=HOST %t2.out // RUN: %CPU_RUN_PLACEHOLDER %t2.out // RUN: %GPU_RUN_PLACEHOLDER %t2.out diff --git a/sycl/test/basic_tests/context.cpp b/sycl/test/basic_tests/context.cpp index 8f40ee2be2845..6b5fdd9047c3d 100644 --- a/sycl/test/basic_tests/context.cpp +++ b/sycl/test/basic_tests/context.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx %s -o %t.out -lsycl +// RUN: %clangxx %s -o %t.out -lsycl -I %sycl_include // RUN: env SYCL_DEVICE_TYPE=HOST %t.out //==--------------- context.cpp - SYCL context test ------------------------==// diff --git a/sycl/test/basic_tests/device.cpp b/sycl/test/basic_tests/device.cpp index 7b707255db8c8..a67ee05774fda 100644 --- a/sycl/test/basic_tests/device.cpp +++ b/sycl/test/basic_tests/device.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx %s -o %t.out -lsycl +// RUN: %clangxx %s -o %t.out -I %sycl_include -lsycl // RUN: env SYCL_DEVICE_TYPE=HOST %t.out //==--------------- device.cpp - SYCL device test --------------------------==// diff --git a/sycl/test/basic_tests/id_ctad.cpp b/sycl/test/basic_tests/id_ctad.cpp index 0d2cb74773c88..00d45c9a94dec 100644 --- a/sycl/test/basic_tests/id_ctad.cpp +++ b/sycl/test/basic_tests/id_ctad.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -std=c++17 -fsyntax-only -Xclang -verify %s +// RUN: %clangxx -std=c++17 -fsyntax-only -Xclang -verify %s -I %sycl_include -Xclang -verify-ignore-unexpected=note,warning // expected-no-diagnostics //==--------------- id_ctad.cpp - SYCL id CTAD test ----------------------==// // diff --git a/sycl/test/basic_tests/image_accessor_types.cpp b/sycl/test/basic_tests/image_accessor_types.cpp index f5fa90ebcc4ed..36e8ca4d790c9 100644 --- a/sycl/test/basic_tests/image_accessor_types.cpp +++ b/sycl/test/basic_tests/image_accessor_types.cpp @@ -1,4 +1,4 @@ -// RUN: not %clangxx -fsyntax-only %s 2>&1 | FileCheck %s +// RUN: not %clangxx -fsyntax-only %s -I %sycl_include 2>&1 | FileCheck %s #include #include diff --git a/sycl/test/basic_tests/image_api.cpp b/sycl/test/basic_tests/image_api.cpp index 81548d1d3a0b0..1a5abc258af79 100644 --- a/sycl/test/basic_tests/image_api.cpp +++ b/sycl/test/basic_tests/image_api.cpp @@ -1,14 +1,13 @@ // REQUIRES: opencl // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -I %sycl_source_dir %s -o %t1.out -// RUN: %clangxx -I %sycl_source_dir %s -o %t3.out -lsycl +// RUN: %clangxx -I %sycl_source_dir %s -o %t3.out -lsycl -I %sycl_include // RUN: env SYCL_DEVICE_TYPE=HOST %t1.out // RUN: env SYCL_DEVICE_TYPE=HOST %t3.out // RUN: %CPU_RUN_PLACEHOLDER %t1.out // RUN: %GPU_RUN_PLACEHOLDER %t1.out // RUN: %ACC_RUN_PLACEHOLDER %t1.out - #include // FIXME do not use internal methods in tests. #include diff --git a/sycl/test/basic_tests/image_constructors.cpp b/sycl/test/basic_tests/image_constructors.cpp index ea170ec216881..8891393f9f1fe 100644 --- a/sycl/test/basic_tests/image_constructors.cpp +++ b/sycl/test/basic_tests/image_constructors.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx %s -o %t1.out -lsycl +// RUN: %clangxx %s -o %t1.out -lsycl -I %sycl_include // RUN: env SYCL_DEVICE_TYPE=HOST %t1.out // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t2.out // RUN: env SYCL_DEVICE_TYPE=HOST %t2.out diff --git a/sycl/test/basic_tests/implicit_conversion_error.cpp b/sycl/test/basic_tests/implicit_conversion_error.cpp index 0a94840f96505..8adb3d3bdbc6a 100644 --- a/sycl/test/basic_tests/implicit_conversion_error.cpp +++ b/sycl/test/basic_tests/implicit_conversion_error.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsyntax-only -Xclang -verify %s -Xclang -verify-ignore-unexpected=note,warning +// RUN: %clangxx -fsyntax-only -Xclang -verify %s -I %sycl_include -Xclang -verify-ignore-unexpected=note,warning //==-- implicit_conversion_error.cpp - Unintended implicit conversion check --==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/sycl/test/basic_tests/kernel_info.cpp b/sycl/test/basic_tests/kernel_info.cpp index 541892023ba24..cd771c9e3eee9 100644 --- a/sycl/test/basic_tests/kernel_info.cpp +++ b/sycl/test/basic_tests/kernel_info.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -L %opencl_libs_dir -lOpenCL +// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out // RUN: %CPU_RUN_PLACEHOLDER %t.out // RUN: %GPU_RUN_PLACEHOLDER %t.out // RUN: %ACC_RUN_PLACEHOLDER %t.out @@ -64,4 +64,4 @@ int main() { const cl_ulong prvMemSize = krn.get_work_group_info(dev); CHECK(prvMemSize == 0); -} \ No newline at end of file +} diff --git a/sycl/test/basic_tests/parallel_for_indexers.cpp b/sycl/test/basic_tests/parallel_for_indexers.cpp index ab77def41f731..8faa06d6115de 100644 --- a/sycl/test/basic_tests/parallel_for_indexers.cpp +++ b/sycl/test/basic_tests/parallel_for_indexers.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx %s -o %t1.out -lsycl +// RUN: %clangxx %s -o %t1.out -lsycl -I %sycl_include -Wno-sycl-strict -Xclang -verify-ignore-unexpected=note,warning // RUN: env SYCL_DEVICE_TYPE=HOST %t1.out // RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t2.out // RUN: env SYCL_DEVICE_TYPE=HOST %t2.out diff --git a/sycl/test/basic_tests/property_list.cpp b/sycl/test/basic_tests/property_list.cpp index 4724fa68dd5b7..e65d021502223 100644 --- a/sycl/test/basic_tests/property_list.cpp +++ b/sycl/test/basic_tests/property_list.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx %s -o %t.out -lsycl +// RUN: %clangxx %s -o %t.out -lsycl -I%sycl_include // RUN: env SYCL_DEVICE_TYPE=HOST %t.out // // CHECK: PASSED diff --git a/sycl/test/basic_tests/range_ctad.cpp b/sycl/test/basic_tests/range_ctad.cpp index 30fc69b03578d..ea1ad8ec12fea 100644 --- a/sycl/test/basic_tests/range_ctad.cpp +++ b/sycl/test/basic_tests/range_ctad.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -std=c++17 -fsyntax-only -Xclang -verify %s +// RUN: %clangxx -std=c++17 -fsyntax-only -Xclang -verify %s -I %sycl_include -Xclang -verify-ignore-unexpected=note,warning // expected-no-diagnostics //==--------------- range_ctad.cpp - SYCL range CTAD test ----------------------==// // diff --git a/sycl/test/basic_tests/range_error.cpp b/sycl/test/basic_tests/range_error.cpp index a28fd8242b7b6..d536f0d6547e7 100644 --- a/sycl/test/basic_tests/range_error.cpp +++ b/sycl/test/basic_tests/range_error.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -Xclang -verify %s -Xclang -verify-ignore-unexpected=note,warning -fsyntax-only +// RUN: %clangxx -Xclang -verify %s -I %sycl_include -Xclang -verify-ignore-unexpected=note,warning -fsyntax-only //==--------------- range_error.cpp - SYCL range error test ----------------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/sycl/test/basic_tests/valid_kernel_args.cpp b/sycl/test/basic_tests/valid_kernel_args.cpp index f517449e70eb5..d915895d0f283 100644 --- a/sycl/test/basic_tests/valid_kernel_args.cpp +++ b/sycl/test/basic_tests/valid_kernel_args.cpp @@ -7,10 +7,10 @@ //===----------------------------------------------------------------------===// // The test checks that the types can be used to pass kernel parameters by value -// RUN: %clangxx -fsyntax-only %s +// RUN: %clangxx -fsyntax-only %s -I %sycl_include -Wno-sycl-strict -Xclang -verify-ignore-unexpected=note,warning // Check that the test can be compiled with device compiler as well. -// RUN: %clangxx -fsycl-device-only -fsyntax-only %s +// RUN: %clangxx -fsycl-device-only -fsyntax-only %s -I %sycl_include -Wno-sycl-strict #include @@ -33,4 +33,4 @@ struct SomeStructure { CHECK_PASSING_TO_KERNEL_BY_VALUE(int) CHECK_PASSING_TO_KERNEL_BY_VALUE(cl::sycl::cl_uchar4) CHECK_PASSING_TO_KERNEL_BY_VALUE(SomeStructure) -#endif \ No newline at end of file +#endif diff --git a/sycl/test/basic_tests/vectors/ctad.cpp b/sycl/test/basic_tests/vectors/ctad.cpp index 11a58cc4798f4..5503102c25bc1 100644 --- a/sycl/test/basic_tests/vectors/ctad.cpp +++ b/sycl/test/basic_tests/vectors/ctad.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -std=c++17 -fsyntax-only -Xclang -verify %s +// RUN: %clangxx -std=c++17 -I %sycl_include -fsyntax-only -Xclang -verify %s -Xclang -verify-ignore-unexpected=note,warning // expected-no-diagnostics //==--------------- ctad.cpp - SYCL vector CTAD test --------------------==// // diff --git a/sycl/test/basic_tests/vectors/ctad_fail.cpp b/sycl/test/basic_tests/vectors/ctad_fail.cpp index 4a0432c8ccb96..7ef4a121a7532 100644 --- a/sycl/test/basic_tests/vectors/ctad_fail.cpp +++ b/sycl/test/basic_tests/vectors/ctad_fail.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -std=c++17 -fsyntax-only -Xclang -verify -Xclang -verify-ignore-unexpected %s +// RUN: %clangxx -std=c++17 -fsyntax-only -Xclang -verify %s -I %sycl_include -Xclang -verify-ignore-unexpected //==--------------- ctad.cpp - SYCL vector CTAD fail test ------------------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. diff --git a/sycl/test/basic_tests/vectors/vectors.cpp b/sycl/test/basic_tests/vectors/vectors.cpp index 86a04a3acb00e..3e74c10066859 100644 --- a/sycl/test/basic_tests/vectors/vectors.cpp +++ b/sycl/test/basic_tests/vectors/vectors.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx %s -o %t.out -lsycl +// RUN: %clangxx %s -o %t.out -lsycl -I %sycl_include // RUN: %t.out //==--------------- vectors.cpp - SYCL vectors test ------------------------==// // diff --git a/sycl/test/check_device_code/kernel_arguments_as.cpp b/sycl/test/check_device_code/kernel_arguments_as.cpp index 90e535063b141..0c4c4a1dd2b49 100644 --- a/sycl/test/check_device_code/kernel_arguments_as.cpp +++ b/sycl/test/check_device_code/kernel_arguments_as.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsycl-device-only -Xclang -fsycl-is-device -emit-llvm %s -S -o %t.ll +// 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 // RUN: FileCheck %s --input-file %t.ll // // Check the address space of the pointer in accessor class. diff --git a/sycl/test/kernel_from_file/hw.cpp b/sycl/test/kernel_from_file/hw.cpp index 9f9417ac1eaa1..a9f2b6031d26d 100644 --- a/sycl/test/kernel_from_file/hw.cpp +++ b/sycl/test/kernel_from_file/hw.cpp @@ -1,6 +1,6 @@ //-fsycl-targets=%sycl_triple -// RUN: %clangxx -fsycl-device-only -fno-sycl-use-bitcode -Xclang -fsycl-int-header=%t.h -c %s -o %t.spv -// RUN: %clangxx -include %t.h -g %s -o %t.out -lsycl +// 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 +// RUN: %clangxx -include %t.h -g %s -o %t.out -lsycl -I %sycl_include -Xclang -verify-ignore-unexpected=note,warning // RUN: env SYCL_USE_KERNEL_SPV=%t.spv %t.out | FileCheck %s // CHECK: Passed diff --git a/sycl/test/multi_ptr/ctad.cpp b/sycl/test/multi_ptr/ctad.cpp index 5f6c73ce3aea8..733bc60f8e572 100644 --- a/sycl/test/multi_ptr/ctad.cpp +++ b/sycl/test/multi_ptr/ctad.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -std=c++17 -fsyntax-only -Xclang -verify %s +// RUN: %clangxx -std=c++17 -fsyntax-only -Xclang -verify %s -I %sycl_include -Xclang -verify-ignore-unexpected=note,warning // expected-no-diagnostics //==--------------- ctad.cpp - SYCL multi_ptr CTAD test --------------------==// // diff --git a/sycl/test/regression/constexpr-fp16-numeric-limits.cpp b/sycl/test/regression/constexpr-fp16-numeric-limits.cpp index c3da16460ee52..feab488478683 100644 --- a/sycl/test/regression/constexpr-fp16-numeric-limits.cpp +++ b/sycl/test/regression/constexpr-fp16-numeric-limits.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsycl-device-only -fsyntax-only -Xclang -verify %s +// RUN: %clangxx -fsycl-device-only -fsyntax-only -Xclang -verify %s -I %sycl_include -Xclang -verify-ignore-unexpected=note,warning -Wno-sycl-strict // expected-no-diagnostics #include diff --git a/sycl/test/regression/macro_conflict.cpp b/sycl/test/regression/macro_conflict.cpp index 6e20ab56ded58..e7f595b78af99 100644 --- a/sycl/test/regression/macro_conflict.cpp +++ b/sycl/test/regression/macro_conflict.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsyntax-only -Xclang -verify %s -o %t.out +// RUN: %clangxx -fsyntax-only -I %sycl_include -Xclang -verify %s -o %t.out -Xclang -verify-ignore-unexpected=note,warning // expected-no-diagnostics // //===----------------------------------------------------------------------===// diff --git a/sycl/test/regression/sub-group-store-const-ref.cpp b/sycl/test/regression/sub-group-store-const-ref.cpp index 991f56f30a130..dd10e1d57f12f 100644 --- a/sycl/test/regression/sub-group-store-const-ref.cpp +++ b/sycl/test/regression/sub-group-store-const-ref.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -I %sycl_include -fsyntax-only -Xclang -verify %s +// RUN: %clangxx -fsyntax-only -Xclang -verify %s -I %sycl_include -Xclang -verify-ignore-unexpected=note,warning // expected-no-diagnostics // //==-- sub-group-store-const-ref.cpp ---------------------------------------==// diff --git a/sycl/test/regression/unable-to-redeclare-device.cpp b/sycl/test/regression/unable-to-redeclare-device.cpp index 0c8f2d8fcacd7..5d16e50b877cf 100644 --- a/sycl/test/regression/unable-to-redeclare-device.cpp +++ b/sycl/test/regression/unable-to-redeclare-device.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -I %sycl_include -fsyntax-only -Xclang -verify -DCL_TARGET_OPENCL_VERSION=220 %s +// RUN: %clangxx -fsyntax-only -Xclang -verify -DCL_TARGET_OPENCL_VERSION=220 %s -I %sycl_include -Xclang -verify-ignore-unexpected=note,warning // expected-no-diagnostics // //==-- unable-to-redeclare-device.cpp --------------------------------------==// diff --git a/sycl/test/regression/vec-to-half.cpp b/sycl/test/regression/vec-to-half.cpp index a9aca6503bde2..7ca77a0714226 100644 --- a/sycl/test/regression/vec-to-half.cpp +++ b/sycl/test/regression/vec-to-half.cpp @@ -1,4 +1,4 @@ -// RUN: %clang -O0 -fsyntax-only -Xclang -verify %s +// RUN: %clang -O0 -fsyntax-only -Xclang -verify %s -I %sycl_include -Xclang -verify-ignore-unexpected=note,warning // expected-no-diagnostics #include diff --git a/sycl/test/separate-compile/test.cpp b/sycl/test/separate-compile/test.cpp index 99ad75bf99fbb..96b7fdec07331 100644 --- a/sycl/test/separate-compile/test.cpp +++ b/sycl/test/separate-compile/test.cpp @@ -1,14 +1,14 @@ // >> ---- compile src1 // >> device compilation... -// RUN: %clangxx -fsycl-device-only -Xclang -fsycl-int-header=sycl_ihdr_a.h %s -c -o a_kernel.bc +// 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 // >> host compilation... -// RUN: %clangxx -include sycl_ihdr_a.h -g -c %s -o a.o +// RUN: %clangxx -include sycl_ihdr_a.h -g -c %s -o a.o -I %sycl_include -Wno-sycl-strict // // >> ---- compile src2 // >> device compilation... -// RUN: %clangxx -DB_CPP=1 -fsycl-device-only -Xclang -fsycl-int-header=sycl_ihdr_b.h %s -c -o b_kernel.bc +// 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 // >> host compilation... -// RUN: %clangxx -DB_CPP=1 -include sycl_ihdr_b.h -g -c %s -o b.o +// RUN: %clangxx -DB_CPP=1 -include sycl_ihdr_b.h -g -c %s -o b.o -I %sycl_include -Wno-sycl-strict // // >> ---- bundle .o with .spv // >> run bundler diff --git a/sycl/test/xmethods/accessors-device.cpp b/sycl/test/xmethods/accessors-device.cpp index 196a8f9d74acc..fb932f9534af8 100644 --- a/sycl/test/xmethods/accessors-device.cpp +++ b/sycl/test/xmethods/accessors-device.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsycl-device-only -c -fno-color-diagnostics -Xclang -ast-dump %s | FileCheck %s +// RUN: %clangxx -fsycl-device-only -c -fno-color-diagnostics -Xclang -ast-dump %s -I %sycl_include -Wno-sycl-strict | FileCheck %s // UNSUPPORTED: windows #include diff --git a/sycl/test/xmethods/accessors.cpp b/sycl/test/xmethods/accessors.cpp index b59c5bf0f2af1..f3f2460d0efae 100644 --- a/sycl/test/xmethods/accessors.cpp +++ b/sycl/test/xmethods/accessors.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -c -fno-color-diagnostics -Xclang -ast-dump %s | FileCheck %s +// RUN: %clangxx -c -fno-color-diagnostics -I %sycl_include -Xclang -ast-dump %s | FileCheck %s // UNSUPPORTED: windows #include