Skip to content

Commit

Permalink
Stop passing site cfg files via --param to llvm-lit.
Browse files Browse the repository at this point in the history
This has been unnecessary since https://reviews.llvm.org/D37756.

https://reviews.llvm.org/D37838 removed it for llvm.

This removes it from clang, lld, clang-tools-extra (and the GN build).

No intended behavior change.

Differential Revision: https://reviews.llvm.org/D77585
  • Loading branch information
nico committed Apr 7, 2020
1 parent e609fe6 commit 448b777
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 38 deletions.
3 changes: 3 additions & 0 deletions clang-tools-extra/clangd/test/CMakeLists.txt
Expand Up @@ -35,5 +35,8 @@ configure_lit_site_cfg(
)

add_lit_testsuite(check-clangd "Running the Clangd regression tests"
# clangd doesn't put unittest configs in test/unit like every other project.
# Because of that, this needs to pass two folders here, while every other
# project only needs to pass CMAKE_CURRENT_BINARY_DIR.
${CMAKE_CURRENT_BINARY_DIR}/../unittests;${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${CLANGD_TEST_DEPS})
7 changes: 0 additions & 7 deletions clang/test/CMakeLists.txt
Expand Up @@ -106,16 +106,9 @@ if (CLANG_BUILD_EXAMPLES)
endif ()

set(CLANG_TEST_PARAMS
clang_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
USE_Z3_SOLVER=0
)

set(ANALYZER_TEST_PARAMS
USE_Z3_SOLVER=0)

set(ANALYZER_TEST_PARAMS_Z3
USE_Z3_SOLVER=1)

if( NOT CLANG_BUILT_STANDALONE )
list(APPEND CLANG_TEST_DEPS
llvm-config
Expand Down
8 changes: 0 additions & 8 deletions lld/test/CMakeLists.txt
Expand Up @@ -44,23 +44,15 @@ if (LLVM_INCLUDE_TESTS)
list(APPEND LLD_TEST_DEPS LLDUnitTests)
endif()

set(LLD_TEST_PARAMS
lld_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
)

add_lit_testsuite(check-lld "Running lld test suite"
${CMAKE_CURRENT_BINARY_DIR}
PARAMS lld_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
lld_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
DEPENDS ${LLD_TEST_DEPS}
)

add_custom_target(lld-test-depends DEPENDS ${LLD_TEST_DEPS})
set_target_properties(lld-test-depends PROPERTIES FOLDER "lld tests")

add_lit_testsuites(LLD ${CMAKE_CURRENT_SOURCE_DIR}
PARAMS lld_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
lld_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
DEPENDS ${LLD_TEST_DEPS}
)

Expand Down
Expand Up @@ -21,8 +21,9 @@ write_lit_config("lit_site_cfg") {
output = clangd_lit_site_cfg_file

extra_values = [
"CMAKE_CURRENT_BINARY_DIR=" + rebase_path(
get_label_info("//clang-tools-extra/clangd/test", "target_out_dir")),
"CMAKE_CURRENT_BINARY_DIR=" +
rebase_path(get_label_info("//clang-tools-extra/clangd/test",
"target_out_dir")),
"CMAKE_CURRENT_SOURCE_DIR=" +
rebase_path("//clang-tools-extra/clangd/test"),

Expand Down Expand Up @@ -91,6 +92,10 @@ action("check-clangd") {
}
args = [
"-sv",

# clangd doesn't put unittest configs in test/unit like every other project.
# Because of that, this needs to pass two folders here, while every other
# project only needs to pass CMAKE_CURRENT_BINARY_DIR.
rebase_path(get_path_info(clangd_lit_site_cfg_file, "dir"), root_out_dir),
rebase_path(get_path_info(clangd_lit_unit_site_cfg_file, "dir"),
root_out_dir),
Expand Down
6 changes: 0 additions & 6 deletions llvm/utils/gn/secondary/clang-tools-extra/test/BUILD.gn
Expand Up @@ -90,12 +90,6 @@ action("check-clang-tools") {
}
args = [
"-sv",
"--param",
"clang_site_config=" +
rebase_path(clang_tools_extra_lit_site_cfg_file, root_out_dir),
"--param",
"clang_unit_site_config=" +
rebase_path(clang_tools_extra_lit_unit_site_cfg_file, root_out_dir),
rebase_path(".", root_out_dir),
]
outputs = [ "$target_gen_dir/run-lit" ] # Non-existing, so that ninja runs it
Expand Down
5 changes: 0 additions & 5 deletions llvm/utils/gn/secondary/clang/test/BUILD.gn
Expand Up @@ -189,11 +189,6 @@ action("check-clang") {
}
args = [
"-sv",
"--param",
"clang_site_config=" + rebase_path(clang_lit_site_cfg_file, root_out_dir),
"--param",
"clang_unit_site_config=" +
rebase_path(clang_lit_unit_site_cfg_file, root_out_dir),
rebase_path(".", root_out_dir),
]
outputs = [ "$target_gen_dir/run-lit" ] # Non-existing, so that ninja runs it
Expand Down
5 changes: 0 additions & 5 deletions llvm/utils/gn/secondary/lld/test/BUILD.gn
Expand Up @@ -110,11 +110,6 @@ action("check-lld") {
}
args = [
"-sv",
"--param",
"lld_site_config=" + rebase_path(lld_lit_site_cfg_file, root_out_dir),
"--param",
"lld_unit_site_config=" +
rebase_path(lld_lit_unit_site_cfg_file, root_out_dir),
rebase_path(".", root_out_dir),
]
outputs = [ "$target_gen_dir/run-lit" ] # Non-existing, so that ninja runs it
Expand Down
5 changes: 0 additions & 5 deletions llvm/utils/gn/secondary/llvm/test/BUILD.gn
Expand Up @@ -289,11 +289,6 @@ action("check-llvm") {
}
args = [
"-sv",
"--param",
"llvm_site_config=" + rebase_path(llvm_lit_site_cfg_file, root_out_dir),
"--param",
"llvm_unit_site_config=" +
rebase_path(llvm_lit_unit_site_cfg_file, root_out_dir),
rebase_path(".", root_out_dir),
]
outputs = [ "$target_gen_dir/run-lit" ] # Non-existing, so that ninja runs it
Expand Down

0 comments on commit 448b777

Please sign in to comment.