[clang] 448b777 - Stop passing site cfg files via --param to llvm-lit.

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 7 05:22:05 PDT 2020


Author: Nico Weber
Date: 2020-04-07T08:20:40-04:00
New Revision: 448b777b864a312e3b2ceae1e0cd59752a1fe90e

URL: https://github.com/llvm/llvm-project/commit/448b777b864a312e3b2ceae1e0cd59752a1fe90e
DIFF: https://github.com/llvm/llvm-project/commit/448b777b864a312e3b2ceae1e0cd59752a1fe90e.diff

LOG: Stop passing site cfg files via --param to llvm-lit.

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

Added: 
    

Modified: 
    clang-tools-extra/clangd/test/CMakeLists.txt
    clang/test/CMakeLists.txt
    lld/test/CMakeLists.txt
    llvm/utils/gn/secondary/clang-tools-extra/clangd/test/BUILD.gn
    llvm/utils/gn/secondary/clang-tools-extra/test/BUILD.gn
    llvm/utils/gn/secondary/clang/test/BUILD.gn
    llvm/utils/gn/secondary/lld/test/BUILD.gn
    llvm/utils/gn/secondary/llvm/test/BUILD.gn

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/test/CMakeLists.txt b/clang-tools-extra/clangd/test/CMakeLists.txt
index 1054fd593bfa..c5cc7e3ec097 100644
--- a/clang-tools-extra/clangd/test/CMakeLists.txt
+++ b/clang-tools-extra/clangd/test/CMakeLists.txt
@@ -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})

diff  --git a/clang/test/CMakeLists.txt b/clang/test/CMakeLists.txt
index ca326fea8066..38bbc5be90d5 100644
--- a/clang/test/CMakeLists.txt
+++ b/clang/test/CMakeLists.txt
@@ -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

diff  --git a/lld/test/CMakeLists.txt b/lld/test/CMakeLists.txt
index 8be42c46dd8a..80721384c287 100644
--- a/lld/test/CMakeLists.txt
+++ b/lld/test/CMakeLists.txt
@@ -44,14 +44,8 @@ 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}
   )
 
@@ -59,8 +53,6 @@ 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}
   )
 

diff  --git a/llvm/utils/gn/secondary/clang-tools-extra/clangd/test/BUILD.gn b/llvm/utils/gn/secondary/clang-tools-extra/clangd/test/BUILD.gn
index 22a76a826f65..4dc4c278ebcd 100644
--- a/llvm/utils/gn/secondary/clang-tools-extra/clangd/test/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang-tools-extra/clangd/test/BUILD.gn
@@ -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"),
 
@@ -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),

diff  --git a/llvm/utils/gn/secondary/clang-tools-extra/test/BUILD.gn b/llvm/utils/gn/secondary/clang-tools-extra/test/BUILD.gn
index 6646ef112750..97715cf8d9c9 100644
--- a/llvm/utils/gn/secondary/clang-tools-extra/test/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang-tools-extra/test/BUILD.gn
@@ -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

diff  --git a/llvm/utils/gn/secondary/clang/test/BUILD.gn b/llvm/utils/gn/secondary/clang/test/BUILD.gn
index 84ac2e893cdf..f215c35d6aed 100644
--- a/llvm/utils/gn/secondary/clang/test/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang/test/BUILD.gn
@@ -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

diff  --git a/llvm/utils/gn/secondary/lld/test/BUILD.gn b/llvm/utils/gn/secondary/lld/test/BUILD.gn
index 5408ea8b6b24..b0ccb7ea0032 100644
--- a/llvm/utils/gn/secondary/lld/test/BUILD.gn
+++ b/llvm/utils/gn/secondary/lld/test/BUILD.gn
@@ -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

diff  --git a/llvm/utils/gn/secondary/llvm/test/BUILD.gn b/llvm/utils/gn/secondary/llvm/test/BUILD.gn
index c7740ac4cc99..427b2c067884 100644
--- a/llvm/utils/gn/secondary/llvm/test/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/test/BUILD.gn
@@ -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


        


More information about the cfe-commits mailing list