[llvm] a7ea304 - [gn build] Manually port 0c86198b2

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 24 10:56:53 PDT 2022


Author: Arthur Eubanks
Date: 2022-03-24T10:56:21-07:00
New Revision: a7ea304f938a24c7413d142f3841fa3d946e0634

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

LOG: [gn build] Manually port 0c86198b2

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 adb958de4c22a..9342e51a9c926 100644
--- a/llvm/utils/gn/secondary/lld/test/BUILD.gn
+++ b/llvm/utils/gn/secondary/lld/test/BUILD.gn
@@ -35,15 +35,37 @@ write_lit_cfg("lit_site_cfg") {
   # Fully-qualified instead of relative for LIT_SITE_CFG_IN_HEADER.
   input = "//lld/test/lit.site.cfg.py.in"
   output = lld_lit_site_cfg_file
+  dir = get_path_info(output, "dir")
 
-  extra_values = [ "LLD_DEFAULT_LD_LLD_IS_MINGW=0" ]  # Must be 0.
+  extra_values = [
+    "LLD_DEFAULT_LD_LLD_IS_MINGW=0",
+    "LLVM_BUILD_EXAMPLES=0",
+    "LLVM_BYE_LINK_INTO_TOOLS=0",
+  ]
 
   if (host_os == "win") {
-    extra_values +=
-        [ "LLVM_LIT_ERRC_MESSAGES=no such file or directory;is a directory;" +
-          "invalid argument;permission denied" ]
+    extra_values += [
+      "LLVM_LIT_ERRC_MESSAGES=no such file or directory;is a directory;" +
+          "invalid argument;permission denied",
+      "LLVM_ENABLE_PLUGINS=0",
+
+      # See comment for Windows solink in llvm/utils/gn/build/toolchain/BUILD.gn
+      "SHLIBDIR=" + rebase_path("$root_out_dir/bin", dir),
+    ]
+  } else {
+    extra_values += [
+      "LLVM_LIT_ERRC_MESSAGES=",
+      "LLVM_ENABLE_PLUGINS=1",
+      "SHLIBDIR=" + rebase_path("$root_out_dir/lib", dir),
+    ]
+  }
+
+  if (host_os == "mac") {
+    extra_values += [ "SHLIBEXT=.dylib" ]
+  } else if (host_os == "win") {
+    extra_values += [ "SHLIBEXT=.dll" ]
   } else {
-    extra_values += [ "LLVM_LIT_ERRC_MESSAGES=" ]
+    extra_values += [ "SHLIBEXT=.so" ]
   }
 
   if (llvm_enable_dia_sdk) {


        


More information about the llvm-commits mailing list