Commit Graph

27 Commits

Author SHA1 Message Date
William Dillon
d0d9b1de5a Discard swift.ld and support gold linker 2016-02-17 17:47:35 -08:00
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
Jordan Rose
c1ab32e7f2 On Linux, "/" is a perfectly reasonable default SDK.
Swift SVN r31534
2015-08-27 18:47:24 +00:00
Jordan Rose
442b76fe08 [test] Split out Apple parts of Driver/sdk.swift. NFC.
Swift SVN r31533
2015-08-27 18:47:19 +00:00
Dmitri Hrybenko
ea17483633 Add CMake options and #ifs to hide tvOS
Swift SVN r28752
2015-05-19 05:15:52 +00:00
Jordan Rose
b33994fabd [Driver] Bump required versions of the SDKs.
rdar://problem/20408977

Swift SVN r28043
2015-05-01 18:16:13 +00:00
David Farler
544ef4002d Merge tvOS and watchOS Support
- Add frontend and standard library build support for tvOS.
- Add frontend support for watchOS.

watchOS standard library builds are still disabled during SDK bring-up.

To build for TVOS, specify --tvos to build-script.
To build for watchOS, specify --watchos to build-script (not yet supported).

This patch does not include turning on full tests for TVOS or watchOS, and
will be included in a follow-up patch.

Swift SVN r26278
2015-03-18 21:35:07 +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
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
f22fd8da7b [test] Disable GuardMalloc logging, and re-enable the tests that logging broke.
Thanks, Greg.

Swift SVN r22009
2014-09-17 06:10:21 +00:00
Jordan Rose
3af1873db1 [test] Add "XFAIL: gmalloc" where appropriate.
As a reminder, you can test with GuardMalloc by passing "--param gmalloc"
to lit.

All other tests pass under GuardMalloc. Hooray!

Swift SVN r21995
2014-09-16 23:12:17 +00:00
Jordan Rose
686e93e7d2 [test] Make driver tests more robust against paths containing dots.
Swift SVN r21853
2014-09-10 22:48:38 +00:00
Jordan Rose
1d8c75ede1 [test] Fix driver tests to handle spaces in the path to Xcode.
Commands like 'ld' are picked up from the path, which can result in picking
the binaries inside Xcode.

Swift SVN r21749
2014-09-05 22:22:41 +00:00
Jordan Rose
e3261af695 [Driver] Don't pass -module-name to the LLDB REPL.
The LLDB REPL doesn't guarantee any particular module name, and in particular
it currently uses multiple modules to handle redefinitions.

<rdar://problem/17918172>

Swift SVN r21303
2014-08-20 01:41:17 +00:00
Jordan Rose
4ceaaa53ee [test] Fix test for r21100 to not rely on empty directories.
...which git completely ignored.

Swift SVN r21103
2014-08-08 01:39:20 +00:00
Jordan Rose
2d727bb7a3 [Driver] Reject SDKs older than OS X 10.10 or iOS 8.
Actually, reject SDK directories whose names match
  "*OSX<version>(.Internal)?.sdk" on OS X with a version older than 10.10
  "*OS7*" on iOS
  "*Simulator7*" on iOS

We only really care about 10.9 anyway, but just in case people install the
one-previous version of iOS...

<rdar://problem/17951615>

Swift SVN r21100
2014-08-08 00:22:35 +00:00
Ben Langmuir
d197964680 Rename -integrated-repl to -deprecated-integrated-repl
Swift SVN r20781
2014-07-30 22:09:37 +00:00
Ben Langmuir
920a8ff343 Make using the -i flag an error
This flag is now obsoleted by the interactive driver and simply
complicates understanding the command-line parsing. Making it an error
to force users to move also allows us to reuse the flag in the future if
we like.

Swift SVN r20641
2014-07-28 20:19:27 +00:00
Ben Langmuir
07a3c7cbd5 Switch to the new swift/swiftc commmand line interface
This makes the command line interface to 'swift' the same as what was
previously in 'swifti', and removes the staging symlink.

For posterity, the command line behaviour for 'swift' is now:
* `swift` -> start the repl
* `swift script.swift` -> run script.swift (the old -i mode)
* Any arguments after the input file are forwarded to the script as
  Process.arguments
* A shebang line is something like #!/usr/bin/xcrun swift

The batch compiler 'swiftc' behaves much like the old 'swift'
executable, but without the interactive bits now in 'swifti'.

<rdar://problem/17710788>

Swift SVN r20540
2014-07-25 13:28:21 +00:00
Ben Langmuir
d2ef235237 Move the lit tests over to the new swift/swiftc interfaces
Most of the tests just got moved to swiftc, but some of them were
duplicated to apply to both swiftc and swift. A handful still use the
existing 'swift' because they are for the existing '-i' syntax.

Note: this means config.swift_driver now uses the staging symlink
'swifti'. The only thing preventing us from dropping the 'i' and getting
rid of the old interface is that Xcode hasn't moved to swiftc yet
<rdar://problem/17769327>.

Swift SVN r20467
2014-07-24 04:34:10 +00:00
Ben Langmuir
afd88cab2a Add parsing support for swifti
Parse until the first input, and then collect the remaining arguments
and forward them to the script.

Swift SVN r20437
2014-07-23 22:42:05 +00:00
Ben Langmuir
8b7cc4f619 Make -i compatible with shebangs and forward arguments correctly
The driver option -i now requires an input file as argument, and any
options after the input file will be treated as arguments to the
interpretted file.

This also renames the frontend option to -interpret, since it is parsed
as a flag, unlike -i. We could support -interpret in the driver if we
wanted, which would allow us to use --, but wouldn't work with shebang
scripts. For now, it's frontend-only.

Swift SVN r19718
2014-07-09 02:37:42 +00:00
Jordan Rose
3f97d035fd [Driver] Allow falling back to / for -i mode if xcrun says to.
After a long discussion with Daniel, the behavior of "xcrun --sdk macosx"
will always pick the best  SDK to use with the Swift found by "xcrun swift".
The only case in which we have a problem is if someone has explicitly
specified the path to a Swift binary, or if someone is on 10.9 but only has
the command line tools installed (in which case they lose anyway).

In order to keep this from polluting the tests, I've changed %swift_driver
to set SDKROOT to an empty path by default. Use -sdk if you need to provide
an SDK in a test, not the SDKROOT environment variable. (This is what
everyone has been doing so far.)

This is still limited to -i and REPL modes; for compilation an explicit SDK
is still required.

<rdar://problem/14395800>

Swift SVN r18770
2014-06-10 01:00:43 +00:00
Jordan Rose
e715940241 [Driver] Teach "swift -i" and "swift -repl" to default to the current OS X SDK.
This only works when swift is packaged with Xcode or installed as a command
line tool, but those are the important cases.

<rdar://problem/14395800>, again.

Swift SVN r18757
2014-06-09 21:29:08 +00:00
Ted Kremenek
fad874708e Adjust test cases.
Swift SVN r17964
2014-05-12 22:01:52 +00:00
Connor Wakamo
6384482902 [driver] Added support to honor the SDKROOT environment variable.
Centralized the driver-level handling of the SDK path in OutputInfo and
Driver::buildOutputInfo(), and added support for falling back to getenv(SDKROOT)
if -sdk wasn't passed (and SDKROOT is set in the environment).

Updated Swift::constructJob() to get the SDK path from the OutputInfo instead of
just passing -sdk from the original driver invocation.

Also added a driver-level check to ensure that the specified SDK is present;
if not, print out a warning. This fixes <rdar://problem/14409974>.

Added test/Driver/sdk.swift to test the -sdk and SDKROOT behavior, as well as
the nonexistent SDK warning.

Swift SVN r12815
2014-01-22 23:41:29 +00:00