[llvm] [libsycl] Add lit configuration files and basic test (PR #177407)

Kseniya Tikhomirova via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 2 05:19:13 PST 2026


================
@@ -0,0 +1,39 @@
+ at LIT_SITE_CFG_IN_HEADER@
+
+import subprocess
+import site
+
+site.addsitedir("@CMAKE_CURRENT_SOURCE_DIR@")
+
+config.libsycl_compiler = lit_config.params.get("libsycl_compiler", "@LIBSYCL_CXX_COMPILER@")
+config.libsycl_root_dir= os.path.dirname(os.path.dirname(config.libsycl_compiler))
+config.libsycl_bin_dir = os.path.join(config.libsycl_root_dir, 'bin')
----------------
KseniyaTikhomirova wrote:

No:
with
```
print (config.libsycl_compiler)
print (config.libsycl_root_dir)
print (config.libsycl_bin_dir) 
```
in lit.cfg.py I got:
<some dir>/kt_llvm_project/build/bin/clang++
<some dir>/kt_llvm_project/build
<some dir>/kt_llvm_project/build/bin

config.libsycl_root_dir= os.path.dirname(os.path.dirname(config.libsycl_compiler))
dirname is called twice and does 2 levels up.

https://github.com/llvm/llvm-project/pull/177407


More information about the llvm-commits mailing list