Tiny start-up time optimization noticed while looking at how we do
PrettyStackTraceProgram. Also add PrettyStackTraceProgram to a few
more of our testing tools, via the new PROGRAM_START macro.
Using Clang to compile API notes introduces a dependency on the
underlying Clang, which can cause problems as Clang's support for API
notes evolves. Re-introduce the "-apinotes" driver flag into the Swift
driver to allow us to compile API notes, and use that (rather than
Clang) to precompile API notes for the overlays.
- This allows 'swift <FOO>' to be used to invoke swift-<FOO>, so that we can
use 'swift' as a namespace for additional commands (like ones used for the
package manager.
- This patch just adds the basic subcommand functionality, but doesn't rework
either 'swift-autolink-extract' or 'swift -frontend' to follow this code path.
- <rdar://problem/22844530> Provide 'swift' support for subcommands
Swift SVN r32367
I also added a macro called INITIALIZE_LLVM(argc, argv) which moves this logic
into one place and should be used at the beginning of *all* binaries. It
initializes an LLVM shutdown object, sets up the pretty stack trace, and then
initializes all of the parts of LLVM. This will make it easy to update this in
the future.
The reason why a macro was required was because of llvm_shutdown_obj, an RAII
object that cleans up LLVM. It has to be at the function level scope of the main
function.
Swift SVN r31815
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
This is very basic: it just sees whether, given a set of driver arguments, the
swift::driver::createCompilerInvocation API returns a non-null
CompilerInvocation.
Unlike other modes of swift-ide-test, this mode requires that
"-test-createCompilerInvocation" be the first argument passed to swift-ide-test.
This is because it is handled separately from llvm::cl::ParseCommandLineOptions
so the remaining arguments can be passed through directly to
swift::driver::createCompilerInvocation without any interference from that
parser.
Additionally, added a test which uses this tool to try to create a
CompilerInvocation for a handful of basic driver commands.
Swift SVN r20973
For now, keep 'swift' the same and put all the interactive driver
changes under 'swifti'. When these are in good shape, I will remove
swifti and make 'swift' the interactive driver as discussed.
Swift SVN r20359
Reapplies r20137 with most comments addressed.
Parses a YAML file (but not the final/full format yet).
Adds an entry to the driver for the apinotes "tool". We want the tool
to be visible to the user so it has to go to the driver.
Very limited testing as of now.
Swift SVN r20173
Parses a YAML file (but not the final/full format yet).
Adds an entry to the driver for the apinotes "tool". We want the tool
to be visible to the user so it has to go to the driver.
Very limited testing as of now.
Swift SVN r20137
Previously, main() would always return 0 if a Compilation was not built. Now
that the driver is correctly emitting diagnostics, check for any errors to see
if it should return 1 instead.
Swift SVN r13176
This tool implements support for running IR transformations; in particular, it
replaces the functionality supported by "swift -arc-optimize" and
"swift -arc-transform".
No tests yet, but this will be used by several tests once we complete the
transition to the new driver.
Swift SVN r12927
Actual execution of Jobs is still performed under-the-covers by JobList::run(), but this abstraction will allow the Compilation to execute Jobs in parallel.
Swift SVN r11334
- Added support for invoking the Swift frontend via "swift_driver -frontend".
- Added frontend_main.cpp, which implements the main entry point for the
integrated frontend. (Currently, this supports compiling an input Swift file
into an object file.)
- Removed lib/Frontend/FrontendOptions.td, and replaced its functionality with
options in include/Swift/Driver/Options.td and a new
include/Swift/Driver/FrontendOptions.td. Options supported by the frontend
are denoted by the FrontendOption flag; options which are not supported by
the driver are denoted by the NoDriverOption flag.
- Updated CompilerInvocation::parseArgs() to use the option table returned from
createDriverOptTable(), including renaming a handful of options. (-triple is
now -target, and -Xclang is now -Xcc.)
Swift SVN r11082
- Added a couple of new targets:
- libswiftDriver, which contains most of the driver implementation
- swift_driver, which produces the actual executable
- Added centralized version information into libswiftBasic.
- Added a new "Driver Design & Internals" document, which currently describes
the high-level design of the Swift driver.
- Implemented an early version of the functionality of the driver, including
versions of the Parse, Pipeline, Bind, Translate, and Execute driver stages.
Parse, Pipeline, and Bind are largely implemented; Translate and Execute are
early placeholders. (Translate produces "swift_driver --version" and "ld -v"
commands, while Execute performs all subtasks sequentially, rather than in
parallel.)
This is just the starting point for the Swift driver. Tests for the existing
behavior are forthcoming.
Swift SVN r10933