In d64eccf we split the object file reader from the writer and removed
the dependency on clangCodeGen from the dependency scanner. However, we
were still initializing all the llvm targets, which was needed for
writing object file pcms but not reading them. This caused us to link
more llvm target code than necessary. Shrinks clangd by nearly 50% for
me.
rdar://144790713
20 lines
832 B
C++
20 lines
832 B
C++
//===- DependencyScanningService.cpp - clang-scan-deps 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/Tooling/DependencyScanning/DependencyScanningService.h"
|
|
|
|
using namespace clang;
|
|
using namespace tooling;
|
|
using namespace dependencies;
|
|
|
|
DependencyScanningService::DependencyScanningService(
|
|
ScanningMode Mode, ScanningOutputFormat Format,
|
|
ScanningOptimizations OptimizeArgs, bool EagerLoadModules, bool TraceVFS)
|
|
: Mode(Mode), Format(Format), OptimizeArgs(OptimizeArgs),
|
|
EagerLoadModules(EagerLoadModules), TraceVFS(TraceVFS) {}
|