Page MenuHomeFreeBSD

D51044.id157614.diff
No OneTemporary

D51044.id157614.diff

diff --git a/lib/clang/libclang/Makefile b/lib/clang/libclang/Makefile
--- a/lib/clang/libclang/Makefile
+++ b/lib/clang/libclang/Makefile
@@ -841,6 +841,11 @@
SRCS_MIN+= Tooling/CommonOptionsParser.cpp
SRCS_MIN+= Tooling/CompilationDatabase.cpp
SRCS_MIN+= Tooling/Core/Replacement.cpp
+SRCS_MIN+= Tooling/DependencyScanning/DependencyScanningTool.cpp
+SRCS_MIN+= Tooling/DependencyScanning/DependencyScanningFilesystem.cpp
+SRCS_MIN+= Tooling/DependencyScanning/DependencyScanningWorker.cpp
+SRCS_MIN+= Tooling/DependencyScanning/DependencyScanningService.cpp
+SRCS_MIN+= Tooling/DependencyScanning/ModuleDepCollector.cpp
SRCS_MIN+= Tooling/ExpandResponseFilesCompilationDatabase.cpp
SRCS_MIN+= Tooling/FileMatchTrie.cpp
SRCS_MIN+= Tooling/GuessTargetAndModeCompilationDatabase.cpp
@@ -848,6 +853,7 @@
SRCS_MIN+= Tooling/Inclusions/IncludeStyle.cpp
SRCS_MIN+= Tooling/InterpolatingCompilationDatabase.cpp
SRCS_MIN+= Tooling/JSONCompilationDatabase.cpp
+SRCS_MIN+= Tooling/LocateToolCompilationDatabase.cpp
SRCS_MIN+= Tooling/Refactoring.cpp
SRCS_MIN+= Tooling/RefactoringCallbacks.cpp
SRCS_MIN+= Tooling/Tooling.cpp
diff --git a/usr.bin/clang/Makefile b/usr.bin/clang/Makefile
--- a/usr.bin/clang/Makefile
+++ b/usr.bin/clang/Makefile
@@ -1,7 +1,7 @@
.include <src.opts.mk>
.if ${MK_CLANG} != "no"
-SUBDIR+= clang
+SUBDIR+= clang clang-scan-deps
.endif
.if !defined(TOOLS_PREFIX)
diff --git a/usr.bin/clang/clang-scan-deps/Makefile b/usr.bin/clang/clang-scan-deps/Makefile
new file mode 100644
--- /dev/null
+++ b/usr.bin/clang/clang-scan-deps/Makefile
@@ -0,0 +1,26 @@
+LLVM_BASE= ${SRCTOP}/contrib/llvm-project
+LLVM_SRCS= ${LLVM_BASE}/llvm
+PROG_CXX= clang-scan-deps
+MAN=
+
+SRCDIR= clang/tools/clang-scan-deps
+SRCS+= ClangScanDeps.cpp \
+ clang-scan-deps-driver.cpp
+
+LIBDEPS+= clang
+
+# Handle Opts.td
+.SUFFIXES: .td .inc
+CFLAGS+= -I${.OBJDIR}
+TDFILE= Opts.td
+INCFILES= ${TDFILE:.td=.inc}
+GENOPT= -gen-opt-parser-defs
+.td.inc:
+ ${LLVM_TBLGEN} ${GENOPT} -I ${LLVM_SRCS}/include -d ${.TARGET:C/$/.d/} \
+ -o ${.TARGET} ${.IMPSRC}
+TGHDRS+= ${INCFILES}
+DEPENDFILES+= ${INCFILES:C/$/.d/}
+DPSRCS+= ${INCFILES}
+CLEANFILES+= ${INCFILES} ${INCFILES:C/$/.d/}
+
+.include "../clang.prog.mk"
diff --git a/usr.bin/clang/clang-scan-deps/clang-scan-deps-driver.cpp b/usr.bin/clang/clang-scan-deps/clang-scan-deps-driver.cpp
new file mode 100644
--- /dev/null
+++ b/usr.bin/clang/clang-scan-deps/clang-scan-deps-driver.cpp
@@ -0,0 +1,18 @@
+//===-- 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"
+#include "llvm/Support/InitLLVM.h"
+
+int clang_scan_deps_main(int argc, char **, const llvm::ToolContext &);
+
+int main(int argc, char **argv) {
+ llvm::InitLLVM X(argc, argv);
+ return clang_scan_deps_main(argc, argv, {argv[0], nullptr, false});
+}

File Metadata

Mime Type
text/plain
Expires
Sun, Apr 12, 10:59 PM (9 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31378142
Default Alt Text
D51044.id157614.diff (3 KB)

Event Timeline