Commit Graph

18 Commits

Author SHA1 Message Date
Adrian Prantl
0de0d43773 Introduce a -modulewrap driver action that wraps a (merged) .swiftmodule
inside a swift ast section in an object file so it can be passed to the
linker. The driver automatically wraps merged swiftmodules iff the target
is ELF.

rdar://problem/22407666

Swift SVN r31641
2015-09-02 21:56:25 +00:00
Adrian Prantl
e5cbfce181 Factor out the ObjC-specific tests of ASTSection.swift into a separate
file so they can have separate requirements.

Swift SVN r31590
2015-08-31 23:30:52 +00:00
Adrian Prantl
4f11ecc1da Get rid of Int in the debug info tests and preform some general cleanup.
<rdar://problem/20856296> Extinguish 'Int' from DebugInfo tests

Swift SVN r31177
2015-08-12 18:16:43 +00:00
Arnold Schwaighofer
f7771859d8 Rename the optimize_test feature to executable_test and document that feature.
Swift SVN r29213
2015-06-01 23:44:13 +00:00
Arnold Schwaighofer
3643c614a3 Run tests in optimize test modes
This runs all files that have a target-build-swift or target-run-stdlib-swift
RUN line in optimize test mode.

Swift SVN r29206
2015-06-01 21:23:31 +00:00
Dmitri Hrybenko
0fce5c7b4e tests: remove uses of println() that are not relevant to the tests
Swift SVN r28016
2015-05-01 03:35:50 +00:00
Dmitri Hrybenko
f87788f218 tests: remove ld-add_ast_path feature
We don't support building Swift with linkers that don't support this feature.

Swift SVN r27180
2015-04-09 21:47:55 +00:00
Jordan Rose
de8a05b293 [Serialization] Serialize the SDK path and -Xcc arguments for an app.
...so that the debugger has the best possible chance of being able to load
the app properly.

We don't do this for frameworks today because we don't want to leak this
information into the public module; once we have a distinction between
"the module that ships with the framework" and "the module that goes into
the debug info" we can do this for frameworks as well.

Part of rdar://problem/17670778

Swift SVN r25204
2015-02-11 23:07:48 +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
Adrian Prantl
9cbf991e80 Update lldb-moduleimport-test to use llvm::object::ObjectFile.
Fixes: rdar://16244944 lldb-moduleimport-test does not support 32-bit executables

Swift SVN r23960
2014-12-16 20:23:58 +00:00
Dmitri Hrybenko
1eea220932 Use one module cache directory for all the lit tests to speed them up
Doing so is safe even though we have mock SDK.  The include paths for
modules with the same name in the real and mock SDKs are different, and
the module files will be distinct (because they will have a different
hash).

This reduces test runtime on OS X by 30% and brings it under a minute on
a 16-core machine.

This also uncovered some problems with some tests -- even when run for
iOS configurations, some tests would still run with macosx triple.  I
fixed the tests where I noticed this issue.

rdar://problem/19125022

Swift SVN r23683
2014-12-04 11:21:48 +00:00
Adrian Prantl
30976b2eb3 No need to emit a Swift module in -gline-tables-only mode.
Thanks Jordan for pointing this out!

Swift SVN r23616
2014-12-02 18:07:37 +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
Jordan Rose
79224874eb [Driver] Switch debug info to use ld's new -add_ast_path option.
Rather than embed AST info directly in binaries, we now include a special
symbol table entry that points to the serialized AST as a separate file.
This requires a very recent version of ld.

We still want to support the __SWIFT,__ast section in a binary because
that's how it's modeled in dSYM, so manually test both modes in
ASTSection_linker.swift.

Part of <rdar://problem/15796201>.

Swift SVN r20421
2014-07-23 18:04:10 +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
Ted Kremenek
fad874708e Adjust test cases.
Swift SVN r17964
2014-05-12 22:01:52 +00:00
Jordan Rose
366f431d6f Replace ASTStreamer tests with tests of the new driver's __SWIFT,__ast section.
Now that we don't use the wrapper around the serialized module in the
__SWIFT,__ast section, we just need to verify that (a) we can read these
bare modules out from a Mach-O file, and (b) the new driver creates these
modules correctly.

Swift SVN r13245
2014-01-31 19:58:00 +00:00