Skip to content

Commit d640ff4

Browse files
[SYCL] Don't add include/sycl/ to the system includes path (#15437)
Fixes #6770
1 parent 30578ba commit d640ff4

26 files changed

+46
-57
lines changed

clang/lib/Driver/ToolChains/SYCL.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1815,22 +1815,18 @@ void SYCLToolChain::AddSYCLIncludeArgs(const clang::driver::Driver &Driver,
18151815
const ArgList &DriverArgs,
18161816
ArgStringList &CC1Args) {
18171817
// Add the SYCL header search locations in the specified order.
1818-
// ../include/sycl
18191818
// ../include/sycl/stl_wrappers
18201819
// ../include
18211820
SmallString<128> IncludePath(Driver.Dir);
18221821
llvm::sys::path::append(IncludePath, "..");
18231822
llvm::sys::path::append(IncludePath, "include");
1824-
SmallString<128> SYCLPath(IncludePath);
1825-
llvm::sys::path::append(SYCLPath, "sycl");
18261823
// This is used to provide our wrappers around STL headers that provide
18271824
// additional functions/template specializations when the user includes those
18281825
// STL headers in their programs (e.g., <complex>).
1829-
SmallString<128> STLWrappersPath(SYCLPath);
1826+
SmallString<128> STLWrappersPath(IncludePath);
1827+
llvm::sys::path::append(STLWrappersPath, "sycl");
18301828
llvm::sys::path::append(STLWrappersPath, "stl_wrappers");
18311829
CC1Args.push_back("-internal-isystem");
1832-
CC1Args.push_back(DriverArgs.MakeArgString(SYCLPath));
1833-
CC1Args.push_back("-internal-isystem");
18341830
CC1Args.push_back(DriverArgs.MakeArgString(STLWrappersPath));
18351831
CC1Args.push_back("-internal-isystem");
18361832
CC1Args.push_back(DriverArgs.MakeArgString(IncludePath));

clang/test/Driver/sycl-device-old-model.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/// Check "-fsycl-is-device" is passed when compiling for device:
77
// RUN: %clang -### -fsycl-device-only --no-offload-new-driver %s 2>&1 \
88
// RUN: | FileCheck -check-prefix=CHECK-SYCL-DEV %s
9-
// CHECK-SYCL-DEV: "-fsycl-is-device"{{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl" "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include"
9+
// CHECK-SYCL-DEV: "-fsycl-is-device"{{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers" "-internal-isystem" "{{[^"]*}}bin{{[/\\]+}}..{{[/\\]+}}include"
1010

1111
/// Check that "-Wno-sycl-strict" is set on compiler invocation with "-fsycl"
1212
/// or "-fsycl-device-only" or both:

clang/test/Driver/sycl-device.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// RUN: | FileCheck -check-prefix=CHECK-SYCL-DEV %s
99
// RUN: %clang -### --config=%S/Inputs/empty.cfg -fsycl-device-only %s 2>&1 \
1010
// RUN: | FileCheck -check-prefix=CHECK-SYCL-DEV %s
11-
// CHECK-SYCL-DEV: "-fsycl-is-device"{{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl" "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include"
11+
// CHECK-SYCL-DEV: "-fsycl-is-device"{{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers" "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include"
1212

1313
/// Check that "-Wno-sycl-strict" is set on compiler invocation with "-fsycl"
1414
/// or "-fsycl-device-only" or both:

clang/test/Driver/sycl-int-footer-old-model.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
// DEP_GEN: clang{{.*}} "-fsycl-is-device"
7979
// DEP_GEN-SAME: "-dependency-file" "[[DEPFILE:.+\.d]]"
8080
// DEP_GEN-SAME: "-MT"
81-
// DEP_GEN-SAME: "-internal-isystem" "{{.*}}{{[/\\]+}}include{{[/\\]+}}sycl"
81+
// DEP_GEN-SAME: "-internal-isystem" "{{.*}}{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"
8282
// DEP_GEN-SAME: "-x" "c++" "[[INPUTFILE:.+\.cpp]]"
8383
// DEP_GEN: clang{{.*}} "-fsycl-is-host"
8484
// DEP_GEN-SAME: "-dependency-file" "[[DEPFILE]]"

clang/test/Driver/sycl-int-footer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
// DEP_GEN: clang{{.*}} "-fsycl-is-device"
6767
// DEP_GEN-SAME: "-dependency-file" "[[DEPFILE:.+\.d]]"
6868
// DEP_GEN-SAME: "-MT"
69-
// DEP_GEN-SAME: "-internal-isystem" "{{.*}}{{[/\\]+}}include{{[/\\]+}}sycl"
69+
// DEP_GEN-SAME: "-internal-isystem" "{{.*}}{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"
7070
// DEP_GEN-SAME: "-x" "c++" "[[INPUTFILE:.+\.cpp]]"
7171
// DEP_GEN: clang{{.*}} "-fsycl-is-host"
7272
// DEP_GEN-SAME: "-dependency-file" "[[DEPFILE]]"

clang/test/Driver/sycl-offload-amdgcn.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
// RUN: -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 -nogpulib\
2020
// RUN: -fsycl-libspirv-path=%S/Inputs/SYCL/libspirv.bc %s 2>&1 \
2121
// RUN: | FileCheck -check-prefix=CHK-ACTIONS %s
22-
// 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"{{.*}}
22+
// 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"{{.*}}
2323
// CHK-ACTIONS-NOT: "-mllvm -sycl-opt"
2424
// CHK-ACTIONS: clang-offload-wrapper"{{.*}} "-host=x86_64-unknown-linux-gnu" "-compile-opts=--offload-arch=gfx906" "-target=amdgcn" "-kind=sycl"{{.*}}
2525

clang/test/Driver/sycl-offload-header-check.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
// RUN: %clang -### -fsycl %s 2>&1 | \
1111
// RUN: FileCheck --check-prefix=CHECK-HEADER %s
1212
// CHECK-HEADER: clang{{.*}} "-fsycl-int-header=[[HEADER:.+\.h]]"
13-
// CHECK-HEADER: {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"
13+
// CHECK-HEADER: {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"
1414
// CHECK-HEADER-NOT: clang{{.*}} "-include" "[[HEADER]]"
1515
// CHECK-HEADER: clang{{.*}} "-include" "{{.*}}_dirname{{.+}}.h"

clang/test/Driver/sycl-offload-intelfpga.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// RUN: | FileCheck -check-prefix=CHK-HEADERS-INTELFPGA %s
88
// RUN: %clangxx -### -target x86_64-unknown-linux-gnu -fsycl -fsycl-targets=spir64_fpga-unknown-unknown %s 2>&1 \
99
// RUN: | FileCheck -check-prefix=CHK-HEADERS-INTELFPGA %s
10-
// CHK-HEADERS-INTELFPGA: clang{{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"
10+
// CHK-HEADERS-INTELFPGA: clang{{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"
1111

1212
/// -fintelfpga implies -g and -MMD
1313
// RUN: %clangxx -### -target x86_64-unknown-linux-gnu -fintelfpga -Xshardware %s 2>&1 \

clang/test/Driver/sycl-offload-nvptx.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// RUN: -fsycl-libspirv-path=%S/Inputs/SYCL/libspirv.bc %s 2>&1 \
1414
// RUN: | FileCheck -check-prefix=CHK-ACTIONS-WIN %s
1515

16-
// 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"{{.*}}
16+
// 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"{{.*}}
1717
// CHK-ACTIONS: sycl-post-link{{.*}} "-split=auto"
1818
// CHK-ACTIONS: file-table-tform" "-extract=Code" "-drop_titles"
1919
// CHK-ACTIONS: llvm-foreach" {{.*}} "--" "{{.*}}clang-{{[0-9]+}}"
@@ -23,7 +23,7 @@
2323
// CHK-ACTIONS-NOT: "-mllvm -sycl-opt"
2424
// CHK-ACTIONS: clang-offload-wrapper"{{.*}} "-host=x86_64-unknown-linux-gnu" "-target=nvptx64" "-kind=sycl"{{.*}}
2525

26-
// 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"{{.*}}
26+
// 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"{{.*}}
2727
// CHK-ACTIONS-WIN: sycl-post-link{{.*}} "-split=auto"
2828
// CHK-ACTIONS-WIN: file-table-tform" "-extract=Code" "-drop_titles"
2929
// CHK-ACTIONS-WIN: llvm-foreach" {{.*}} "--" "{{.*}}clang-{{[0-9]+}}"

clang/test/Driver/sycl-offload-old-model.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -782,14 +782,10 @@
782782
// RUN: %clang -### -fsycl --no-offload-new-driver %s 2>&1 | FileCheck %s -check-prefixes=CHECK-HEADER-DIR
783783
// RUN: %clang_cl -### -fsycl --no-offload-new-driver %s 2>&1 | FileCheck %s -check-prefixes=CHECK-HEADER-DIR
784784
// CHECK-HEADER-DIR: clang{{.*}} "-fsycl-is-device"
785-
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT:[^"]*]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"
786-
// CHECK-HEADER-DIR-NOT: -internal-isystem
787-
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"
785+
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT:[^"]*]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"
788786
// CHECK-HEADER-DIR-NOT: -internal-isystem
789787
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include"
790788
// CHECK-HEADER-DIR: clang{{.*}} "-fsycl-is-host"
791-
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"
792-
// CHECK-HEADER-DIR-NOT: -internal-isystem
793789
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"
794790
// CHECK-HEADER-DIR-NOT: -internal-isystem
795791
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include"

clang/test/Driver/sycl-offload.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -497,14 +497,10 @@
497497
// RUN: %clang -### -fsycl --offload-new-driver %s 2>&1 | FileCheck %s -check-prefixes=CHECK-HEADER-DIR
498498
// RUN: %clang_cl -### -fsycl --offload-new-driver %s 2>&1 | FileCheck %s -check-prefixes=CHECK-HEADER-DIR
499499
// CHECK-HEADER-DIR: clang{{.*}} "-fsycl-is-device"
500-
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT:[^"]*]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"
501-
// CHECK-HEADER-DIR-NOT: -internal-isystem
502-
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"
500+
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT:[^"]*]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"
503501
// CHECK-HEADER-DIR-NOT: -internal-isystem
504502
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include"
505503
// CHECK-HEADER-DIR: clang{{.*}} "-fsycl-is-host"
506-
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"
507-
// CHECK-HEADER-DIR-NOT: -internal-isystem
508504
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"
509505
// CHECK-HEADER-DIR-NOT: -internal-isystem
510506
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include"

clang/test/Driver/sycl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
// ENABLED: "-cc1"{{.*}} "-fsycl-is-device"
1515
// ENABLED-SAME: "-sycl-std={{[-.sycl0-9]+}}"
16-
// ENABLED-SAME: "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"
16+
// ENABLED-SAME: "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"
1717

1818
// NOT_ENABLED-NOT: "-fsycl-is-device"
1919
// NOT_ENABLED-NOT: "-fsycl-std-layout-kernel-params"
@@ -44,7 +44,7 @@
4444
// RUN: %clang_cl -### --target=i386-pc-windows-msvc -fsycl-device-only %s 2>&1 | FileCheck %s --check-prefix=DEFAULT -DSPIRARCH=spir
4545

4646
// DEFAULT: "-triple" "[[SPIRARCH]]-unknown-{{.*}}"{{.*}} "-fsycl-is-device"{{.*}} "-sycl-std=2020"{{.*}} "-emit-llvm-bc"
47-
// DEFAULT: "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"
47+
// DEFAULT: "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl{{[/\\]+}}stl_wrappers"
4848
// DEFAULT: "-internal-isystem" "{{.*lib.*clang.*include}}"
4949
// DEFAULT: "-std=c++17"
5050
// DEFAULT-NOT: "{{.*}}llvm-spirv"{{.*}}

sycl/CMakeLists.txt

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,11 @@ endif()
160160
# Copy OpenCL Headers into sycl headers build directory
161161
# Compiler does automatic lookup bin/../include based on clang binary location,
162162
# e.g. when run LIT tests
163-
file(COPY ${OpenCL_INCLUDE_DIR}/CL
164-
DESTINATION ${SYCL_INCLUDE_BUILD_DIR}/sycl)
163+
file(COPY ${OpenCL_INCLUDE_DIR}/CL DESTINATION ${SYCL_INCLUDE_BUILD_DIR})
165164

166165
# Include OpenCL Headers into final bundle.
167166
install(DIRECTORY ${OpenCL_INCLUDE_DIR}/CL
168-
DESTINATION ${SYCL_INCLUDE_DIR}/sycl
167+
DESTINATION ${SYCL_INCLUDE_DIR}
169168
COMPONENT OpenCL-Headers)
170169

171170
# 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
220219

221220
string(REPLACE "${sycl_inc_dir}" "${SYCL_INCLUDE_BUILD_DIR}"
222221
OUT_HEADERS_IN_SYCL_DIR "${HEADERS_IN_SYCL_DIR}")
223-
string(REPLACE "${sycl_inc_dir}/CL" "${SYCL_INCLUDE_BUILD_DIR}/sycl/CL"
222+
string(REPLACE "${sycl_inc_dir}/CL" "${SYCL_INCLUDE_BUILD_DIR}/CL"
224223
OUT_HEADERS_IN_CL_DIR "${HEADERS_IN_CL_DIR}")
225224
string(REPLACE "${sycl_inc_dir}" "${SYCL_INCLUDE_BUILD_DIR}"
226225
OUT_HEADERS_IN_STD_DIR "${HEADERS_IN_STD_DIR}")
@@ -245,27 +244,27 @@ add_custom_command(
245244
${HEADERS_IN_STD_DIR}
246245
${HEADERS_IN_SYCLCOMPAT_DIR}
247246
COMMAND ${CMAKE_COMMAND} -E copy_directory ${sycl_inc_dir}/sycl ${SYCL_INCLUDE_BUILD_DIR}/sycl
248-
COMMAND ${CMAKE_COMMAND} -E copy_directory ${sycl_inc_dir}/CL ${SYCL_INCLUDE_BUILD_DIR}/sycl/CL
247+
COMMAND ${CMAKE_COMMAND} -E copy_directory ${sycl_inc_dir}/CL ${SYCL_INCLUDE_BUILD_DIR}/CL
249248
COMMAND ${CMAKE_COMMAND} -E copy_directory ${sycl_inc_dir}/std ${SYCL_INCLUDE_BUILD_DIR}/std
250249
COMMAND ${CMAKE_COMMAND} -E copy_directory ${sycl_inc_dir}/syclcompat ${SYCL_INCLUDE_BUILD_DIR}/syclcompat
251250
COMMAND ${CMAKE_COMMAND} -E copy ${sycl_inc_dir}/syclcompat.hpp ${SYCL_INCLUDE_BUILD_DIR}/syclcompat.hpp
252-
COMMAND ${CMAKE_COMMAND} -E copy ${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api.h ${SYCL_INCLUDE_BUILD_DIR}/sycl
253-
COMMAND ${CMAKE_COMMAND} -E copy ${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api_funcs.def ${SYCL_INCLUDE_BUILD_DIR}/sycl
254-
COMMAND ${CMAKE_COMMAND} -E copy ${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_print.hpp ${SYCL_INCLUDE_BUILD_DIR}/sycl
251+
COMMAND ${CMAKE_COMMAND} -E copy ${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api.h ${SYCL_INCLUDE_BUILD_DIR}
252+
COMMAND ${CMAKE_COMMAND} -E copy ${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api_funcs.def ${SYCL_INCLUDE_BUILD_DIR}
253+
COMMAND ${CMAKE_COMMAND} -E copy ${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_print.hpp ${SYCL_INCLUDE_BUILD_DIR}
255254
COMMENT "Copying SYCL headers ...")
256255

257256
# Copy SYCL headers from source to install directory
258257
install(DIRECTORY "${sycl_inc_dir}/sycl" DESTINATION ${SYCL_INCLUDE_DIR} COMPONENT sycl-headers)
259-
install(DIRECTORY "${sycl_inc_dir}/CL" DESTINATION ${SYCL_INCLUDE_DIR}/sycl COMPONENT sycl-headers)
258+
install(DIRECTORY "${sycl_inc_dir}/CL" DESTINATION ${SYCL_INCLUDE_DIR}/ COMPONENT sycl-headers)
260259
install(DIRECTORY "${sycl_inc_dir}/std" DESTINATION ${SYCL_INCLUDE_DIR} COMPONENT sycl-headers)
261260
install(DIRECTORY ${BOOST_MP11_DESTINATION_DIR} DESTINATION ${SYCL_INCLUDE_DIR}/sycl/detail COMPONENT boost_mp11-headers)
262261
install(DIRECTORY "${sycl_inc_dir}/syclcompat" DESTINATION ${SYCL_INCLUDE_DIR} COMPONENT sycl-headers)
263262
install(FILES "${sycl_inc_dir}/syclcompat.hpp" DESTINATION ${SYCL_INCLUDE_DIR} COMPONENT sycl-headers)
264-
install(FILES "${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api.h" DESTINATION ${SYCL_INCLUDE_DIR}/sycl
263+
install(FILES "${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api.h" DESTINATION ${SYCL_INCLUDE_DIR}
265264
COMPONENT sycl-headers)
266-
install(FILES "${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api_funcs.def" DESTINATION ${SYCL_INCLUDE_DIR}/sycl
265+
install(FILES "${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api_funcs.def" DESTINATION ${SYCL_INCLUDE_DIR}
267266
COMPONENT sycl-headers)
268-
install(FILES "${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_print.hpp" DESTINATION ${SYCL_INCLUDE_DIR}/sycl
267+
install(FILES "${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_print.hpp" DESTINATION ${SYCL_INCLUDE_DIR}
269268
COMPONENT sycl-headers)
270269

271270
if (WIN32)

sycl/include/sycl/ext/oneapi/bindless_images_mem_handle.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#pragma once
1010

11-
#include "sycl/ur_api.h"
11+
#include <ur_api.h>
1212

1313
namespace sycl {
1414
inline namespace _V1 {

sycl/include/syclcompat/kernel.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@
4747
#endif
4848

4949
#include <fstream>
50-
#include <image.hpp>
5150
#include <random>
5251

52+
#include <sycl/image.hpp>
5353
#include <sycl/info/info_desc.hpp>
5454
#include <sycl/nd_range.hpp>
5555
#include <sycl/queue.hpp>

sycl/test-e2e/ESIMD/regression/bfloat16Constructor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
//===----------------------------------------------------------------------===//
1111
// This is basic test to verify use of bfloat16 constructor in kernel.
1212

13-
#include <ext/intel/esimd.hpp>
1413
#include <iostream>
1514
#include <sycl/detail/core.hpp>
15+
#include <sycl/ext/intel/esimd.hpp>
1616
#include <sycl/usm.hpp>
1717

1818
using namespace sycl;

sycl/test/basic_tests/macros_no_rdc.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
// HOST-DAG: #define SYCL_EXTERNAL
2424
// HOST-DAG: #define __DPCPP_SYCL_EXTERNAL
2525
#include <sycl/sycl.hpp>
26-
#include "ext/oneapi/bfloat16.hpp"
27-
#include "ext/intel/esimd.hpp"
28-
#include "ext/oneapi/experimental/complex/complex.hpp"
26+
#include <sycl/ext/oneapi/bfloat16.hpp>
27+
#include <sycl/ext/intel/esimd.hpp>
28+
#include <sycl/ext/oneapi/experimental/complex/complex.hpp>

sycl/test/basic_tests/min_max_test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// REQUIRES: windows
2-
// RUN: %clangxx -fsycl -fsycl-device-only -fsyntax-only -Xclang -verify %s -I %sycl_include
3-
// RUN: %clangxx -fsycl -fpreview-breaking-changes -fsycl-device-only -fsyntax-only -Xclang -verify %s -I %sycl_include
2+
// RUN: %clangxx -fsycl -fsycl-device-only -fsyntax-only -Xclang -verify %s
3+
// RUN: %clangxx -fsycl -fpreview-breaking-changes -fsycl-device-only -fsyntax-only -Xclang -verify %s
44
// expected-no-diagnostics
55

66
#include "windows.h"
77

8-
#include "sycl.hpp"
8+
#include <sycl/sycl.hpp>
99

1010
int main() {
1111
int tmp = min(1, 4);

sycl/test/esimd/esimd-util-compiler-eval.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// RUN: %clangxx -fsycl -fsycl-device-only -c %s
22
// This test checks compile-time evaluation of functions from esimd_util.hpp
33

4-
#include "sycl.hpp"
5-
#include "sycl/ext/intel/esimd.hpp"
4+
#include <sycl/ext/intel/esimd.hpp>
5+
#include <sycl/sycl.hpp>
66

77
using namespace sycl::ext::intel::esimd;
88
using namespace sycl::ext::intel::esimd::detail;

sycl/test/esimd/esimd_verify_local_names.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %clangxx -fsycl -fsycl-device-only -S %s -o /dev/null
22
// Test that the ESIMD Verifier doesn't error on locally defined types
3-
#include <sycl.hpp>
43
#include <sycl/ext/intel/esimd.hpp>
4+
#include <sycl/sycl.hpp>
55

66
using namespace sycl::ext::intel::esimd;
77

sycl/test/include_deps/deps_known.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ function deps() {
1313

1414
clang++ -fsycl -fsycl-device-only -include "$HEADER" -c -x c++ /dev/null -o /dev/null -MD -MF - \
1515
| sed 's@: /dev/null@: /dev/null\n@' \
16-
| grep 'include/sycl\|/dev/null\|:' \
16+
| grep 'include/sycl\|/dev/null\|CL/\|ur_\|:' \
1717
| sed 's@.*/include/sycl/@@' \
18+
| sed 's@.*/include/CL/@CL/@' \
19+
| sed 's@.*/include/ur_@ur_@' \
1820
| sed 's/ \\//'
1921
}
2022

sycl/test/native_cpu/no-opt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// RUN: env ONEAPI_DEVICE_SELECTOR="native_cpu:cpu" %t
44
// RUN: env ONEAPI_DEVICE_SELECTOR="native_cpu:cpu" SYCL_DEVICE_ALLOWLIST="BackendName:native_cpu" %t
55

6-
#include "sycl.hpp"
6+
#include <sycl/sycl.hpp>
77
class Test1;
88
int main() {
99
const size_t N = 4;

sycl/test/regression/builtin_generic_ptr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Regression test ensuring math builtins accept multi_ptr in the generic
66
// address space.
77

8-
#include <sycl.hpp>
8+
#include <sycl/sycl.hpp>
99

1010
int main() {
1111
sycl::queue Q;

sycl/test/regression/unnamed-lambda-split-order.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clangxx -fsycl -fsycl-unnamed-lambda -fsyntax-only %s
2-
#include "sycl.hpp"
2+
#include <sycl/sycl.hpp>
33

44
// This validates the case where using a lambda in a kernel in a different order
55
// than the lexical order of the lambdas. In a previous implementation of

sycl/test/regression/unnamed-lambda.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %clangxx -fsycl -fsyntax-only %s
22

3-
#include "sycl.hpp"
3+
#include <sycl/sycl.hpp>
44

55
// This validates that the unnamed lambda logic in the library correctly works
66
// with a new implementation of __builtin_unique_stable_name, where

0 commit comments

Comments
 (0)