Commit Graph

73 Commits

Author SHA1 Message Date
Saleem Abdulrasool
c0bb36fa2e test: remove some unnecessary shell usage
Replace the shell usage with lit substitutions.  NFC
2019-01-15 10:46:56 -08:00
Jordan Rose
129f39d89e Merge pull request #21513 from jrose-apple/cachet
[ParseableInterface] Pass prebuilt cache path down to sub-invocations

And several other fixes that got folded into this PR.
2019-01-09 14:58:59 -08:00
sarveshtamba
56318f3e1f Changes for #SR-9413:Swift 5.0 test failures on PowerPC 2018-12-24 11:37:38 +00: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
5417ca0aa2 [ParseableInterfaces] Handle swiftdoc files correctly
The previous 'openModuleFiles' interface in SerializedModuleLoaderBase
still assumed that swiftmodule files and swiftdoc files would be found
next to each other, but that's not true anymore with
swiftinterfaces-built-to-modules. Give up on this assumption (and on
the minor optimization of passing down a scratch buffer) and split out
the interface into the customization point
'findModuleFilesInDirectory' and the implementation 'openModuleFiles'.
The latter now takes two full paths: one for the swiftmodule, one for
the swiftdoc.
2018-12-21 15:37:32 -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
Graydon Hoare
e7ab8fc261 [ModuleInterface] <rdar://46073729> Re-enable test that appears to be working now, unclear why initially failing. 2018-12-17 13:57:29 -08:00
Saleem Abdulrasool
f138f5046a test: invoke python scripts with the interpreter
Ensure that we explicitly provide the path to the interpreter when
running the python scripts during the tests.  This is needed to have the
tests work on Windows which does not honour the shebang in the file.  It
also ensures that we use the correct interpreter for the tests.
2018-12-12 16:07:17 -08:00
Jordan Rose
813316190b [ParseableInterface] Don't require Foundation to use @objc
Deinitializers are always @objc. (Arguably, this makes it unnecessary
to print, but we don't want to do any @objc inference at all in a
swiftinterface.)
2018-12-06 14:57:18 -08:00
Jordan Rose
a51f1dd3d2 [ParseableInterface] Pass down the module name and import source loc
- Use the name for the cached module, so that we don't end up with a
  zillion "x86_64-XXXXXXXX.swiftmodule" files in the cache when we're
  working with architecture-specific swiftmodules.

- Diagnose if the expected name is different from the name specified
  in the swiftinterface.

- Emit all diagnostics at the location of the import, instead of
  without any location at all.
2018-12-06 13:33:07 -08:00
Harlan Haskins
3716858d81 Merge pull request #20936 from harlanhaskins/optimus-prime
[ParseableInterface] Optimize parseable modules
2018-12-03 18:30:07 -08:00
Jordan Rose
f8852c97de [ParseableInterface] Don't serialize all SIL like a SIB file (#20976)
This would break resilience, which makes a distinction between "SIL
only inside the module, which is inside the resilience domain" and
"SIL we're going to serialize, which is outside the resilience
domain".
2018-12-03 18:29:48 -08:00
Harlan Haskins
95a17b5afe [ParseableInterface] Optimize parseable modules
This turns on optimization for speed for modules compiled from interfaces during module loading.
2018-12-03 13:17:35 -08:00
Jordan Rose
7d30f9cb1f [ParseableInterface] Fixes and tests for Graydon's fallback work 2018-11-29 11:02:24 -08:00
Jordan Rose
0ccfe34513 [ParseableInterface] mkdir -p the module cache before using it
Clang does the same thing for its module cache.
2018-11-28 18:34:41 -08:00
Graydon Hoare
f7df1b3ce5 [ModuleInterface] <rdar://46073729> Temporarily disable module-cache-diagnostics test. 2018-11-14 14:00:07 -08:00
Graydon Hoare
657543119c [ModuleInterface] Version string (semi)finalization, format version checking. 2018-11-13 13:25:15 -08:00
Graydon Hoare
9d7d66806f [ModuleInterface] Compensate for silly source of order variation in .d files. 2018-11-13 13:25:15 -08:00
Graydon Hoare
8959923ac8 [ModuleInterface] Propagate dependencies to outer DependencyTracker for use in .d files. 2018-11-13 13:25:15 -08:00
Graydon Hoare
d44943a482 [ModuleInterface] Include and dedupe (transitive) FILE_DEPENDENCY records from dependencies. 2018-11-13 13:25:15 -08:00
Graydon Hoare
b07425ac1d [ModuleInterface] Switch from mtime to xxhash in FILE_DEPENDENCY records. 2018-11-13 13:25:15 -08:00
Graydon Hoare
37a2eb561c [ModuleInterface] Add tests for warning-suppression, errors from sub-instance. 2018-11-13 13:24:23 -08:00
Graydon Hoare
4a4f5de511 [ModuleInterface] Move module cache tests to ModuleCache subdir. 2018-11-13 13:24:23 -08:00