[llvm] cd77f92 - [gn] Port f84ac48f1e83 (BOLT_TARGETS_TO_BUILD)

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 21 11:08:38 PDT 2023


Author: Nico Weber
Date: 2023-04-21T14:08:19-04:00
New Revision: cd77f9278909ec2dfb06043c9195681f359bcb9d

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

LOG: [gn] Port f84ac48f1e83 (BOLT_TARGETS_TO_BUILD)

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/utils/gn/secondary/bolt/test/BUILD.gn b/llvm/utils/gn/secondary/bolt/test/BUILD.gn
index 1a8b76a3d5423..d8ef560624897 100644
--- a/llvm/utils/gn/secondary/bolt/test/BUILD.gn
+++ b/llvm/utils/gn/secondary/bolt/test/BUILD.gn
@@ -24,6 +24,17 @@ template("write_lit_config") {
 }
 
 write_lit_config("lit_site_cfg") {
+  bolt_targets_to_build_string = ""
+  if (llvm_build_AArch64) {
+    bolt_targets_to_build_string += "AArch64"
+  }
+  if (llvm_build_X86) {
+    if (bolt_targets_to_build_string != "") {
+      bolt_targets_to_build_string += " "
+    }
+    bolt_targets_to_build_string += "X86"
+  }
+
   # Fully-qualified instead of relative for LIT_SITE_CFG_IN_HEADER.
   input = "//bolt/test/lit.site.cfg.py.in"
   output = bolt_lit_site_cfg_file
@@ -32,11 +43,11 @@ write_lit_config("lit_site_cfg") {
     "BOLT_CLANG_EXE=" + rebase_path("$root_build_dir/bin/clang"),
     "BOLT_LLD_EXE=" + rebase_path("$root_build_dir/bin/ld.lld"),
     "BOLT_ENABLE_RUNTIME=0",  # FIXME: enable runtime
+    "BOLT_TARGETS_TO_BUILD=$bolt_targets_to_build_string",
     "GNU_LD_EXECUTABLE=",  # FIXME: set sometimes?
     "LLVM_HOST_TRIPLE=$llvm_current_triple",
     "LLVM_USE_SANITIZER=",
     "Python3_EXECUTABLE=$python_path",
-    "TARGETS_TO_BUILD=$llvm_targets_to_build_string",
   ]
 
   if (host_os == "win") {


        


More information about the llvm-commits mailing list