Skip to content

Commit 13498bc

Browse files
authored
[clang-tools-extra][Unittest] Fix wrong reference to CMake configuration variable (#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.
1 parent f37b445 commit 13498bc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clang-tools-extra/clangd/unittests/lit.cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
else:
2525
shlibpath_var = "LD_LIBRARY_PATH"
2626
config.environment[shlibpath_var] = os.path.pathsep.join(
27-
("@SHLIBDIR@", "@LLVM_LIBS_DIR@", config.environment.get(shlibpath_var, ""))
27+
(config.shlibdir, config.llvm_libs_dir, config.environment.get(shlibpath_var, ""))
2828
)
2929

3030
# It is not realistically possible to account for all options that could

clang-tools-extra/include-cleaner/test/Unit/lit.cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
else:
1717
shlibpath_var = "LD_LIBRARY_PATH"
1818
config.environment[shlibpath_var] = os.path.pathsep.join(
19-
("@SHLIBDIR@", "@LLVM_LIBS_DIR@", config.environment.get(shlibpath_var, ""))
19+
(config.shlibdir, config.llvm_libs_dir, config.environment.get(shlibpath_var, ""))
2020
)
2121

2222
# It is not realistically possible to account for all options that could

0 commit comments

Comments
 (0)