[llvm] e8b3ba2 - [gn] port 6f2e92c10cebca5 better (lld/unittests)

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 19 07:59:05 PDT 2023


Author: Nico Weber
Date: 2023-06-19T10:58:58-04:00
New Revision: e8b3ba235597de4587379f233d57826fda71855e

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

LOG: [gn] port 6f2e92c10cebca5 better (lld/unittests)

lld/test/Unit/lit.site.cfg.py.in got cleaned up in the reland.

Added: 
    

Modified: 
    llvm/utils/gn/secondary/lld/test/BUILD.gn

Removed: 
    


################################################################################
diff  --git a/llvm/utils/gn/secondary/lld/test/BUILD.gn b/llvm/utils/gn/secondary/lld/test/BUILD.gn
index 06256e1ba161b..d6c15608124e3 100644
--- a/llvm/utils/gn/secondary/lld/test/BUILD.gn
+++ b/llvm/utils/gn/secondary/lld/test/BUILD.gn
@@ -16,13 +16,7 @@ template("write_lit_cfg") {
           "## Autogenerated from $input, do not edit\n\n" + lit_path_function,
       "LLD_BINARY_DIR=" +
           rebase_path(get_label_info("//lld", "target_out_dir")),
-      "CURRENT_LIBS_DIR=",  # FIXME: for shared builds only (?)
-      "CURRENT_TOOLS_DIR=" + rebase_path("$root_out_dir/bin"),
       "LLD_SOURCE_DIR=" + rebase_path("//lld"),
-      "LLVM_BINARY_DIR=" +
-          rebase_path(get_label_info("//llvm", "target_out_dir")),
-      "LLVM_SOURCE_DIR=" + rebase_path("//llvm"),
-      "LLVM_TOOLS_DIR=" + rebase_path("$root_out_dir/bin"),
     ]
     values += invoker.extra_values
   }
@@ -35,10 +29,16 @@ write_lit_cfg("lit_site_cfg") {
   dir = get_path_info(output, "dir")
 
   extra_values = [
+    "CURRENT_LIBS_DIR=",  # FIXME: for shared builds only (?)
+    "CURRENT_TOOLS_DIR=" + rebase_path("$root_out_dir/bin"),
     "ENABLE_BACKTRACES=1",
+    "LLVM_BINARY_DIR=" +
+        rebase_path(get_label_info("//llvm", "target_out_dir")),
     "LLVM_HOST_TRIPLE=$llvm_current_triple",
     "LLVM_LIBS_DIR=",  # needed only for shared builds
     "LLVM_LIT_TOOLS_DIR=",  # Intentionally empty, matches cmake build.
+    "LLVM_SOURCE_DIR=" + rebase_path("//llvm"),
+    "LLVM_TOOLS_DIR=" + rebase_path("$root_out_dir/bin"),
     "Python3_EXECUTABLE=$python_path",
     "LLVM_TARGET_TRIPLE=$llvm_target_triple",
 
@@ -103,10 +103,7 @@ write_lit_cfg("lit_unit_site_cfg") {
   # Fully-qualified instead of relative for LIT_SITE_CFG_IN_HEADER.
   input = "//lld/test/Unit/lit.site.cfg.py.in"
   output = lld_lit_unit_site_cfg_file
-  extra_values = [
-    "ENABLE_SHARED=0",
-    "LLVM_BUILD_MODE=.",
-  ]
+  extra_values = [ "LLVM_BUILD_MODE=." ]
   dir = get_path_info(output, "dir")
   if (host_os == "win") {
     # See comment for Windows solink in llvm/utils/gn/build/toolchain/BUILD.gn


        


More information about the llvm-commits mailing list