[llvm] [libsycl] Fix sycl-ls build on Windows (PR #214583)

Nick Sarnie via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 7 07:25:50 PDT 2026


https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/214583

>From 4a60da818559b89517554a2710c5f579145eed45 Mon Sep 17 00:00:00 2001
From: Nick Sarnie <nick.sarnie at intel.com>
Date: Thu, 6 Aug 2026 14:23:02 -0700
Subject: [PATCH] [libsycl] Fix sycl-ls build on Windows

Signed-off-by: Nick Sarnie <nick.sarnie at intel.com>
---
 libsycl/tools/sycl-ls/CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libsycl/tools/sycl-ls/CMakeLists.txt b/libsycl/tools/sycl-ls/CMakeLists.txt
index e34ba77c88c37..dd4f5b8a41405 100644
--- a/libsycl/tools/sycl-ls/CMakeLists.txt
+++ b/libsycl/tools/sycl-ls/CMakeLists.txt
@@ -24,6 +24,9 @@ if (WIN32)
   # - LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR (0x100)
   # - LOAD_LIBRARY_SEARCH_SYSTEM32     (0x800)
   target_link_options(sycl-ls PRIVATE LINKER:/DEPENDENTLOADFLAG:0x900)
+  # We need exceptions, but they are disabled by default for clang-cl, so
+  # enable them.
+  target_compile_options(sycl-ls PRIVATE /EHsc)
 endif()
 install(TARGETS sycl-ls
   RUNTIME DESTINATION "bin" COMPONENT sycl-ls)



More information about the llvm-commits mailing list