[llvm] 7673bd5 - [gn build] (manually) port f8de9aaef2f4

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 26 13:04:02 PDT 2021


Author: Nico Weber
Date: 2021-04-26T16:03:50-04:00
New Revision: 7673bd56ff0b5a8499d863b10b8f936efbd59377

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

LOG: [gn build] (manually) port f8de9aaef2f4

Added: 
    

Modified: 
    llvm/utils/gn/secondary/BUILD.gn
    llvm/utils/gn/secondary/llvm/test/BUILD.gn
    llvm/utils/gn/secondary/llvm/tools/llvm-rc/BUILD.gn

Removed: 
    


################################################################################
diff  --git a/llvm/utils/gn/secondary/BUILD.gn b/llvm/utils/gn/secondary/BUILD.gn
index 43c5b8a186ae5..95afb4e7c11bd 100644
--- a/llvm/utils/gn/secondary/BUILD.gn
+++ b/llvm/utils/gn/secondary/BUILD.gn
@@ -76,6 +76,9 @@ group("llvm-objcopy") {
 group("llvm-objdump") {
   deps = [ "//llvm/tools/llvm-objdump:symlinks" ]
 }
+group("llvm-rc") {
+  deps = [ "//llvm/tools/llvm-rc:symlinks" ]
+}
 group("llvm-readobj") {
   deps = [ "//llvm/tools/llvm-readobj:symlinks" ]
 }

diff  --git a/llvm/utils/gn/secondary/llvm/test/BUILD.gn b/llvm/utils/gn/secondary/llvm/test/BUILD.gn
index c1f2cd1c69ed2..190d1a929161f 100644
--- a/llvm/utils/gn/secondary/llvm/test/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/test/BUILD.gn
@@ -256,7 +256,7 @@ group("test") {
     "//llvm/tools/llvm-pdbutil",
     "//llvm/tools/llvm-profdata",
     "//llvm/tools/llvm-profgen",
-    "//llvm/tools/llvm-rc",
+    "//llvm/tools/llvm-rc:symlinks",
     "//llvm/tools/llvm-readobj:symlinks",
     "//llvm/tools/llvm-reduce",
     "//llvm/tools/llvm-rtdyld",

diff  --git a/llvm/utils/gn/secondary/llvm/tools/llvm-rc/BUILD.gn b/llvm/utils/gn/secondary/llvm/tools/llvm-rc/BUILD.gn
index d47148a1459aa..f3ddb0ff811ae 100644
--- a/llvm/utils/gn/secondary/llvm/tools/llvm-rc/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/tools/llvm-rc/BUILD.gn
@@ -1,13 +1,43 @@
+import("//llvm/tools/binutils_symlinks.gni")
 import("//llvm/utils/TableGen/tablegen.gni")
+import("//llvm/utils/gn/build/symlink_or_copy.gni")
 
 tablegen("Opts") {
   visibility = [ ":llvm-rc" ]
   args = [ "-gen-opt-parser-defs" ]
 }
 
+tablegen("WindresOpts") {
+  visibility = [ ":llvm-rc" ]
+  args = [ "-gen-opt-parser-defs" ]
+}
+
+symlinks = [ "llvm-windres" ]
+if (llvm_install_binutils_symlinks) {
+  symlinks += [ "windres" ]
+}
+
+foreach(target, symlinks) {
+  symlink_or_copy(target) {
+    deps = [ ":llvm-rc" ]
+    source = "llvm-rc"
+    output = "$root_out_dir/bin/$target"
+  }
+}
+
+# //:llvm-rc depends on this symlink target, see comment in //BUILD.gn.
+group("symlinks") {
+  deps = [ ":llvm-rc" ]
+  foreach(target, symlinks) {
+    deps += [ ":$target" ]
+  }
+}
+
 executable("llvm-rc") {
   deps = [
     ":Opts",
+    ":WindresOpts",
+    "//llvm/lib/Object",
     "//llvm/lib/Option",
     "//llvm/lib/Support",
   ]


        


More information about the llvm-commits mailing list