Commit Graph

6 Commits

Author SHA1 Message Date
Ben Langmuir
e7c37655e4 [CAS] Cache symbol graph outputs
The symbol graph output from a module can contain an arbitrary number of
files, depending on what extensions it contains, so cache a list of
symbol graph files with their base name and contents so that they can be
replayed.

rdar://140286819
2024-12-03 13:11:19 -08:00
Steven Wu
b326c55d82 [CAS] Full support for make-style dependencies file caching hit
Fully support make-style `.d` dependencies file output by making
following improvements:
* All correct dependency file render when cache hit for a different
  output file location. The dependency file should list the correct
  output path, not the stale output path for the initial compilation
* When enable a path prefix mapper to canonicalize the path, the
  dependency file should render the input file correctly as the input
  file path on disk.

rdar://132250067
2024-09-30 15:53:18 -07:00
Shubham Sandeep Rastogi
31baf4fb54 Store MCCAS ObjectRef as CASOutputBackend's main output.
This patch stores the MCCAS ObjectRef as the main output of the
CASOutputBackend when MCCAS is enabled.
2024-07-09 13:38:11 -07:00
Ben Barham
ef8825bfe6 Migrate llvm::Optional to std::optional
LLVM has removed llvm::Optional, move over to std::optional. Also
clang-format to fix up all the renamed #includes.
2024-02-21 11:20:06 -08:00
Steven Wu
76bde39ee7 [Caching] Encoding cache key for input file with index instead of path
Avoid path encoding difference (for example, real_path vs. path from
symlink) by eliminating the path from cache key. Cache key is now
encoded with the index of the input file from all the input files from
the command-line, reguardless if those inputs will produce output or
not. This is to ensure stable ordering even the batching is different.

Add a new cache computation API that is preferred for using input index
directly. Old API for cache key is deprecated but still updated to
fallback to real_path comparsion if needed.

As a result of swift scan API change, rename the feature in JSON file to
avoid version confusion between swift-driver and libSwiftScan.

rdar://119387650
2023-12-18 14:06:00 -08:00
Steven Wu
6c3097657a [Caching] Change swift cache key computation
Update swift cache key computation mechanism from one cache key per
output, to one cache key per primary input file (for all outputs that
associated with that input).

The new schema allows fewer cache lookups while still preserving most of
the flexibility for batch mode and incremental mode.
2023-10-13 09:15:22 -07:00