[MIPS GlobalISel] Select MSA vector generic and builtin add
[llvm-complete.git] / utils / gn / secondary / llvm / tools / llvm-objcopy / BUILD.gn
blob25aa19e313b7fc8b44f1338f22aee6dc47d53638
1 import("//llvm/tools/binutils_symlinks.gni")
2 import("//llvm/utils/TableGen/tablegen.gni")
3 import("//llvm/utils/gn/build/symlink_or_copy.gni")
5 tablegen("ObjcopyOpts") {
6   visibility = [ ":llvm-objcopy" ]
7   args = [ "-gen-opt-parser-defs" ]
10 tablegen("StripOpts") {
11   visibility = [ ":llvm-objcopy" ]
12   args = [ "-gen-opt-parser-defs" ]
15 symlinks = [ "llvm-strip" ]
16 if (llvm_install_binutils_symlinks) {
17   symlinks += [
18     "objcopy",
19     "strip",
20   ]
22 foreach(target, symlinks) {
23   symlink_or_copy(target) {
24     deps = [
25       ":llvm-objcopy",
26     ]
27     source = "llvm-objcopy"
28     output = "$root_out_dir/bin/$target"
29   }
32 # //:llvm-objcopy depends on this symlink target, see comment in //BUILD.gn.
33 group("symlinks") {
34   deps = []
35   foreach(target, symlinks) {
36     deps += [ ":$target" ]
37   }
40 executable("llvm-objcopy") {
41   deps = [
42     ":ObjcopyOpts",
43     ":StripOpts",
44     "//llvm/lib/MC",
45     "//llvm/lib/Object",
46     "//llvm/lib/Option",
47     "//llvm/lib/Support",
48   ]
49   include_dirs = [ "." ]
50   sources = [
51     "Buffer.cpp",
52     "COFF/COFFObjcopy.cpp",
53     "COFF/Object.cpp",
54     "COFF/Reader.cpp",
55     "COFF/Writer.cpp",
56     "CopyConfig.cpp",
57     "ELF/ELFConfig.cpp",
58     "ELF/ELFObjcopy.cpp",
59     "ELF/Object.cpp",
60     "MachO/MachOLayoutBuilder.cpp",
61     "MachO/MachOObjcopy.cpp",
62     "MachO/MachOReader.cpp",
63     "MachO/MachOWriter.cpp",
64     "MachO/Object.cpp",
65     "llvm-objcopy.cpp",
66   ]