1
1
import (" //clang-tools-extra/clangd/xpc/enable.gni" )
2
2
import (" //llvm/triples.gni" )
3
3
import (" //llvm/utils/gn/build/write_cmake_config.gni" )
4
-
5
- clangd_lit_site_cfg_file = " $root_gen_dir /clang-tools-extra/clangd/test/lit.cfg"
6
- clangd_lit_unit_site_cfg_file =
7
- " $root_gen_dir /clang-tools-extra/clangd/unittests/lit.cfg"
4
+ import (" clangd_lit_site_cfg_files.gni" )
8
5
9
6
template (" write_lit_config" ) {
10
7
write_cmake_config (target_name ) {
@@ -20,7 +17,7 @@ template("write_lit_config") {
20
17
21
18
write_lit_config (" lit_site_cfg" ) {
22
19
# Fully-qualified instead of relative for LIT_SITE_CFG_IN_HEADER.
23
- input = " //clang-tools-extra/clangd/test/lit.cfg.in"
20
+ input = " //clang-tools-extra/clangd/test/lit.site. cfg.py .in"
24
21
output = clangd_lit_site_cfg_file
25
22
26
23
extra_values = [
@@ -46,12 +43,14 @@ write_lit_config("lit_site_cfg") {
46
43
47
44
write_lit_config (" lit_unit_site_cfg" ) {
48
45
# Fully-qualified instead of relative for LIT_SITE_CFG_IN_HEADER.
49
- input = " //clang-tools-extra/clangd/unittests/lit.cfg.in"
46
+ input = " //clang-tools-extra/clangd/unittests/lit.site. cfg.py .in"
50
47
output = clangd_lit_unit_site_cfg_file
51
48
extra_values =
52
49
[ " CMAKE_CURRENT_BINARY_DIR=" +
53
50
rebase_path (get_label_info (" //clang-tools-extra/clangd/unittests" ,
54
- " target_out_dir" )) ]
51
+ " target_out_dir" )),
52
+ " CMAKE_CURRENT_SOURCE_DIR=" +
53
+ rebase_path (" //clang-tools-extra/clangd/unittest" )]
55
54
if (host_os == " win" ) {
56
55
# See comment for Windows solink in llvm/utils/gn/build/toolchain/BUILD.gn
57
56
extra_values += [ " SHLIBDIR=" + rebase_path (" $root_out_dir /bin" ) ]
0 commit comments