This patch is the first of two in refactoring Clang's dependency scanning tooling to remove its dependency on clangDriver. It separates Tooling/DependencyScanningTool.cpp from the rest of clangDependencyScanning and moves clangDependencyScanning out of clangTooling into its own library. No functional changes are introduced. The follow-up patch (#169964) will restrict clangDependencyScanning to handling only -cc1 command line inputs and will move all functionality related to handling driver commands into clangTooling. (Tooling/DependencyScanningTool.cpp). This is part of a broader effort to support driver-managed builds for compilations using C++ named modules and/or Clang modules. It is required for linking the dependency scanning tooling against the driver without introducing cyclic dependencies, which would otherwise cause build failures when dynamic linking is enabled. The RFC for this change can be found here: https://discourse.llvm.org/t/rfc-new-clangoptions-library-remove-dependency-on-clangdriver-from-clangfrontend-and-flangfrontend/88773?u=naveen-seth
21 lines
890 B
C++
21 lines
890 B
C++
//===- DependencyScanningService.cpp - Scanning Service -------------------===//
|
|
//
|
|
// 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 "clang/DependencyScanning/DependencyScanningService.h"
|
|
|
|
using namespace clang;
|
|
using namespace dependencies;
|
|
|
|
DependencyScanningService::DependencyScanningService(
|
|
ScanningMode Mode, ScanningOutputFormat Format,
|
|
ScanningOptimizations OptimizeArgs, bool EagerLoadModules, bool TraceVFS,
|
|
std::time_t BuildSessionTimestamp)
|
|
: Mode(Mode), Format(Format), OptimizeArgs(OptimizeArgs),
|
|
EagerLoadModules(EagerLoadModules), TraceVFS(TraceVFS),
|
|
BuildSessionTimestamp(BuildSessionTimestamp) {}
|