Skip to content

Commit 1bd1e94

Browse files
committed
Add -fsycl-use-footer to tests and include missing header to int footer
1 parent 68187a5 commit 1bd1e94

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4897,6 +4897,7 @@ bool SYCLIntegrationFooter::emit(raw_ostream &OS) {
48974897
for (const VarDecl *VD : SpecConstants) {
48984898
VD = VD->getCanonicalDecl();
48994899
std::string TopShim = EmitSpecIdShims(OS, ShimCounter, VD);
4900+
OS << "#include <CL/sycl/detail/defines_elementary.hpp>\n";
49004901
OS << "__SYCL_INLINE_NAMESPACE(cl) {\n";
49014902
OS << "namespace sycl {\n";
49024903
OS << "namespace detail {\n";

sycl/test/on-device/basic_tests/specialization_constants/non_native/accelerator.cpp

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

3-
// RUN: %clangxx -fsycl -fsycl-targets=spir64_fpga-unknown-unknown-sycldevice %S/Inputs/common.cpp -o %t.out
3+
// RUN: %clangxx -fsycl -fsycl-use-footer -fsycl-targets=spir64_fpga-unknown-unknown-sycldevice %S/Inputs/common.cpp -o %t.out
44
// RUN: %ACC_RUN_PLACEHOLDER %t.out
55

66
// This test checks correctness of SYCL2020 non-native specialization constants

sycl/test/on-device/basic_tests/specialization_constants/non_native/cpu.cpp

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

3-
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64-unknown-unknown-sycldevice %S/Inputs/common.cpp -o %t.out
3+
// RUN: %clangxx -fsycl -fsycl-use-footer -fsycl-targets=spir64_x86_64-unknown-unknown-sycldevice %S/Inputs/common.cpp -o %t.out
44
// RUN: %CPU_RUN_PLACEHOLDER %t.out
55

66
// This test checks correctness of SYCL2020 non-native specialization constants

sycl/test/on-device/basic_tests/specialization_constants/non_native/cuda.cpp

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

3-
// RUN: %clangxx -fsycl -fsycl-targets=nvptx64-unknown-unknown-sycldevice %S/Inputs/common.cpp -o %t.out
3+
// RUN: %clangxx -fsycl -fsycl-use-footer -fsycl-targets=nvptx64-unknown-unknown-sycldevice %S/Inputs/common.cpp -o %t.out
44
// RUN: env SYCL_DEVICE_FILTER=cuda %t.out
55

66
// TODO: enable this test then compile-time error in sycl-post-link is fixed

sycl/test/on-device/basic_tests/specialization_constants/non_native/gpu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// UNSUPPORTED: cuda
33
// CUDA is not compatible with SPIR.
44

5-
// RUN: %clangxx -fsycl -fsycl-targets=spir64_gen-unknown-unknown-sycldevice -Xsycl-target-backend=spir64_gen-unknown-unknown-sycldevice "-device *" %S/Inputs/common.cpp -o %t.out
5+
// RUN: %clangxx -fsycl -fsycl-use-footer -fsycl-targets=spir64_gen-unknown-unknown-sycldevice -Xsycl-target-backend=spir64_gen-unknown-unknown-sycldevice "-device *" %S/Inputs/common.cpp -o %t.out
66
// RUN: %GPU_RUN_PLACEHOLDER %t.out
77

88
// This test checks correctness of SYCL2020 non-native specialization constants

0 commit comments

Comments
 (0)