Commit Graph

8 Commits

Author SHA1 Message Date
Connor Wakamo
3b80655e62 [driver] Switched from --help-hidden to -help-hidden.
Left --help-hidden in as an alias for consistency with clang, but -help-hidden is now the primary spelling of this option.

Swift SVN r11350
2013-12-16 19:23:16 +00:00
Connor Wakamo
44971d2e5a [driver] Added support for specifying the number of commands to execute in parallel.
The driver does not yet support parallel execution, but this sets the Compilation up with the necessary information to execute commands in parallel.

Swift SVN r11333
2013-12-15 21:47:35 +00:00
Connor Wakamo
6127955b05 [driver] Add support for passing arguments after -- down to the frontend as-is if the driver is in immediate mode.
In Driver::translateInputArgs(), don’t break apart the OPT__DASH_DASH argument if we’re in immediate mode.
Mark OPT__DASH_DASH as being a FrontendOption.
In Swift::constructJob(), add support for types::TY_Nothing, and pass the argument for OPT__DASH_DASH as-is if the driver is invoking the frontend in immediate mode.

Swift SVN r11325
2013-12-15 00:58:27 +00:00
Connor Wakamo
58ec588819 [driver] Adjusted the implementation of Driver::getOutputMode() so that it uses Option::matches() instead of a series of ArgList::getLastArg() calls.
Also added support for indicating that -i and -repl produce no output.

Swift SVN r11323
2013-12-15 00:58:25 +00:00
Connor Wakamo
02c1532d27 Initial support for an integrated frontend in swift_driver.
- 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
2013-12-10 18:06:54 +00:00
Connor Wakamo
d456848811 [driver] Added support for differentiating SIL emitted by -emit-sil and -emit-silgen.
SIL emitted by -emit-silgen is treated internally as “raw-sil”, while SIL emitted by -emit-silgen is treated internally as “sil".
Externally, there are no changes; both kinds of SIL still have a “.sil” file extension.
Updated test/Driver/Actions.swift to account for the change in behavior with -emit-silgen.

Swift SVN r10947
2013-12-06 23:11:30 +00:00
Connor Wakamo
3d9f94e715 Properly implemented "swift_driver -driver-print-bindings".
This produces output similar to "clang -ccc-print-bindings".
Also added several tests to ensure that "swift_driver -driver-print-bindings"
behaves as expected.

Swift SVN r10935
2013-12-06 21:23:03 +00:00
Connor Wakamo
ed2038585f Initial set of changes to add a new 'swift_driver' executable.
- 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
2013-12-06 21:23:01 +00:00