From 0e60a9e10df73436513f9eb9db19f876346c2e89 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Tue, 19 Dec 2023 19:30:46 +0100 Subject: [PATCH] Update build glue to build default llvm tools for world. --- usr.bin/clang/llvm-dwp/Makefile | 1 + usr.bin/clang/llvm-dwp/llvm-dwp-driver.cpp | 16 ++++++++++++++++ usr.bin/clang/llvm-objdump/Makefile | 1 + .../clang/llvm-objdump/llvm-objdump-driver.cpp | 16 ++++++++++++++++ usr.bin/clang/llvm-symbolizer/Makefile | 1 + .../llvm-symbolizer/llvm-symbolizer-driver.cpp | 16 ++++++++++++++++ 6 files changed, 51 insertions(+) create mode 100644 usr.bin/clang/llvm-dwp/llvm-dwp-driver.cpp create mode 100644 usr.bin/clang/llvm-objdump/llvm-objdump-driver.cpp create mode 100644 usr.bin/clang/llvm-symbolizer/llvm-symbolizer-driver.cpp diff --git a/usr.bin/clang/llvm-dwp/Makefile b/usr.bin/clang/llvm-dwp/Makefile index dcdec140189e60..fb1bc133803421 100644 --- a/usr.bin/clang/llvm-dwp/Makefile +++ b/usr.bin/clang/llvm-dwp/Makefile @@ -3,6 +3,7 @@ PROG_CXX= llvm-dwp MAN= SRCDIR= llvm/tools/llvm-dwp +SRCS+= llvm-dwp-driver.cpp SRCS+= llvm-dwp.cpp .include "${SRCTOP}/lib/clang/llvm.pre.mk" diff --git a/usr.bin/clang/llvm-dwp/llvm-dwp-driver.cpp b/usr.bin/clang/llvm-dwp/llvm-dwp-driver.cpp new file mode 100644 index 00000000000000..e4e923cbcbb696 --- /dev/null +++ b/usr.bin/clang/llvm-dwp/llvm-dwp-driver.cpp @@ -0,0 +1,16 @@ +//===-- driver-template.cpp -----------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "llvm/Support/LLVMDriver.h" +#include "llvm/ADT/ArrayRef.h" + +int llvm_dwp_main(int argc, char **, const llvm::ToolContext &); + +int main(int argc, char **argv) { + return llvm_dwp_main(argc, argv, {argv[0], nullptr, false}); +} diff --git a/usr.bin/clang/llvm-objdump/Makefile b/usr.bin/clang/llvm-objdump/Makefile index 87043a1ea0a5c6..416eb083850f7f 100644 --- a/usr.bin/clang/llvm-objdump/Makefile +++ b/usr.bin/clang/llvm-objdump/Makefile @@ -11,6 +11,7 @@ SRCS+= OffloadDump.cpp SRCS+= SourcePrinter.cpp SRCS+= WasmDump.cpp SRCS+= XCOFFDump.cpp +SRCS+= llvm-objdump-driver.cpp SRCS+= llvm-objdump.cpp .include "${SRCTOP}/lib/clang/llvm.pre.mk" diff --git a/usr.bin/clang/llvm-objdump/llvm-objdump-driver.cpp b/usr.bin/clang/llvm-objdump/llvm-objdump-driver.cpp new file mode 100644 index 00000000000000..87cdf5b9b9f3e8 --- /dev/null +++ b/usr.bin/clang/llvm-objdump/llvm-objdump-driver.cpp @@ -0,0 +1,16 @@ +//===-- driver-template.cpp -----------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "llvm/Support/LLVMDriver.h" +#include "llvm/ADT/ArrayRef.h" + +int llvm_objdump_main(int argc, char **, const llvm::ToolContext &); + +int main(int argc, char **argv) { + return llvm_objdump_main(argc, argv, {argv[0], nullptr, false}); +} diff --git a/usr.bin/clang/llvm-symbolizer/Makefile b/usr.bin/clang/llvm-symbolizer/Makefile index 5e954dc5f828d6..53134cc3972c63 100644 --- a/usr.bin/clang/llvm-symbolizer/Makefile +++ b/usr.bin/clang/llvm-symbolizer/Makefile @@ -5,6 +5,7 @@ PROG_CXX= llvm-symbolizer MAN= llvm-symbolizer.1 llvm-addr2line.1 SRCDIR= llvm/tools/llvm-symbolizer +SRCS+= llvm-symbolizer-driver.cpp SRCS+= llvm-symbolizer.cpp .include "${SRCTOP}/lib/clang/llvm.pre.mk" diff --git a/usr.bin/clang/llvm-symbolizer/llvm-symbolizer-driver.cpp b/usr.bin/clang/llvm-symbolizer/llvm-symbolizer-driver.cpp new file mode 100644 index 00000000000000..35cae1854107de --- /dev/null +++ b/usr.bin/clang/llvm-symbolizer/llvm-symbolizer-driver.cpp @@ -0,0 +1,16 @@ +//===-- driver-template.cpp -----------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "llvm/Support/LLVMDriver.h" +#include "llvm/ADT/ArrayRef.h" + +int llvm_symbolizer_main(int argc, char **, const llvm::ToolContext &); + +int main(int argc, char **argv) { + return llvm_symbolizer_main(argc, argv, {argv[0], nullptr, false}); +}