diff --git a/clang/lib/Driver/ToolChains/SYCL.cpp b/clang/lib/Driver/ToolChains/SYCL.cpp index 12c34ef6e615d..2412f50112862 100644 --- a/clang/lib/Driver/ToolChains/SYCL.cpp +++ b/clang/lib/Driver/ToolChains/SYCL.cpp @@ -1812,22 +1812,18 @@ void SYCLToolChain::AddSYCLIncludeArgs(const clang::driver::Driver &Driver, const ArgList &DriverArgs, ArgStringList &CC1Args) { // Add the SYCL header search locations in the specified order. - // ../include/sycl // ../include/sycl/stl_wrappers // ../include SmallString<128> IncludePath(Driver.Dir); llvm::sys::path::append(IncludePath, ".."); llvm::sys::path::append(IncludePath, "include"); - SmallString<128> SYCLPath(IncludePath); - llvm::sys::path::append(SYCLPath, "sycl"); // This is used to provide our wrappers around STL headers that provide // additional functions/template specializations when the user includes those // STL headers in their programs (e.g., ). - SmallString<128> STLWrappersPath(SYCLPath); + SmallString<128> STLWrappersPath(IncludePath); + llvm::sys::path::append(STLWrappersPath, "sycl"); llvm::sys::path::append(STLWrappersPath, "stl_wrappers"); CC1Args.push_back("-internal-isystem"); - CC1Args.push_back(DriverArgs.MakeArgString(SYCLPath)); - CC1Args.push_back("-internal-isystem"); CC1Args.push_back(DriverArgs.MakeArgString(STLWrappersPath)); CC1Args.push_back("-internal-isystem"); CC1Args.push_back(DriverArgs.MakeArgString(IncludePath)); diff --git a/clang/test/Driver/sycl-device-old-model.cpp b/clang/test/Driver/sycl-device-old-model.cpp index 67ba53cfc2526..8fc8bfb86f929 100644 --- a/clang/test/Driver/sycl-device-old-model.cpp +++ b/clang/test/Driver/sycl-device-old-model.cpp @@ -6,7 +6,7 @@ /// Check "-fsycl-is-device" is passed when compiling for device: // RUN: %clang -### -fsycl-device-only --no-offload-new-driver %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK-SYCL-DEV %s -// CHECK-SYCL-DEV: "-fsycl-is-device"{{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl" "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include" +// CHECK-SYCL-DEV: "-fsycl-is-device"{{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers" "-internal-isystem" "{{[^"]*}}bin{{[/\\]+}}..{{[/\\]+}}include" /// Check that "-Wno-sycl-strict" is set on compiler invocation with "-fsycl" /// or "-fsycl-device-only" or both: diff --git a/clang/test/Driver/sycl-device.cpp b/clang/test/Driver/sycl-device.cpp index 734e432007bb8..ba14a409bf795 100644 --- a/clang/test/Driver/sycl-device.cpp +++ b/clang/test/Driver/sycl-device.cpp @@ -8,7 +8,7 @@ // RUN: | FileCheck -check-prefix=CHECK-SYCL-DEV %s // RUN: %clang -### --config=%S/Inputs/empty.cfg -fsycl-device-only %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK-SYCL-DEV %s -// CHECK-SYCL-DEV: "-fsycl-is-device"{{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl" "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include" +// CHECK-SYCL-DEV: "-fsycl-is-device"{{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers" "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include" /// Check that "-Wno-sycl-strict" is set on compiler invocation with "-fsycl" /// or "-fsycl-device-only" or both: diff --git a/clang/test/Driver/sycl-int-footer-old-model.cpp b/clang/test/Driver/sycl-int-footer-old-model.cpp index 649a81aa64313..caa6000fad90c 100644 --- a/clang/test/Driver/sycl-int-footer-old-model.cpp +++ b/clang/test/Driver/sycl-int-footer-old-model.cpp @@ -78,7 +78,7 @@ // DEP_GEN: clang{{.*}} "-fsycl-is-device" // DEP_GEN-SAME: "-dependency-file" "[[DEPFILE:.+\.d]]" // DEP_GEN-SAME: "-MT" -// DEP_GEN-SAME: "-internal-isystem" "{{.*}}{{[/\\]+}}include{{[/\\]+}}sycl" +// DEP_GEN-SAME: "-internal-isystem" "{{.*}}{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers" // DEP_GEN-SAME: "-x" "c++" "[[INPUTFILE:.+\.cpp]]" // DEP_GEN: clang{{.*}} "-fsycl-is-host" // DEP_GEN-SAME: "-dependency-file" "[[DEPFILE]]" diff --git a/clang/test/Driver/sycl-int-footer.cpp b/clang/test/Driver/sycl-int-footer.cpp index 730c4b3f7ed82..8186e41de65bc 100644 --- a/clang/test/Driver/sycl-int-footer.cpp +++ b/clang/test/Driver/sycl-int-footer.cpp @@ -66,7 +66,7 @@ // DEP_GEN: clang{{.*}} "-fsycl-is-device" // DEP_GEN-SAME: "-dependency-file" "[[DEPFILE:.+\.d]]" // DEP_GEN-SAME: "-MT" -// DEP_GEN-SAME: "-internal-isystem" "{{.*}}{{[/\\]+}}include{{[/\\]+}}sycl" +// DEP_GEN-SAME: "-internal-isystem" "{{.*}}{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers" // DEP_GEN-SAME: "-x" "c++" "[[INPUTFILE:.+\.cpp]]" // DEP_GEN: clang{{.*}} "-fsycl-is-host" // DEP_GEN-SAME: "-dependency-file" "[[DEPFILE]]" diff --git a/clang/test/Driver/sycl-offload-amdgcn.cpp b/clang/test/Driver/sycl-offload-amdgcn.cpp index 389cdc641119c..636b1354b143d 100644 --- a/clang/test/Driver/sycl-offload-amdgcn.cpp +++ b/clang/test/Driver/sycl-offload-amdgcn.cpp @@ -19,7 +19,7 @@ // RUN: -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 -nogpulib\ // RUN: -fsycl-libspirv-path=%S/Inputs/SYCL/libspirv.bc %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-ACTIONS %s -// CHK-ACTIONS: "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-unknown-linux-gnu"{{.*}} "-fsycl-is-device"{{.*}} "-Wno-sycl-strict"{{.*}} "-sycl-std=2020" {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libspirv.bc"{{.*}} "-target-cpu" "gfx906"{{.*}} "-std=c++11"{{.*}} +// CHK-ACTIONS: "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-unknown-linux-gnu"{{.*}} "-fsycl-is-device"{{.*}} "-Wno-sycl-strict"{{.*}} "-sycl-std=2020" {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libspirv.bc"{{.*}} "-target-cpu" "gfx906"{{.*}} "-std=c++11"{{.*}} // CHK-ACTIONS-NOT: "-mllvm -sycl-opt" // CHK-ACTIONS: clang-offload-wrapper"{{.*}} "-host=x86_64-unknown-linux-gnu" "-compile-opts=--offload-arch=gfx906" "-target=amdgcn" "-kind=sycl"{{.*}} diff --git a/clang/test/Driver/sycl-offload-header-check.cpp b/clang/test/Driver/sycl-offload-header-check.cpp index 7752745d781d6..acb84ec93830d 100644 --- a/clang/test/Driver/sycl-offload-header-check.cpp +++ b/clang/test/Driver/sycl-offload-header-check.cpp @@ -10,6 +10,6 @@ // RUN: %clang -### -fsycl %s 2>&1 | \ // RUN: FileCheck --check-prefix=CHECK-HEADER %s // CHECK-HEADER: clang{{.*}} "-fsycl-int-header=[[HEADER:.+\.h]]" -// CHECK-HEADER: {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl" +// CHECK-HEADER: {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers" // CHECK-HEADER-NOT: clang{{.*}} "-include" "[[HEADER]]" // CHECK-HEADER: clang{{.*}} "-include" "{{.*}}_dirname{{.+}}.h" diff --git a/clang/test/Driver/sycl-offload-intelfpga.cpp b/clang/test/Driver/sycl-offload-intelfpga.cpp index cf6b2979b8ff0..cc30d23ebfe87 100644 --- a/clang/test/Driver/sycl-offload-intelfpga.cpp +++ b/clang/test/Driver/sycl-offload-intelfpga.cpp @@ -7,7 +7,7 @@ // RUN: | FileCheck -check-prefix=CHK-HEADERS-INTELFPGA %s // RUN: %clangxx -### -target x86_64-unknown-linux-gnu -fsycl -fsycl-targets=spir64_fpga-unknown-unknown %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-HEADERS-INTELFPGA %s -// CHK-HEADERS-INTELFPGA: clang{{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl" +// CHK-HEADERS-INTELFPGA: clang{{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers" /// -fintelfpga implies -g and -MMD // RUN: %clangxx -### -target x86_64-unknown-linux-gnu -fintelfpga -Xshardware %s 2>&1 \ diff --git a/clang/test/Driver/sycl-offload-nvptx.cpp b/clang/test/Driver/sycl-offload-nvptx.cpp index 324c5aa9cdd0e..9c15f6ee27b77 100644 --- a/clang/test/Driver/sycl-offload-nvptx.cpp +++ b/clang/test/Driver/sycl-offload-nvptx.cpp @@ -13,7 +13,7 @@ // RUN: -fsycl-libspirv-path=%S/Inputs/SYCL/libspirv.bc %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-ACTIONS-WIN %s -// CHK-ACTIONS: "-cc1" "-triple" "nvptx64-nvidia-cuda" "-aux-triple" "x86_64-unknown-linux-gnu"{{.*}} "-fsycl-is-device"{{.*}} "-Wno-sycl-strict"{{.*}} "-sycl-std=2020" {{.*}} "-emit-llvm-bc" {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libspirv.bc"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libdevice{{.*}}.10.bc"{{.*}} "-target-sdk-version=[[CUDA_VERSION:[0-9.]+]]"{{.*}} "-target-cpu" "sm_50"{{.*}} "-target-feature" "+ptx42"{{.*}} "-std=c++11"{{.*}} +// CHK-ACTIONS: "-cc1" "-triple" "nvptx64-nvidia-cuda" "-aux-triple" "x86_64-unknown-linux-gnu"{{.*}} "-fsycl-is-device"{{.*}} "-Wno-sycl-strict"{{.*}} "-sycl-std=2020" {{.*}} "-emit-llvm-bc" {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libspirv.bc"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libdevice{{.*}}.10.bc"{{.*}} "-target-sdk-version=[[CUDA_VERSION:[0-9.]+]]"{{.*}} "-target-cpu" "sm_50"{{.*}} "-target-feature" "+ptx42"{{.*}} "-std=c++11"{{.*}} // CHK-ACTIONS: sycl-post-link{{.*}} "-split=auto" // CHK-ACTIONS: file-table-tform" "-extract=Code" "-drop_titles" // CHK-ACTIONS: llvm-foreach" {{.*}} "--" "{{.*}}clang-{{[0-9]+}}" @@ -23,7 +23,7 @@ // CHK-ACTIONS-NOT: "-mllvm -sycl-opt" // CHK-ACTIONS: clang-offload-wrapper"{{.*}} "-host=x86_64-unknown-linux-gnu" "-target=nvptx64" "-kind=sycl"{{.*}} -// CHK-ACTIONS-WIN: "-cc1" "-triple" "nvptx64-nvidia-cuda" "-aux-triple" "x86_64-pc-windows-msvc"{{.*}} "-fsycl-is-device"{{.*}} "-Wno-sycl-strict"{{.*}} "-sycl-std=2020" {{.*}} "-emit-llvm-bc" {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libspirv.bc"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libdevice{{.*}}.10.bc"{{.*}} "-target-sdk-version=[[CUDA_VERSION:[0-9.]+]]"{{.*}} "-target-cpu" "sm_50"{{.*}} "-target-feature" "+ptx42"{{.*}} +// CHK-ACTIONS-WIN: "-cc1" "-triple" "nvptx64-nvidia-cuda" "-aux-triple" "x86_64-pc-windows-msvc"{{.*}} "-fsycl-is-device"{{.*}} "-Wno-sycl-strict"{{.*}} "-sycl-std=2020" {{.*}} "-emit-llvm-bc" {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libspirv.bc"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libdevice{{.*}}.10.bc"{{.*}} "-target-sdk-version=[[CUDA_VERSION:[0-9.]+]]"{{.*}} "-target-cpu" "sm_50"{{.*}} "-target-feature" "+ptx42"{{.*}} // CHK-ACTIONS-WIN: sycl-post-link{{.*}} "-split=auto" // CHK-ACTIONS-WIN: file-table-tform" "-extract=Code" "-drop_titles" // CHK-ACTIONS-WIN: llvm-foreach" {{.*}} "--" "{{.*}}clang-{{[0-9]+}}" diff --git a/clang/test/Driver/sycl-offload-old-model.c b/clang/test/Driver/sycl-offload-old-model.c index bc310be7ae58f..685ada6119c93 100644 --- a/clang/test/Driver/sycl-offload-old-model.c +++ b/clang/test/Driver/sycl-offload-old-model.c @@ -782,14 +782,10 @@ // RUN: %clang -### -fsycl --no-offload-new-driver %s 2>&1 | FileCheck %s -check-prefixes=CHECK-HEADER-DIR // RUN: %clang_cl -### -fsycl --no-offload-new-driver %s 2>&1 | FileCheck %s -check-prefixes=CHECK-HEADER-DIR // CHECK-HEADER-DIR: clang{{.*}} "-fsycl-is-device" -// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT:[^"]*]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl" -// CHECK-HEADER-DIR-NOT: -internal-isystem -// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers" +// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT:[^"]*]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers" // CHECK-HEADER-DIR-NOT: -internal-isystem // CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include" // CHECK-HEADER-DIR: clang{{.*}} "-fsycl-is-host" -// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl" -// CHECK-HEADER-DIR-NOT: -internal-isystem // CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers" // CHECK-HEADER-DIR-NOT: -internal-isystem // CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include" diff --git a/clang/test/Driver/sycl-offload.c b/clang/test/Driver/sycl-offload.c index 17602ad2ed614..4a11b7022c5f7 100644 --- a/clang/test/Driver/sycl-offload.c +++ b/clang/test/Driver/sycl-offload.c @@ -497,14 +497,10 @@ // RUN: %clang -### -fsycl --offload-new-driver %s 2>&1 | FileCheck %s -check-prefixes=CHECK-HEADER-DIR // RUN: %clang_cl -### -fsycl --offload-new-driver %s 2>&1 | FileCheck %s -check-prefixes=CHECK-HEADER-DIR // CHECK-HEADER-DIR: clang{{.*}} "-fsycl-is-device" -// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT:[^"]*]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl" -// CHECK-HEADER-DIR-NOT: -internal-isystem -// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers" +// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT:[^"]*]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers" // CHECK-HEADER-DIR-NOT: -internal-isystem // CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include" // CHECK-HEADER-DIR: clang{{.*}} "-fsycl-is-host" -// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl" -// CHECK-HEADER-DIR-NOT: -internal-isystem // CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers" // CHECK-HEADER-DIR-NOT: -internal-isystem // CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include" diff --git a/clang/test/Driver/sycl.c b/clang/test/Driver/sycl.c index 322315673b4e1..70bd1467e24c1 100644 --- a/clang/test/Driver/sycl.c +++ b/clang/test/Driver/sycl.c @@ -13,7 +13,7 @@ // ENABLED: "-cc1"{{.*}} "-fsycl-is-device" // ENABLED-SAME: "-sycl-std={{[-.sycl0-9]+}}" -// ENABLED-SAME: "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl" +// ENABLED-SAME: "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers" // NOT_ENABLED-NOT: "-fsycl-is-device" // NOT_ENABLED-NOT: "-fsycl-std-layout-kernel-params" @@ -44,7 +44,7 @@ // RUN: %clang_cl -### --target=i386-pc-windows-msvc -fsycl-device-only %s 2>&1 | FileCheck %s --check-prefix=DEFAULT -DSPIRARCH=spir // DEFAULT: "-triple" "[[SPIRARCH]]-unknown-{{.*}}"{{.*}} "-fsycl-is-device"{{.*}} "-sycl-std=2020"{{.*}} "-emit-llvm-bc" -// DEFAULT: "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl" +// DEFAULT: "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers" // DEFAULT: "-internal-isystem" "{{.*lib.*clang.*include}}" // DEFAULT: "-std=c++17" // DEFAULT-NOT: "{{.*}}llvm-spirv"{{.*}} diff --git a/sycl/CMakeLists.txt b/sycl/CMakeLists.txt index 1bc03edd866ce..2470ccac77a1d 100644 --- a/sycl/CMakeLists.txt +++ b/sycl/CMakeLists.txt @@ -160,12 +160,11 @@ endif() # Copy OpenCL Headers into sycl headers build directory # Compiler does automatic lookup bin/../include based on clang binary location, # e.g. when run LIT tests -file(COPY ${OpenCL_INCLUDE_DIR}/CL - DESTINATION ${SYCL_INCLUDE_BUILD_DIR}/sycl) +file(COPY ${OpenCL_INCLUDE_DIR}/CL DESTINATION ${SYCL_INCLUDE_BUILD_DIR}) # Include OpenCL Headers into final bundle. install(DIRECTORY ${OpenCL_INCLUDE_DIR}/CL - DESTINATION ${SYCL_INCLUDE_DIR}/sycl + DESTINATION ${SYCL_INCLUDE_DIR} COMPONENT OpenCL-Headers) # Option for enabling building the SYCL major release preview library. @@ -220,7 +219,7 @@ file(GLOB_RECURSE HEADERS_IN_SYCLCOMPAT_DIR CONFIGURE_DEPENDS "${sycl_inc_dir}/s string(REPLACE "${sycl_inc_dir}" "${SYCL_INCLUDE_BUILD_DIR}" OUT_HEADERS_IN_SYCL_DIR "${HEADERS_IN_SYCL_DIR}") -string(REPLACE "${sycl_inc_dir}/CL" "${SYCL_INCLUDE_BUILD_DIR}/sycl/CL" +string(REPLACE "${sycl_inc_dir}/CL" "${SYCL_INCLUDE_BUILD_DIR}/CL" OUT_HEADERS_IN_CL_DIR "${HEADERS_IN_CL_DIR}") string(REPLACE "${sycl_inc_dir}" "${SYCL_INCLUDE_BUILD_DIR}" OUT_HEADERS_IN_STD_DIR "${HEADERS_IN_STD_DIR}") @@ -245,27 +244,27 @@ add_custom_command( ${HEADERS_IN_STD_DIR} ${HEADERS_IN_SYCLCOMPAT_DIR} COMMAND ${CMAKE_COMMAND} -E copy_directory ${sycl_inc_dir}/sycl ${SYCL_INCLUDE_BUILD_DIR}/sycl - COMMAND ${CMAKE_COMMAND} -E copy_directory ${sycl_inc_dir}/CL ${SYCL_INCLUDE_BUILD_DIR}/sycl/CL + COMMAND ${CMAKE_COMMAND} -E copy_directory ${sycl_inc_dir}/CL ${SYCL_INCLUDE_BUILD_DIR}/CL COMMAND ${CMAKE_COMMAND} -E copy_directory ${sycl_inc_dir}/std ${SYCL_INCLUDE_BUILD_DIR}/std COMMAND ${CMAKE_COMMAND} -E copy_directory ${sycl_inc_dir}/syclcompat ${SYCL_INCLUDE_BUILD_DIR}/syclcompat COMMAND ${CMAKE_COMMAND} -E copy ${sycl_inc_dir}/syclcompat.hpp ${SYCL_INCLUDE_BUILD_DIR}/syclcompat.hpp - COMMAND ${CMAKE_COMMAND} -E copy ${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api.h ${SYCL_INCLUDE_BUILD_DIR}/sycl - COMMAND ${CMAKE_COMMAND} -E copy ${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api_funcs.def ${SYCL_INCLUDE_BUILD_DIR}/sycl - COMMAND ${CMAKE_COMMAND} -E copy ${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_print.hpp ${SYCL_INCLUDE_BUILD_DIR}/sycl + COMMAND ${CMAKE_COMMAND} -E copy ${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api.h ${SYCL_INCLUDE_BUILD_DIR} + COMMAND ${CMAKE_COMMAND} -E copy ${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api_funcs.def ${SYCL_INCLUDE_BUILD_DIR} + COMMAND ${CMAKE_COMMAND} -E copy ${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_print.hpp ${SYCL_INCLUDE_BUILD_DIR} COMMENT "Copying SYCL headers ...") # Copy SYCL headers from source to install directory install(DIRECTORY "${sycl_inc_dir}/sycl" DESTINATION ${SYCL_INCLUDE_DIR} COMPONENT sycl-headers) -install(DIRECTORY "${sycl_inc_dir}/CL" DESTINATION ${SYCL_INCLUDE_DIR}/sycl COMPONENT sycl-headers) +install(DIRECTORY "${sycl_inc_dir}/CL" DESTINATION ${SYCL_INCLUDE_DIR}/ COMPONENT sycl-headers) install(DIRECTORY "${sycl_inc_dir}/std" DESTINATION ${SYCL_INCLUDE_DIR} COMPONENT sycl-headers) install(DIRECTORY ${BOOST_MP11_DESTINATION_DIR} DESTINATION ${SYCL_INCLUDE_DIR}/sycl/detail COMPONENT boost_mp11-headers) install(DIRECTORY "${sycl_inc_dir}/syclcompat" DESTINATION ${SYCL_INCLUDE_DIR} COMPONENT sycl-headers) install(FILES "${sycl_inc_dir}/syclcompat.hpp" DESTINATION ${SYCL_INCLUDE_DIR} COMPONENT sycl-headers) -install(FILES "${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api.h" DESTINATION ${SYCL_INCLUDE_DIR}/sycl +install(FILES "${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api.h" DESTINATION ${SYCL_INCLUDE_DIR} COMPONENT sycl-headers) -install(FILES "${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api_funcs.def" DESTINATION ${SYCL_INCLUDE_DIR}/sycl +install(FILES "${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api_funcs.def" DESTINATION ${SYCL_INCLUDE_DIR} COMPONENT sycl-headers) -install(FILES "${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_print.hpp" DESTINATION ${SYCL_INCLUDE_DIR}/sycl +install(FILES "${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_print.hpp" DESTINATION ${SYCL_INCLUDE_DIR} COMPONENT sycl-headers) if (WIN32) diff --git a/sycl/include/sycl/ext/oneapi/bindless_images_mem_handle.hpp b/sycl/include/sycl/ext/oneapi/bindless_images_mem_handle.hpp index 80f2563d43191..0d859fb9e3288 100644 --- a/sycl/include/sycl/ext/oneapi/bindless_images_mem_handle.hpp +++ b/sycl/include/sycl/ext/oneapi/bindless_images_mem_handle.hpp @@ -8,7 +8,7 @@ #pragma once -#include "sycl/ur_api.h" +#include namespace sycl { inline namespace _V1 { diff --git a/sycl/include/syclcompat/kernel.hpp b/sycl/include/syclcompat/kernel.hpp index 7c99e02a4ba82..8fdabf6a47765 100644 --- a/sycl/include/syclcompat/kernel.hpp +++ b/sycl/include/syclcompat/kernel.hpp @@ -47,9 +47,9 @@ #endif #include -#include #include +#include #include #include #include diff --git a/sycl/test-e2e/ESIMD/regression/bfloat16Constructor.cpp b/sycl/test-e2e/ESIMD/regression/bfloat16Constructor.cpp index 54af5353aefb7..16b7af9452c95 100644 --- a/sycl/test-e2e/ESIMD/regression/bfloat16Constructor.cpp +++ b/sycl/test-e2e/ESIMD/regression/bfloat16Constructor.cpp @@ -10,9 +10,9 @@ //===----------------------------------------------------------------------===// // This is basic test to verify use of bfloat16 constructor in kernel. -#include #include #include +#include #include using namespace sycl; diff --git a/sycl/test/basic_tests/macros_no_rdc.cpp b/sycl/test/basic_tests/macros_no_rdc.cpp index 4ffc0ec8d91ca..aed25568e6a6e 100644 --- a/sycl/test/basic_tests/macros_no_rdc.cpp +++ b/sycl/test/basic_tests/macros_no_rdc.cpp @@ -23,6 +23,6 @@ // HOST-DAG: #define SYCL_EXTERNAL // HOST-DAG: #define __DPCPP_SYCL_EXTERNAL #include -#include "ext/oneapi/bfloat16.hpp" -#include "ext/intel/esimd.hpp" -#include "ext/oneapi/experimental/complex/complex.hpp" +#include +#include +#include diff --git a/sycl/test/basic_tests/min_max_test.cpp b/sycl/test/basic_tests/min_max_test.cpp index e91b3f18102e5..5b2e16c3c0cb0 100644 --- a/sycl/test/basic_tests/min_max_test.cpp +++ b/sycl/test/basic_tests/min_max_test.cpp @@ -1,11 +1,11 @@ // REQUIRES: windows -// RUN: %clangxx -fsycl -fsycl-device-only -fsyntax-only -Xclang -verify %s -I %sycl_include -// RUN: %clangxx -fsycl -fpreview-breaking-changes -fsycl-device-only -fsyntax-only -Xclang -verify %s -I %sycl_include +// RUN: %clangxx -fsycl -fsycl-device-only -fsyntax-only -Xclang -verify %s +// RUN: %clangxx -fsycl -fpreview-breaking-changes -fsycl-device-only -fsyntax-only -Xclang -verify %s // expected-no-diagnostics #include "windows.h" -#include "sycl.hpp" +#include int main() { int tmp = min(1, 4); diff --git a/sycl/test/esimd/esimd-util-compiler-eval.cpp b/sycl/test/esimd/esimd-util-compiler-eval.cpp index 9c5ee3ab50396..b77653555ce27 100644 --- a/sycl/test/esimd/esimd-util-compiler-eval.cpp +++ b/sycl/test/esimd/esimd-util-compiler-eval.cpp @@ -1,8 +1,8 @@ // RUN: %clangxx -fsycl -fsycl-device-only -c %s // This test checks compile-time evaluation of functions from esimd_util.hpp -#include "sycl.hpp" -#include "sycl/ext/intel/esimd.hpp" +#include +#include using namespace sycl::ext::intel::esimd; using namespace sycl::ext::intel::esimd::detail; diff --git a/sycl/test/esimd/esimd_verify_local_names.cpp b/sycl/test/esimd/esimd_verify_local_names.cpp index 14ae15bbed279..45ff2a22b504e 100644 --- a/sycl/test/esimd/esimd_verify_local_names.cpp +++ b/sycl/test/esimd/esimd_verify_local_names.cpp @@ -1,7 +1,7 @@ // RUN: %clangxx -fsycl -fsycl-device-only -S %s -o /dev/null // Test that the ESIMD Verifier doesn't error on locally defined types -#include #include +#include using namespace sycl::ext::intel::esimd; diff --git a/sycl/test/include_deps/deps_known.sh b/sycl/test/include_deps/deps_known.sh index 65dce35dc08df..d4b33541b0205 100644 --- a/sycl/test/include_deps/deps_known.sh +++ b/sycl/test/include_deps/deps_known.sh @@ -13,8 +13,10 @@ function deps() { clang++ -fsycl -fsycl-device-only -include "$HEADER" -c -x c++ /dev/null -o /dev/null -MD -MF - \ | sed 's@: /dev/null@: /dev/null\n@' \ - | grep 'include/sycl\|/dev/null\|:' \ + | grep 'include/sycl\|/dev/null\|CL/\|ur_\|:' \ | sed 's@.*/include/sycl/@@' \ + | sed 's@.*/include/CL/@CL/@' \ + | sed 's@.*/include/ur_@ur_@' \ | sed 's/ \\//' } diff --git a/sycl/test/native_cpu/no-opt.cpp b/sycl/test/native_cpu/no-opt.cpp index 7831d1d7af2ef..2e23e6eb98992 100644 --- a/sycl/test/native_cpu/no-opt.cpp +++ b/sycl/test/native_cpu/no-opt.cpp @@ -3,7 +3,7 @@ // RUN: env ONEAPI_DEVICE_SELECTOR="native_cpu:cpu" %t // RUN: env ONEAPI_DEVICE_SELECTOR="native_cpu:cpu" SYCL_DEVICE_ALLOWLIST="BackendName:native_cpu" %t -#include "sycl.hpp" +#include class Test1; int main() { const size_t N = 4; diff --git a/sycl/test/regression/builtin_generic_ptr.cpp b/sycl/test/regression/builtin_generic_ptr.cpp index 02245b627a6d4..565fb43616734 100644 --- a/sycl/test/regression/builtin_generic_ptr.cpp +++ b/sycl/test/regression/builtin_generic_ptr.cpp @@ -5,7 +5,7 @@ // Regression test ensuring math builtins accept multi_ptr in the generic // address space. -#include +#include int main() { sycl::queue Q; diff --git a/sycl/test/regression/unnamed-lambda-split-order.cpp b/sycl/test/regression/unnamed-lambda-split-order.cpp index c423a98647994..8a946b8e70850 100644 --- a/sycl/test/regression/unnamed-lambda-split-order.cpp +++ b/sycl/test/regression/unnamed-lambda-split-order.cpp @@ -1,5 +1,5 @@ // RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsyntax-only %s -#include "sycl.hpp" +#include // This validates the case where using a lambda in a kernel in a different order // than the lexical order of the lambdas. In a previous implementation of diff --git a/sycl/test/regression/unnamed-lambda.cpp b/sycl/test/regression/unnamed-lambda.cpp index 1eb4f182c80e4..948c3b8cf759e 100644 --- a/sycl/test/regression/unnamed-lambda.cpp +++ b/sycl/test/regression/unnamed-lambda.cpp @@ -1,6 +1,6 @@ // RUN: %clangxx -fsycl -fsyntax-only %s -#include "sycl.hpp" +#include // This validates that the unnamed lambda logic in the library correctly works // with a new implementation of __builtin_unique_stable_name, where diff --git a/sycl/test/warnings/sycl_2020_deprecations.cpp b/sycl/test/warnings/sycl_2020_deprecations.cpp index aa0b4b3553ec4..c3f7d8a3450d3 100644 --- a/sycl/test/warnings/sycl_2020_deprecations.cpp +++ b/sycl/test/warnings/sycl_2020_deprecations.cpp @@ -1,6 +1,6 @@ // RUN: %clangxx %fsycl-host-only -fsyntax-only -ferror-limit=0 -sycl-std=2020 -Xclang -verify -Xclang -verify-ignore-unexpected=note %s -// expected-warning@sycl/CL/sycl.hpp:* {{CL/sycl.hpp is deprecated, use sycl/sycl.hpp}} +// expected-warning@CL/sycl.hpp:* {{CL/sycl.hpp is deprecated, use sycl/sycl.hpp}} #include #include