From 45b6364e8d74f6038e94b760f017e03740acf725 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 31 Mar 2020 12:08:02 -0700 Subject: [PATCH] [gn build] Port 03f43b3aca36 --- llvm/utils/gn/secondary/lld/MachO/BUILD.gn | 36 ++++++++++++++++++++++++++ llvm/utils/gn/secondary/lld/tools/lld/BUILD.gn | 1 + 2 files changed, 37 insertions(+) create mode 100644 llvm/utils/gn/secondary/lld/MachO/BUILD.gn diff --git a/llvm/utils/gn/secondary/lld/MachO/BUILD.gn b/llvm/utils/gn/secondary/lld/MachO/BUILD.gn new file mode 100644 index 0000000..52f39e6 --- /dev/null +++ b/llvm/utils/gn/secondary/lld/MachO/BUILD.gn @@ -0,0 +1,36 @@ +import("//llvm/utils/TableGen/tablegen.gni") + +tablegen("Options") { + visibility = [ ":MachO2" ] + args = [ "-gen-opt-parser-defs" ] +} + +static_library("MachO2") { + output_name = "lldMachO2" + configs += [ "//llvm/utils/gn/build:lld_code" ] + deps = [ + ":Options", + "//lld/Common", + "//llvm/lib/BinaryFormat", + "//llvm/lib/DebugInfo/DWARF", + "//llvm/lib/IR", + "//llvm/lib/LTO", + "//llvm/lib/MC", + "//llvm/lib/Object", + "//llvm/lib/Option", + "//llvm/lib/Support", + "//llvm/lib/Target:TargetsToBuild", + ] + include_dirs = [ "." ] + sources = [ + "Arch/X86_64.cpp", + "Driver.cpp", + "InputFiles.cpp", + "InputSection.cpp", + "OutputSegment.cpp", + "SymbolTable.cpp", + "Symbols.cpp", + "Target.cpp", + "Writer.cpp", + ] +} diff --git a/llvm/utils/gn/secondary/lld/tools/lld/BUILD.gn b/llvm/utils/gn/secondary/lld/tools/lld/BUILD.gn index f79e2b7..746def9 100644 --- a/llvm/utils/gn/secondary/lld/tools/lld/BUILD.gn +++ b/llvm/utils/gn/secondary/lld/tools/lld/BUILD.gn @@ -27,6 +27,7 @@ executable("lld") { deps = [ "//lld/COFF", "//lld/ELF", + "//lld/MachO:MachO2", "//lld/MinGW", "//lld/lib/Driver", "//lld/wasm", -- 2.7.4