[driver] Add the -emit-library option.

This emits a dynamic library as the final build product (rather than an
executable), as well as implicitly passing -parse-as-library to the frontend.

Swift SVN r12930
This commit is contained in:
Jordan Rose
2014-01-24 19:46:39 +00:00
parent 96105255b6
commit b77dccef4e
6 changed files with 107 additions and 64 deletions

View File

@@ -70,8 +70,12 @@ public:
/// The output type which should be used for compile actions.
types::ID CompilerOutputType = types::ID::TY_INVALID;
/// Whether or not the output of compile actions should be linked together.
bool ShouldLink = false;
/// Describes if and how the output of compile actions should be
/// linked together.
LinkKind LinkAction = LinkKind::None;
/// Returns true if the linker will be invoked at all.
bool shouldLink() const { return LinkAction != LinkKind::None; }
/// Whether or not the driver should generate a module.
bool ShouldGenerateModule = false;