Commit Graph

18 Commits

Author SHA1 Message Date
Daniel Dunbar
778f82939c [Frontend] Escape target names in dependencies output.
- <rdar://problem/23691798> swiftc does not properly quote spaces in output paths in dependency file target names
2015-12-01 00:31:16 -08:00
Jordan Rose
c79952389c Dependencies: rename entries in the .swiftdeps file to something sensible.
- (depends|provides)-top-level for top-level names.
- (depends|provides)-nominal for access into nominal types.
- (depends|provides)-dynamic-lookup for @objc members available on AnyObject.
- depends-external for cross-module file-based dependencies.

No functionality change.

Swift SVN r30283
2015-07-16 23:36:26 +00:00
Jordan Rose
879ce47526 [test] Fix RUN lines missing their RUN.
Swift SVN r25409
2015-02-20 02:26:50 +00:00
Jordan Rose
8f615f5549 Frontend: don't crash using -emit-reference-dependencies without -primary-file.
For now, just emit a warning. Later on we can actually get this right for
multiple files.

This is important for people manually trying to reduce run lines that come
from Xcode.

rdar://problem/19786899

Swift SVN r25388
2015-02-19 02:28:32 +00:00
Dmitri Hrybenko
f43843f25c tests: use the new substitution for the mock SDK
This is required to correctly use the mock SDK when the SDK overlay is
built and tested separately.  (Otherwise, the mock SDK might not get
used, because the overlay SDK options would expand from the
%-substitution, appear first on the command line, and shadow the mock
SDK in the search path).

Swift SVN r25185
2015-02-11 18:57:29 +00:00
Graham Batty
83b4384fac Update test flags for linux failures and support.
Also removed the sdk 'feature' in favour of the more specific
objc_interop.

Swift SVN r24856
2015-01-30 21:31:48 +00:00
Jordan Rose
da46727f8f Always emit .d and .swiftdeps files, even if there were errors in the AST.
Yes, they may not be correct, but the stale ones that were there before
won't be correct either (if they were there at all). This should make both
Xcode and the Swift driver less likely to have issues when there's an error
in a newly added file.

Goes with rdar://problem/19640006

Swift SVN r24824
2015-01-29 21:59:23 +00:00
Dmitri Hrybenko
3b04d1b013 tests: reorganize tests so that they actually use the target platform
Most tests were using %swift or similar substitutions, which did not
include the target triple and SDK.  The driver was defaulting to the
host OS.  Thus, we could not run the tests when the standard library was
not built for OS X.

Swift SVN r24504
2015-01-19 06:52:49 +00:00
Jordan Rose
97b3a3da40 Include cross-module dependencies in swiftdeps files.
These are the same dependencies collected for .d files, including
headers and imported swiftmodules. These can also cause a file to be out
of date.

Part of rdar://problem/19270920

Swift SVN r24334
2015-01-10 00:38:09 +00:00
Jordan Rose
7da40344e9 [test] Weaken test for .d file generation.
The SwiftShims module is a private dependency of the standard library,
so it shouldn't really show up in the generated .d file. However, it's
doing any harm by being there in +Asserts builds, so for now just don't
check. See rdar://problem/19318312.

Swift SVN r24096
2014-12-23 01:24:50 +00:00
Dmitri Hrybenko
dab5fe14fe test/Frontend/dependencies.swift fails when the compiler is built
without assertions, XFAIL it.

Swift SVN r24059
2014-12-20 09:42:55 +00:00
Graham Batty
83f27a8af7 Revert "Mark tests that don't pass on linux as XFAIL."
This reverts commit 2711ca86de7bf6a7885ccea24219a48a590b1e95.

Swift SVN r23577
2014-11-24 17:42:13 +00:00
Graham Batty
198402dcfe Mark tests that don't pass on linux as XFAIL.
Swift SVN r23573
2014-11-24 17:40:37 +00:00
Dave Abrahams
b108945c46 [stdlib] Break up shims.h
More things are going to be declared in shims, in part to reduce the use
of @asmname, and we'll want to keep this organized.

Swift SVN r22574
2014-10-07 21:40:45 +00:00
Jordan Rose
fce31decdc Serialize bridging headers into the merged module file.
We do this so that the swiftmodule file contains all info necessary to
reconstruct the AST for debugging purposes. If the swiftmodule file is copied
into a dSYM bundle, it can (in theory) be used to debug a built app months
later. The header is processed with -frewrite-includes so that it includes
any non-modular content; the user will not have to recreate their project
structure and header maps to reload the AST.

There is some extra complexity here: a target with a bridging header
(such as a unit test target) may depend on another target with a bridging
header (such as an app target). This is a rare case, but one we'd like to
still keep working. However, if both bridging headers import some common.h,
we have a problem, because -frewrite-includes will lose the once-ness
of #import. Therefore, we /also/ store the path, size, and mtime of a
bridging header in the swiftmodule, and prefer to use a regular parse from
the original file if it can be located and hasn't been changed.

<rdar://problem/17688408>

Swift SVN r20128
2014-07-18 00:22:53 +00:00
Jordan Rose
770a3dda3b Fix memory-smashing logic error in dependency file generation.
Accessed the wrong array...

Swift SVN r18535
2014-05-21 23:33:51 +00:00
Jordan Rose
8f67532022 Weaken ordering requirements in test/Frontend/dependencies.swift.
This failed on my ninja build, and it's really not important.

Swift SVN r18056
2014-05-14 01:59:46 +00:00
Jordan Rose
2877bd0854 Add support for dependency file generation with -emit-dependencies.
This performs very conservative dependency generation for each compile task
within a full compilation. Any source file, swiftmodule, or Objective-C
header file that is /touched/ gets added to the dependencies list, which
is written out on a per-input basis at the end of compilation.

This does /not/ handle dependencies for the aggregated swiftmodule, swiftdoc,
generated header, or linked binary. This is just the minimum needed to get
Xcode to recognize what needs to be rebuilt when a header or Swift source
file changes. We can revisit this later.

This finishes <rdar://problem/14899639> for now.

Swift SVN r18045
2014-05-14 00:34:11 +00:00