Skip to content

Conversation

@kikairoya
Copy link
Contributor

@SHLIBDIR@ is replaced by CMake's configuration function, so it must be in lit.site.cfg.py.in but not lit.cfg.py. lit.cfg.py must reference variables in generated lit.site.cfg.py.

We didn't notice this problem because it only affects Windows (including MinGW and Cygwin) that are configured with either LLVM_LINK_LLVM_DYLIB=ON or BUILD_SHARED=ON.

…ion variable

`@SHLIBDIR@` is replaced by CMake's configuration function, so it must be in `lit.site.cfg.py.in` but not `lit.cfg.py`.
`lit.cfg.py` must reference variables in generated `lit.site.cfg.py`.

We didn't notice this problem because it only affects Windows (including MinGW and Cygwin) that are configured with
either LLVM_LINK_LLVM_DYLIB=ON or BUILD_SHARED=ON.
@llvmbot
Copy link
Member

llvmbot commented Oct 19, 2025

@llvm/pr-subscribers-clang-tools-extra

Author: Tomohiro Kashiwada (kikairoya)

Changes

@<!-- -->SHLIBDIR@ is replaced by CMake's configuration function, so it must be in lit.site.cfg.py.in but not lit.cfg.py. lit.cfg.py must reference variables in generated lit.site.cfg.py.

We didn't notice this problem because it only affects Windows (including MinGW and Cygwin) that are configured with either LLVM_LINK_LLVM_DYLIB=ON or BUILD_SHARED=ON.


Full diff: https://github.com/llvm/llvm-project/pull/164147.diff

2 Files Affected:

  • (modified) clang-tools-extra/clangd/unittests/lit.cfg.py (+1-1)
  • (modified) clang-tools-extra/include-cleaner/test/Unit/lit.cfg.py (+1-1)
diff --git a/clang-tools-extra/clangd/unittests/lit.cfg.py b/clang-tools-extra/clangd/unittests/lit.cfg.py
index 33aa9e61f4ce9..769a3e102d2ba 100644
--- a/clang-tools-extra/clangd/unittests/lit.cfg.py
+++ b/clang-tools-extra/clangd/unittests/lit.cfg.py
@@ -24,7 +24,7 @@
 else:
     shlibpath_var = "LD_LIBRARY_PATH"
 config.environment[shlibpath_var] = os.path.pathsep.join(
-    ("@SHLIBDIR@", "@LLVM_LIBS_DIR@", config.environment.get(shlibpath_var, ""))
+    (config.shlibdir, config.llvm_libs_dir, config.environment.get(shlibpath_var, ""))
 )
 
 # It is not realistically possible to account for all options that could
diff --git a/clang-tools-extra/include-cleaner/test/Unit/lit.cfg.py b/clang-tools-extra/include-cleaner/test/Unit/lit.cfg.py
index 0963351abe3b1..a9f785e4abec7 100644
--- a/clang-tools-extra/include-cleaner/test/Unit/lit.cfg.py
+++ b/clang-tools-extra/include-cleaner/test/Unit/lit.cfg.py
@@ -16,7 +16,7 @@
 else:
     shlibpath_var = "LD_LIBRARY_PATH"
 config.environment[shlibpath_var] = os.path.pathsep.join(
-    ("@SHLIBDIR@", "@LLVM_LIBS_DIR@", config.environment.get(shlibpath_var, ""))
+    (config.shlibdir, config.llvm_libs_dir, config.environment.get(shlibpath_var, ""))
 )
 
 # It is not realistically possible to account for all options that could

@llvmbot
Copy link
Member

llvmbot commented Oct 19, 2025

@llvm/pr-subscribers-clangd

Author: Tomohiro Kashiwada (kikairoya)

Changes

@<!-- -->SHLIBDIR@ is replaced by CMake's configuration function, so it must be in lit.site.cfg.py.in but not lit.cfg.py. lit.cfg.py must reference variables in generated lit.site.cfg.py.

We didn't notice this problem because it only affects Windows (including MinGW and Cygwin) that are configured with either LLVM_LINK_LLVM_DYLIB=ON or BUILD_SHARED=ON.


Full diff: https://github.com/llvm/llvm-project/pull/164147.diff

2 Files Affected:

  • (modified) clang-tools-extra/clangd/unittests/lit.cfg.py (+1-1)
  • (modified) clang-tools-extra/include-cleaner/test/Unit/lit.cfg.py (+1-1)
diff --git a/clang-tools-extra/clangd/unittests/lit.cfg.py b/clang-tools-extra/clangd/unittests/lit.cfg.py
index 33aa9e61f4ce9..769a3e102d2ba 100644
--- a/clang-tools-extra/clangd/unittests/lit.cfg.py
+++ b/clang-tools-extra/clangd/unittests/lit.cfg.py
@@ -24,7 +24,7 @@
 else:
     shlibpath_var = "LD_LIBRARY_PATH"
 config.environment[shlibpath_var] = os.path.pathsep.join(
-    ("@SHLIBDIR@", "@LLVM_LIBS_DIR@", config.environment.get(shlibpath_var, ""))
+    (config.shlibdir, config.llvm_libs_dir, config.environment.get(shlibpath_var, ""))
 )
 
 # It is not realistically possible to account for all options that could
diff --git a/clang-tools-extra/include-cleaner/test/Unit/lit.cfg.py b/clang-tools-extra/include-cleaner/test/Unit/lit.cfg.py
index 0963351abe3b1..a9f785e4abec7 100644
--- a/clang-tools-extra/include-cleaner/test/Unit/lit.cfg.py
+++ b/clang-tools-extra/include-cleaner/test/Unit/lit.cfg.py
@@ -16,7 +16,7 @@
 else:
     shlibpath_var = "LD_LIBRARY_PATH"
 config.environment[shlibpath_var] = os.path.pathsep.join(
-    ("@SHLIBDIR@", "@LLVM_LIBS_DIR@", config.environment.get(shlibpath_var, ""))
+    (config.shlibdir, config.llvm_libs_dir, config.environment.get(shlibpath_var, ""))
 )
 
 # It is not realistically possible to account for all options that could

Copy link
Member

@mstorsjo mstorsjo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@mstorsjo mstorsjo merged commit 13498bc into llvm:main Oct 20, 2025
13 checks passed
@kikairoya kikairoya deleted the unittest-fix-config-file branch October 20, 2025 21:44
Lukacma pushed a commit to Lukacma/llvm-project that referenced this pull request Oct 29, 2025
…ion variable (llvm#164147)

`@SHLIBDIR@` is replaced by CMake's configuration function, so it must
be in `lit.site.cfg.py.in` but not `lit.cfg.py`. `lit.cfg.py` must
reference variables in generated `lit.site.cfg.py`.

We didn't notice this problem because it only affects Windows (including
MinGW and Cygwin) that are configured with either
LLVM_LINK_LLVM_DYLIB=ON or BUILD_SHARED=ON.
aokblast pushed a commit to aokblast/llvm-project that referenced this pull request Oct 30, 2025
…ion variable (llvm#164147)

`@SHLIBDIR@` is replaced by CMake's configuration function, so it must
be in `lit.site.cfg.py.in` but not `lit.cfg.py`. `lit.cfg.py` must
reference variables in generated `lit.site.cfg.py`.

We didn't notice this problem because it only affects Windows (including
MinGW and Cygwin) that are configured with either
LLVM_LINK_LLVM_DYLIB=ON or BUILD_SHARED=ON.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants