Commit Graph

15 Commits

Author SHA1 Message Date
Jordan Rose
4fc6cf28ca Update test for r30500.
Forgot that this also looks at -Xcc options.

Swift SVN r30503
2015-07-22 21:13:50 +00:00
David Farler
91c64fdbb1 Stop re-exporting the Objective-C library
and link it properly. This is needed to embed LLVM bitcode sections
in the standard library and overlays. The linker doesn't support
embedded bitcode and reexport flags (among others).

rdar://problem/20750099

Swift SVN r28052
2015-05-01 22:24:14 +00:00
Dmitri Hrybenko
32dbd0cfef tests: add a %target-ld substitution that is configured with stdlib paths
rdar://20474868

Swift SVN r27183
2015-04-09 22:17:24 +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
Dmitri Hrybenko
189eb3251e Revert "tests: use a %target-* substitution instead of calling 'ld' directly"
This reverts commit r27176.  Jordan pointed out an issue with this
approach, I'll make a different fix.

Swift SVN r27179
2015-04-09 21:11:28 +00:00
Dmitri Hrybenko
c6504366ad tests: use a %target-* substitution instead of calling 'ld' directly
rdar://20474868

Swift SVN r27176
2015-04-09 20:47:24 +00:00
Jordan Rose
6e96e26a81 Add CompilerInvocation::loadFromSerializedAST.
This is mainly for the debugger's use, to set up CompilerInvocations that
match how a particular app was compiled in certain important ways. Today
that's the target (which is also in the binary), the SDK path (which in
the long run should probably be an SDK name), and any random -Xcc options
we need to pass (which we should probably attempt to minimize).

Because there's only one target and SDK per context, and because -Xcc
options can easily conflict, this is only intended to be used once per
CompilerInvocation.

Note that search paths are not covered by this; they are already being
added at the time the module is loaded. See r24545.

Completes rdar://problem/17670778.

Swift SVN r25227
2015-02-12 05:32:37 +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
Dmitri Hrybenko
6058d291ca CMake: allow the SDK overlay to be built separately from the compiler
and the stdandard library

rdar://19703353

Swift SVN r25139
2015-02-10 21:57:03 +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
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
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
c72fe37e48 [test] Drop the ability to set a custom 'ld'.
It wasn't being honored by the Swift driver anyway. Use a custom PATH instead.

Swift SVN r20420
2014-07-23 18:04:08 +00:00
Ted Kremenek
fad874708e Adjust test cases.
Swift SVN r17964
2014-05-12 22:01:52 +00:00
Greg Parker
7361d116c0 [test] Add %target-cpu and %target-os substitutions. Adopt them in a few tests.
Swift SVN r13465
2014-02-05 01:05:17 +00:00