[llvm] 264ff53 - [gn build] merge af2796c76d2f a bit more

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 15 15:21:04 PDT 2021


Author: Nico Weber
Date: 2021-03-15T18:20:54-04:00
New Revision: 264ff539f38c57a145a74134cf7950f5d9dce4d0

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

LOG: [gn build] merge af2796c76d2f a bit more

The default is fine on non-Win, but on Win this needs an explicit
setting now that lit no longer has the right default.

Added: 
    

Modified: 
    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/llvm/utils/gn/secondary/clang/test/BUILD.gn b/llvm/utils/gn/secondary/clang/test/BUILD.gn
index 36b588dc511c..6411d49b67de 100644
--- a/llvm/utils/gn/secondary/clang/test/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang/test/BUILD.gn
@@ -59,7 +59,6 @@ write_lit_config("lit_site_cfg") {
     "ENABLE_BACKTRACES=1",
     "LLVM_ENABLE_NEW_PASS_MANAGER=1",
     "LLVM_HOST_TRIPLE=$llvm_current_triple",
-    "LLVM_LIT_ERRC_MESSAGES=",
     "LLVM_LIT_TOOLS_DIR=",  # Intentionally empty, matches cmake build.
     "LLVM_USE_SANITIZER=",
     "Python3_EXECUTABLE=$python_path",
@@ -103,10 +102,16 @@ write_lit_config("lit_site_cfg") {
   }
 
   if (host_os == "win") {
-    extra_values += [ "LLVM_ENABLE_PLUGINS=0" ]
+    extra_values += [
+      "LLVM_ENABLE_PLUGINS=0",
+      "LLVM_LIT_ERRC_MESSAGES=no such file or directory;is a directory;" +
+          "invalid argument;permission denied",
+    ]
   } else {
-    # FIXME: Analysis/plugins need global -fPIC
-    extra_values += [ "LLVM_ENABLE_PLUGINS=0" ]
+    extra_values += [
+      "LLVM_ENABLE_PLUGINS=0",  # FIXME: Analysis/plugins need global -fPIC
+      "LLVM_LIT_ERRC_MESSAGES=",
+    ]
   }
 
   if (llvm_enable_threads) {

diff  --git a/llvm/utils/gn/secondary/lld/test/BUILD.gn b/llvm/utils/gn/secondary/lld/test/BUILD.gn
index 007c1f799637..9344f7e4c04f 100644
--- a/llvm/utils/gn/secondary/lld/test/BUILD.gn
+++ b/llvm/utils/gn/secondary/lld/test/BUILD.gn
@@ -35,10 +35,15 @@ write_lit_cfg("lit_site_cfg") {
   input = "//lld/test/lit.site.cfg.py.in"
   output = lld_lit_site_cfg_file
 
-  extra_values = [
-    "LLD_DEFAULT_LD_LLD_IS_MINGW=0", # Must be 0.
-    "LLVM_LIT_ERRC_MESSAGES=",
-  ]
+  extra_values = [ "LLD_DEFAULT_LD_LLD_IS_MINGW=0" ]  # Must be 0.
+
+  if (host_os == "win") {
+    extra_values +=
+        [ "LLVM_LIT_ERRC_MESSAGES=no such file or directory;is a directory;" +
+          "invalid argument;permission denied" ]
+  } else {
+    extra_values += [ "LLVM_LIT_ERRC_MESSAGES=" ]
+  }
 
   if (llvm_enable_dia_sdk) {
     extra_values += [ "LLVM_ENABLE_DIA_SDK=1" ]

diff  --git a/llvm/utils/gn/secondary/llvm/test/BUILD.gn b/llvm/utils/gn/secondary/llvm/test/BUILD.gn
index 4eb96e37497a..3ec55ddd2db8 100644
--- a/llvm/utils/gn/secondary/llvm/test/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/test/BUILD.gn
@@ -61,7 +61,6 @@ write_lit_config("lit_site_cfg") {
     "LLVM_HOST_TRIPLE=$llvm_current_triple",
     "LLVM_LIBS_DIR=" + rebase_path("$root_out_dir/lib", dir),
     "LLVM_LINK_LLVM_DYLIB=0",
-    "LLVM_LIT_ERRC_MESSAGES=",
     "LLVM_LIT_TOOLS_DIR=",  # Intentionally empty, matches cmake build.
     "LLVM_NATIVE_ARCH=$native_target",
     "LLVM_USE_INTEL_JITEVENTS=0",
@@ -99,15 +98,18 @@ write_lit_config("lit_site_cfg") {
   }
 
   if (host_os == "win") {
-    extra_values += [ "EXEEXT=.exe" ]
-  } else {
-    extra_values += [ "EXEEXT=" ]
-  }
-
-  if (host_os == "win") {
-    extra_values += [ "LLVM_ENABLE_PLUGINS=0" ]
+    extra_values += [
+      "EXEEXT=.exe",
+      "LLVM_ENABLE_PLUGINS=0",
+      "LLVM_LIT_ERRC_MESSAGES=no such file or directory;is a directory;" +
+          "invalid argument;permission denied",
+    ]
   } else {
-    extra_values += [ "LLVM_ENABLE_PLUGINS=1" ]
+    extra_values += [
+      "EXEEXT=",
+      "LLVM_ENABLE_PLUGINS=1",
+      "LLVM_LIT_ERRC_MESSAGES=",
+    ]
   }
 
   if (host_os == "mac") {


        


More information about the llvm-commits mailing list