From b3004485777b709b99dfb8374ccc3e83806b1e24 Mon Sep 17 00:00:00 2001 From: kikairoya Date: Sun, 19 Oct 2025 11:39:49 +0900 Subject: [PATCH] [clang-tools-extra][Unittest] Fix wrong reference to CMake configuration 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. --- clang-tools-extra/clangd/unittests/lit.cfg.py | 2 +- clang-tools-extra/include-cleaner/test/Unit/lit.cfg.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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