Commit Graph

60 Commits

Author SHA1 Message Date
Argyrios Kyrtzidis
0135e01d02 Rename the swift-format utility to swift-indent
This is to distinguish the C++ indenting functionality from the new formatter that is written in Swift.
2019-07-26 11:40:54 -07:00
Jordan Rose
f4487881e4 Add PrettyStackTraceSwiftVersion, and use it in the swiftc executable (#24235)
As pointed out on a recent JIRA, crash traces don't mention what
version of Swift you were running. Usually that can be gleaned from
the path, but not always.
2019-04-24 15:53:56 -07:00
Jason Mittertreiner
24c10fe8f7 Fix Response Files on Windows (#22985)
This prevents response files on Windows from being overridden after they
are read.
2019-03-01 19:03:46 -08:00
Jordan Rose
a23eaf4a02 Remove API notes compilation support from swiftc (#21759)
We don't use this feature anymore (see 0149129ed), and now that we've
branched Swift 5.0 for the last time it's time to rip it out of swiftc
(and then from Clang).

No functionality change, unless someone was compiling their own API
notes. If you were doing that, just copy them into place as text.
2019-01-16 10:39:39 -08:00
Bob Wilson
ca10ed04a6 [master-next] Remove unnecessary argument array copy from PR 17494 2018-07-03 17:26:14 -07:00
Bob Wilson
397ace0ac6 [master-next] NFC: Rename variable from PR #17494
Jordan reviewed my change and suggested using a better variable name
to avoid potential confusion between "args" and "argv".
2018-06-25 23:43:13 -07:00
Bob Wilson
ad9098fca0 [master-next] Fix up the driver's use of PROGRAM_START after PR #16362
On the master-next branch, the InitLLVM class used by the PROGRAM_START
macro can modify the argc/argv values (currently only on Windows).
Expanding response files before initializing the stack trace also modifies
the arguments so use a separate SmallVector for each copy of the argument
vector.
2018-06-25 17:01:01 -07:00
Bob Wilson
44712233c3 Merge remote-tracking branch 'origin/master' into master-next 2018-06-21 23:36:03 -07:00
Jordan Rose
7d8e40b0bb Merge pull request #16362 from dabelknap/frontend_responsefile
Wrap Command Line Arguments in a Response File if System Limits are Exceeded

https://bugs.swift.org/browse/SR-4517
2018-06-21 16:31:20 -07:00
Austin Belknap
be229fc173 Use subCommandArgs instead of argv within subcommand if block. 2018-06-20 15:24:37 -07:00
Austin Belknap
8e6abee651 Pass ArrayRefs by value. 2018-06-12 18:00:30 -07:00
Austin Belknap
6592b428f8 Style fixes. 2018-06-01 14:18:26 -07:00
Austin Belknap
3b38fa68a1 Preserve argv for the stack trace, and only create a copy if necessary. 2018-06-01 14:01:11 -07:00
swift-ci
6bcc013437 Merge remote-tracking branch 'origin/master' into master-next 2018-05-30 00:49:45 -07:00
Robert Widmann
d7493dd0fa [NFC] Expose the TaskQueue as a Compilation Parameter
Shuffle the responsibility for creating the TaskQueue out of the
Compilation's internal job state object and into the driver.  Expose
a builder convenience function that handles the argument parsing.
2018-05-29 21:58:27 -07:00
Austin Belknap
3fe62b94e7 Reformat verbose and stack trace printouts for response-files. 2018-05-23 11:05:20 -07:00
Saleem Abdulrasool
6b18cfe53f master-next: update for SVN r330216
sys::Process::GetArgumentVector has been removed.  It is unclear if it
was ever needed in the first place.  Simplify the code to avoid the use.
2018-04-23 11:24:02 -07:00
Austin Belknap
0e5f88c5ad Elaborate on the purpose of response files. 2018-04-18 09:54:59 -07:00
Austin Belknap
a7fe02e0c5 Add ability to expand response files from the command line. 2018-04-10 12:41:25 -07:00
Sho Ikeda
cea6c03eb2 [gardening] Use !empty() over size() > 0 2018-03-08 09:21:09 +09:00
Jordan Rose
3cd9f166bc Don't spend time initializing LLVM when running the driver (#14896)
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.
2018-02-28 19:56:19 -08:00
Graydon Hoare
d139ab2968 [BatchMode] Expand lifetime of ToolChain, pass reference to it to Compilation. 2018-01-24 10:31:19 -08:00
swift-ci
75dc7c1b73 Merge pull request #13011 from modocache/driver-typo 2017-11-18 14:00:29 -08:00
Brian Gesiak
70ad32c598 [Driver] Fix typo: half sentence and period 2017-11-18 12:25:34 -05:00
Ankit Aggarwal
d84e4b4de1 [Driver] Remove built-in run subcommand
This is as per discussion in https://bugs.swift.org/browse/SR-5332
2017-07-10 10:35:00 +05:30
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
Daniel Martín
df15ec4f3b Swift-format driver tool
This driver tool formats Swift files or file ranges using some
parameters like tabs or spaces, tab width, or amount of spaces.
2016-08-08 11:07:15 +02:00
John McCall
23f961bc0a Give the FrontendTool library its own header and allow users
to observe progress through the frontend.
2016-04-21 14:59:39 -07:00
John McCall
95eeabb025 Move the -frontend logic into its own library to allow re-use
and abstraction (to come).
2016-04-20 22:54:00 -07:00
Doug Gregor
da60535ced [Driver / API Notes] Re-introduce "-apinotes" driver flag to compile API notes.
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.
2016-03-04 14:12:15 -08:00
practicalswift
1339b5403b Consistent use of header comment format.
Correct format:
//===--- Name of file - Description ----------------------------*- Lang -*-===//
2016-01-04 13:26:31 +01:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Daniel Dunbar
a0f5bdfa50 [PATCH] [Driver] Add support for using 'swift' to exec subcommands.
- 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
2015-10-01 07:16:12 +00:00
Michael Gottesman
e864f02690 In all executables make sure to completely initialize LLVM.
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
2015-09-09 04:37:38 +00: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
Argyrios Kyrtzidis
8b250d6d35 [driver] Remove the 'swift-fixit' symlink and introduce '-emit-fixits-path' frontend option that
writes compiler fixits as source edits.

Driver option '-fixit-code' adds '-emit-fixits-path' for all the frontend invocations.

Swift SVN r27208
2015-04-10 17:33:29 +00:00
Argyrios Kyrtzidis
623b9827b4 [driver] Separate "delegate to the migrator with swift-update" and "get compiler fixits with swift-fixit" functionalities.
Swift SVN r27139
2015-04-08 22:02:23 +00:00
Arnold Schwaighofer
f79e6abd2e Missing header includes ...
Swift SVN r26454
2015-03-23 22:05:47 +00:00
Graham Batty
078a558b26 Extract autolink information as a compile step.
Swift SVN r25510
2015-02-24 20:33:05 +00:00
Argyrios Kyrtzidis
e021f5077d [swift-update] Treat 'swift-update' as a symlink to the driver, instead of a separate executable.
This avoids having another copy of the frontend in the toolchain.

Swift SVN r24320
2015-01-09 18:55:16 +00:00
Dmitri Hrybenko
b11d050ff3 Driver: disable the compiler if COMPILER_DISABLE_SWIFT env var is
present

rdar://19161254

Swift SVN r23744
2014-12-05 22:41:49 +00:00
Doug Gregor
e0afb13abb Remove the APINotes library; it lives in Clang, now.
Swift SVN r22286
2014-09-25 18:48:43 +00:00
Ben Langmuir
13b44b7814 Revert "Suppress CrashTracer aggregation for crashes in non-production compilers."
This is failing to build in Jenkins

This reverts commit r22058

Swift SVN r22075
2014-09-18 15:43:12 +00:00
Greg Parker
5b22baffcd Suppress CrashTracer aggregation for crashes in non-production compilers.
rdar://18177298


Swift SVN r22058
2014-09-18 03:17:46 +00:00
Connor Wakamo
6e6e20ab4b [test] Added an integrated "-test-createCompilerInvocation" tool to swift-ide-test.
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
2014-08-03 19:04:27 +00:00
Ben Langmuir
a96009c52f Add a 'swifti' symlink to stage in the upcoming driver changes
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
2014-07-23 02:30:39 +00:00
Anna Zaks
ae3e822c2c Add a skeleton for API Notes YAML-to-binary conversion
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
2014-07-18 19:54:11 +00:00
Greg Parker
00060d67d0 Revert r20137 because it breaks the arm64 build.
Swift SVN r20142
2014-07-18 06:34:43 +00:00
Anna Zaks
7fab0c91e2 Add a skeleton for API Notes YAML-to-binary conversion
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
2014-07-18 03:39:03 +00:00