Ensure that we link `swift_CompilerPluginSupport` into the compiler and
SourceKit, and set the rpath appropriately to find the library in its
installed location.
A number of driver tests copy the driver executable into a temporary
directory to isolate it from the build tree. Also copy the plugin
support library into its appropriate place near the driver executable
to ensure these tests keep working. To help with this, add a
`swift_swift_parser` lit feature, which we can use in tests that
involve the new parser's capabilities.
Adding build modes for libswift: off, hosttools, bootstrapping, bootstrapping-with-hostlibs
The two bootstrapping modes are new. For details see libswift/README.md
Hardlinking to a symlink is not permitted, so use "swift-frontend"
instead of "swift" as the hard-link target.
Also, update one Linux-specific test to check for swift-frontend.
Clang 8 or 9 seems to have changed from EXE to exe. Allow both
capitalizations (which is not important in Windows) as a workaround.
Maybe in the future we can remove the uppercase option.
LLDB will automatically pick the host OS if no target is passed; a
later commit will teach immediate mode to do the same thing. For now,
they default to the same triple the Driver did in the past, which is
x86_64-apple-macosx10.9 on macOS and an arbitrary unversioned triple
compatible with the host elsewhere.
Part of rdar://problem/29433205.
Several of the swift repl tests assume that lldb does not exist next to the swift driver in the binary directory. This patch updates the tests to remove that assumption. This allows the swift tests to correctly pass if LLDB is built in-tree.
These tests are all checking for invocations of the legacy swift repl. If LLDB is in the directory next to swift they fail because it instead invokes the LLDB repl. This patch makes the tests pass by hard linking the swift driver into a temp directory before running those tests so that swift doesn't find LLDB sitting next to itself.
The "Tool" abstraction wasn't buying us enough to deserve the added
complexity. Now a ToolChain turns Actions into Jobs, and every helper
tool is searched for relative to Swift first. Much simpler.
Swift SVN r31563
...and then honor them.
While here, make -l a little more flexible (see interpret_with_options test).
rdar://problem/17830826, which unblocks the LLDB feature for the same.
Swift SVN r24033
Previously we hardcoded a few important default CPUs, ABIs, and features into
Swift's driver, duplicating work in Clang. Now that we're using Clang's
driver to create the Clang "sub-compiler", we can delegate this work to Clang.
As part of this, I've dropped the options for -target-abi (which was a
frontend-only option anyway) and -target-feature (which was a hidden driver
option and is a frontend-only option in /Clang/). We can revisit this later
if it becomes interesting. I left in -target-cpu, which is now mapped
directly to Clang's -mcpu=.
Swift SVN r22449
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