Commit Graph

8 Commits

Author SHA1 Message Date
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
Jordan Rose
7f3344402c [ParseableInterface] Honor -track-system-dependencies when caching
One interesting thing here is that the decision of whether or not to
track system dependencies ends up going into the cache key for a
swiftmodule built from a parseable interface, because it affects that
module's up-to-date check. If we didn't include
-track-system-dependencies in the cache key, we could end up tracking
system dependencies for some modules but not others in the same build.

There's a bit of a bug here where they're /not/ honored if the
top-level invocation isn't tracking /any/ dependencies, but given
how uncommon this flag is in practice that's probably okay for now.

Still TODO: honor this for -build-swiftmodule-from-parseable-interface
as well. That's currently not tracking dependencies at all and it
probably should.
2019-04-03 06:34:29 -07:00
Jordan Rose
140b3cc37c [test] Tweak check-is-forwarding-module.py to handle multiple inputs (#23313)
And fix the error message printing while I'm at it.

I don't have a public test for this at the moment, but an Apple-
internal tool will use it. I hope to upstream that tool in the future.
2019-03-14 17:55:49 -07:00
Harlan Haskins
366bbf48b9 [ParseableInterface] Add ‘forwarding modules’
A ‘forwarding module’ is a YAML file that’s meant to stand in for a .swiftmodule file and provide an up-to-date description of its dependencies, always using modification times.

When a ‘prebuilt module’ is first loaded, we verify that it’s up-to-date by hashing all of its dependencies. Since this is orders of magnitude slower than reading mtimes, we’ll install a `forwarding module` containing the mtimes of the now-validated dependencies.
2019-03-07 11:36:15 -08:00
Jordan Rose
614deb640b [ParseableInterface] Pass prebuilt cache path down to sub-invocations
Otherwise, the top-level compilation gets the benefit of the prebuilt
cache path, but the sub-invocations for swiftinterfaces that /do/
need to be compiled do not.
2018-12-21 15:41:17 -08:00
Jordan Rose
4bfe4eff6d [ParseableInterfaces] Add -prebuilt-module-cache-path to the frontend
When trying to load a swiftinterface, search this directory before
doing all the work of building a swiftmodule.
2018-12-17 18:23:28 -08:00
Jordan Rose
7d30f9cb1f [ParseableInterface] Fixes and tests for Graydon's fallback work 2018-11-29 11:02:24 -08:00
Graydon Hoare
4a4f5de511 [ModuleInterface] Move module cache tests to ModuleCache subdir. 2018-11-13 13:24:23 -08:00