Commit Graph

18 Commits

Author SHA1 Message Date
Artem Chikin
2121d32748 [Dependency Scanning] Skip over source-code (not interface) modules when collecting cross import overlays 2021-01-07 09:08:21 -08:00
Jonas Devlieghere
d01474cc72 Change interfaces to accept a FileCollectorBase
The FileCollectorBase is the common interface shared by different
implementations. In lldb, we implement our own lazy variant that allows
us to do the heavy lifting out-of-process instead of inside the signal
handler.
2020-10-28 20:14:46 -07:00
Artem Chikin
f9d6c6a619 [Dependency Scanner] Refactor ModuleDependencies to represent binary-only Swift modules explicitly
This matches the behavior of the current client (`swift-driver`) and reduces ambiguity in how the nodes in the graph are to be treated. Swift dependencies with a textual interface, for example, must be built into a binary module by clients. Swift dependencies without a textual interface, with only a binary module, are to be used directly, without any up-to-date checks.

Note, this is distinct from Swift dependencies that have a textual interface, for which we also detect potential pre-build binary module candidates. Those are still reported in the `details` field of textual Swift dependencies as `prebuiltModuleCandidates`.
2020-10-12 09:56:03 -07:00
Robert Widmann
76cd4bf160 [NFC] Differential Incremental External Dependencies in DependencyTracker
Also perform the plumbing necessary to convince the rest of the compiler that they're just ordinary external dependencies. In particular, we will still emit these depenencies into .d files, and code completion will still index them.
2020-09-24 23:25:47 -06:00
Artem Chikin
965ca698d5 Add in-source rationale for why Placeholder dependencies are needed. 2020-07-28 11:34:27 -07:00
Artem Chikin
b5af62f93f Add new dependency kind (swiftExternal) to model external dependencies. 2020-07-27 09:24:35 -07:00
Hamish Knight
7bc5440d17 [Frontend] Internalize createDependencyTracker
Expand the FrontendOptions to allow the enabling
of the dependency tracker for non-system
dependencies, and switch the previous clients of
`createDependencyTracker` over to using this
option. This ensures that the dependency tracker
is now set only during `CompilerInstance::setup`.
2020-06-29 15:26:26 -07:00
Xi Ge
42cc989136 DependenciesScanner: teach the scanner to handle cross-import overlays 2020-06-09 10:38:52 -07:00
Brent Royal-Gordon
12286197c9 [NFC] Improvements suggested in code review
Thank you, @hamishknight and @varungandhi-apple.
2020-02-18 11:08:36 -08:00
Brent Royal-Gordon
e248f82773 Add support for loading cross-import files 2020-02-18 11:06:12 -08:00
Varun Gandhi
ade2abb03c [NFC] Fix out-of-date documentation related to ModuleLoaders. 2019-10-11 17:23:07 -07:00
Jonas Devlieghere
c0feea1da3 [Reproducers] Add FileCollector support to DependencyTracker
For reproducers in LLDB, we need to collect module dependency
information coming from the clang importer. However, we cannot override
the dependency collector, like we do in LLDB, because its interface is
completely hidden in the clang importer. The solution is to pass the
FileCollector through the DependencyTracker.

(cherry picked from commit c624a87bd5)
2019-08-19 16:53:03 -07:00
Nathan Hawes
58d0ee0888 [ParseableInterface] Distinguish SDK and non-SDK dependencies
This allows the SDK to be relocated without automatically resulting in a
rebuild.

Based on an old patch from Jordan Rose.
2019-04-03 06:35:11 -07:00
Robert Widmann
d845112695 Add -track-system-dependencies Flag
Add a flag to configure the behavior of the Clang Importer's dependency tracker with respect to system dependencies.
2018-07-19 13:03:30 -07:00
practicalswift
a596961187 [gardening] Make parameter name comments match actual parameter names 2017-04-20 13:47:10 +02:00
practicalswift
b704f1448b [gardening] Improve header consistency 2017-04-12 15:13:11 +02:00
Graydon Hoare
ab2f429348 [Dependencies] Address review comments. 2017-03-29 12:01:23 -07:00
Graydon Hoare
d018521464 [ClangImporter] Collect deps via subclass of clang::DependencyCollector. 2017-03-28 18:33:04 -07:00