[PATCH] D55831: [gn build] Add build file for llvm-objcopy
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 18 18:51:21 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL349598: [gn build] Add build file for llvm-objcopy (authored by nico, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D55831?vs=178695&id=178829#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55831/new/
https://reviews.llvm.org/D55831
Files:
llvm/trunk/utils/gn/secondary/BUILD.gn
llvm/trunk/utils/gn/secondary/llvm/tools/llvm-objcopy/BUILD.gn
Index: llvm/trunk/utils/gn/secondary/llvm/tools/llvm-objcopy/BUILD.gn
===================================================================
--- llvm/trunk/utils/gn/secondary/llvm/tools/llvm-objcopy/BUILD.gn
+++ llvm/trunk/utils/gn/secondary/llvm/tools/llvm-objcopy/BUILD.gn
@@ -0,0 +1,57 @@
+import("//llvm/tools/binutils_symlinks.gni")
+import("//llvm/utils/TableGen/tablegen.gni")
+import("//llvm/utils/gn/build/symlink_or_copy.gni")
+
+tablegen("ObjcopyOpts") {
+ visibility = [ ":llvm-objcopy" ]
+ args = [ "-gen-opt-parser-defs" ]
+}
+
+tablegen("StripOpts") {
+ visibility = [ ":llvm-objcopy" ]
+ args = [ "-gen-opt-parser-defs" ]
+}
+
+symlinks = [ "llvm-strip" ]
+if (llvm_install_binutils_symlinks) {
+ symlinks += [
+ "objcopy",
+ "strip",
+ ]
+}
+foreach(target, symlinks) {
+ symlink_or_copy(target) {
+ deps = [
+ ":llvm-objcopy",
+ ]
+ source = "llvm-objcopy"
+ output = "$root_out_dir/bin/$target"
+ }
+}
+
+# //:llvm-objcopy depends on this symlink target, see comment in //BUILD.gn.
+group("symlinks") {
+ deps = []
+ foreach(target, symlinks) {
+ deps += [ ":$target" ]
+ }
+}
+
+executable("llvm-objcopy") {
+ deps = [
+ ":ObjcopyOpts",
+ ":StripOpts",
+ "//llvm/lib/MC",
+ "//llvm/lib/Object",
+ "//llvm/lib/Option",
+ "//llvm/lib/Support",
+ ]
+ include_dirs = [ "." ]
+ sources = [
+ "Buffer.cpp",
+ "CopyConfig.cpp",
+ "ELF/ELFObjcopy.cpp",
+ "ELF/Object.cpp",
+ "llvm-objcopy.cpp",
+ ]
+}
Index: llvm/trunk/utils/gn/secondary/BUILD.gn
===================================================================
--- llvm/trunk/utils/gn/secondary/BUILD.gn
+++ llvm/trunk/utils/gn/secondary/BUILD.gn
@@ -9,6 +9,7 @@
"//llvm/tools/llvm-dwarfdump",
"//llvm/tools/llvm-mc",
"//llvm/tools/llvm-nm:symlinks",
+ "//llvm/tools/llvm-objcopy:symlinks",
"//llvm/tools/llvm-objdump:symlinks",
"//llvm/tools/llvm-pdbutil",
"//llvm/tools/llvm-readobj:symlinks",
@@ -59,6 +60,11 @@
"//llvm/tools/llvm-nm:symlinks",
]
}
+group("llvm-objcopy") {
+ deps = [
+ "//llvm/tools/llvm-objcopy:symlinks",
+ ]
+}
group("llvm-objdump") {
deps = [
"//llvm/tools/llvm-objdump:symlinks",
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55831.178829.patch
Type: text/x-patch
Size: 2201 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181219/fbf80dc8/attachment.bin>
More information about the llvm-commits
mailing list