From 1cc07281eac9b9300ced561e24ca6110991324b1 Mon Sep 17 00:00:00 2001 From: Chris Perkins Date: Mon, 12 Feb 2024 17:32:22 -0800 Subject: [PATCH 1/2] -shared flag is a Linux one. Needs /clang passthrough when using non MSVC options --- sycl/test-e2e/syclcompat/kernel/kernel_win.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sycl/test-e2e/syclcompat/kernel/kernel_win.cpp b/sycl/test-e2e/syclcompat/kernel/kernel_win.cpp index 11878ea509949..a7c1a01d9bce2 100644 --- a/sycl/test-e2e/syclcompat/kernel/kernel_win.cpp +++ b/sycl/test-e2e/syclcompat/kernel/kernel_win.cpp @@ -1,5 +1,5 @@ // REQUIRES: windows -// RUN: %clangxx -shared -fsycl -fsycl-targets=%{sycl_triple} %S\Inputs\kernel_module.cpp -o %t.so -// RUN: %clangxx -DTEST_SHARED_LIB='"%/t.so"' -fsycl -fsycl-targets=%{sycl_triple} %S\Inputs\kernel_function.cpp -o %t.out +// RUN: %clangxx /clang:-shared -fsycl -fsycl-targets=%{sycl_triple} %S\Inputs\kernel_module.cpp -o %t.dll +// RUN: %clangxx -DTEST_SHARED_LIB='"%/t.dll"' -fsycl -fsycl-targets=%{sycl_triple} %S\Inputs\kernel_function.cpp -o %t.out // RUN: %{run} %t.out From 940483e87a9f99d92c3fe1824568fab96fdb2c4f Mon Sep 17 00:00:00 2001 From: Chris Perkins Date: Tue, 13 Feb 2024 09:28:25 -0800 Subject: [PATCH 2/2] fix the fix --- sycl/test-e2e/syclcompat/kernel/kernel_win.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sycl/test-e2e/syclcompat/kernel/kernel_win.cpp b/sycl/test-e2e/syclcompat/kernel/kernel_win.cpp index a7c1a01d9bce2..52c324fdfcb4d 100644 --- a/sycl/test-e2e/syclcompat/kernel/kernel_win.cpp +++ b/sycl/test-e2e/syclcompat/kernel/kernel_win.cpp @@ -1,5 +1,7 @@ // REQUIRES: windows -// RUN: %clangxx /clang:-shared -fsycl -fsycl-targets=%{sycl_triple} %S\Inputs\kernel_module.cpp -o %t.dll +// DEFINE: %{sharedflag} = %if cl_options %{/clang:-shared%} %else %{-shared%} + +// RUN: %clangxx %{sharedflag} -fsycl -fsycl-targets=%{sycl_triple} %S\Inputs\kernel_module.cpp -o %t.dll // RUN: %clangxx -DTEST_SHARED_LIB='"%/t.dll"' -fsycl -fsycl-targets=%{sycl_triple} %S\Inputs\kernel_function.cpp -o %t.out // RUN: %{run} %t.out