Commit Graph

117 Commits

Author SHA1 Message Date
Jordan Rose
a875d8c7c7 [Driver] Preserve filelists when a subprocess crashes. (#9849)
This should make it easier to rerun crashed jobs that use filelists;
previously you'd have to run the top-level driver command again with
-save-temps. I didn't want to save /all/ temporary files because that
often includes things like .o files, which could fill up your disk
pretty quickly. But we can always tweak this later.
2017-05-22 17:14:20 -07:00
practicalswift
431e5a1440 [gardening] Use consistent end of namespace comments 2017-04-20 13:47:10 +02:00
Graydon Hoare
0245c83c4b [Stats] Add -stats-output-dir, wire UnifiedStatsReporter into place. 2017-04-03 18:08:59 -07:00
Graydon Hoare
1c3a54bfa5 [Driver] Only warn on .swiftdeps load-fail with -driver-show-incremental. 2017-03-01 09:07:21 -08:00
Graydon Hoare
ec5d4f3ea1 [Driver] Put new job-lifecycle diagnostic chatter behind another option. 2017-03-01 09:07:21 -08:00
Graydon Hoare
99df2082cd [Driver] Clear deferred commands on each task queue iteration. 2017-03-01 09:07:20 -08:00
Graydon Hoare
4583e910b8 [Driver] Extract dependencyLoadFailed, add optional warning. 2017-02-28 15:17:26 -08:00
Graydon Hoare
423d9fe054 [Driver] Extract reloadAndRemarkDeps from taskFinished. 2017-02-28 15:17:26 -08:00
Graydon Hoare
ab5201f60e [Driver] Make PerformJobsState a mostly-private class. 2017-02-28 15:17:26 -08:00
Graydon Hoare
211d09759c [Driver] Move populateInputInfoMap into PerformJobsState. 2017-02-28 15:17:25 -08:00
Graydon Hoare
9d0e7e0e99 [Driver] Factor out PerformJobsState::checkUnfinishedJobs. 2017-02-28 15:17:25 -08:00
Graydon Hoare
f83ee9fd2f [Driver] Factor out PerformJobsState::runTaskQueueToCompletion. 2017-02-28 15:17:25 -08:00
Graydon Hoare
1b3a4347a8 [Driver] Factor out PerformJobsState::schedule*Jobs. 2017-02-28 15:17:25 -08:00
Graydon Hoare
6d21711d02 [Driver] Move TaskQueue callbacks to PerformJobsState. 2017-02-28 15:17:24 -08:00
Graydon Hoare
f7e9598d08 [Driver] Clean up some comments. 2017-02-28 15:17:24 -08:00
Graydon Hoare
b8c26ef5cd [Driver] Move more temp Job sets to PerformJobsState. 2017-02-28 15:17:24 -08:00
Graydon Hoare
e81d0f4ca1 [Driver] Pass Tracer to markTransitive everywhere. 2017-02-28 15:17:24 -08:00
Graydon Hoare
053c3f8e9e [Driver] Move DepGraph and MarkTracer to PerformJobsState. 2017-02-28 15:17:23 -08:00
Graydon Hoare
aee4c83467 [Driver] Move markFinished to PerformJobsState, add logging. 2017-02-28 15:17:23 -08:00
Graydon Hoare
de2c05fa8b [Driver] Extract scheduleCommandIfNecessary and add logging. 2017-02-28 15:17:23 -08:00
Graydon Hoare
a13a0dfbba [Driver] Factor out some Job-logging support. 2017-02-28 15:17:22 -08:00
Graydon Hoare
01655789a0 [Driver] Move some function-local state into PerformJobState. 2017-02-28 13:22:20 -08:00
Hugh Bellamy
fdf261327a Return an error result if we can't set the environment variables in performSingleCommand 2017-02-15 09:30:24 +07:00
Hugh Bellamy
fc9d3bdb47 Simplify Windows Compilation::performSingleCommand implementation 2017-02-13 20:00:01 +07:00
Hugh Bellamy
f001b7562b Use relatively new LLVM_FALLLTHROUGH instead of our own SWIFT_FALLTHROUGH 2017-02-12 10:47:03 +07:00
Robert Widmann
3eba4fd3ab Merge pull request #6787 from matthewcarroll/SR-3175-Include-signal-number-in-parseable-output-message
SR-3175: Include the terminating signal number in the driver output
2017-01-18 11:00:59 -07:00
Bob Wilson
34514513fd Merge remote-tracking branch 'origin/master' into master-next 2017-01-15 17:34:17 -08:00
Matthew Carroll
c1be989c61 Fix code style 2017-01-14 12:26:14 -05:00
Graydon Hoare
3b0b8c3270 [Bridging PCH] Auto-generate and use temporary bridging PCHs from driver. 2017-01-13 15:18:40 -08:00
Matthew Carroll
5497bfb7b4 SR-3175: Include the terminating signal number in the driver output
* Add the signal number of the terminated task to the output of the driver on platforms for which the signal number is available. The new key in the parseable driver output is "signal".
* Add a test to verify that the signal number is emitted.
* Add documentation for the new "signal" key emitted in the parseable driver output.

https://bugs.swift.org/browse/SR-3175
2017-01-13 13:48:41 -05:00
Bob Wilson
c765d5e3a5 Merge remote-tracking branch 'origin/master' into master-next 2017-01-12 15:58:19 -08:00
Sean Callanan
399709ccb8 Optionally separate Tasks` stderr from stdout.
Fixes a serious problem where spurious output from xcrun breaks
swift's discovery of libarclite.

<rdar://problem/28573949>
2017-01-11 11:11:23 -08:00
Bob Wilson
37e7d1c627 Merge remote-tracking branch 'origin/master' into master-next 2017-01-08 17:07:46 -08:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
Bob Wilson
78b28243ff Merge remote-tracking branch 'origin/master' into master-next 2017-01-03 14:22:59 -08:00
practicalswift
38be6125e5 [gardening] C++ gardening: Terminate namespaces, fix argument names, ...
Changes:
* Terminate all namespaces with the correct closing comment.
* Make sure argument names in comments match the corresponding parameter name.
* Remove redundant get() calls on smart pointers.
* Prefer using "override" or "final" instead of "virtual". Remove "virtual" where appropriate.
2016-12-17 00:32:42 +01:00
Bob Wilson
deddf19aae Merge remote-tracking branch 'origin/master' into master-next 2016-12-13 10:23:03 -08:00
Michael Gottesman
59c6a64f5a [gardening] 0 => nullptr. Fixed with clang-tidy. 2016-12-06 23:14:13 -08:00
Saleem Abdulrasool
2f21735256 adjust for SVN r286524 and SVN r287369
Groups are required for Timers after SVN r286524.  SVN r287369 requires that
timers have short names and long descriptions.  Adjust the API usage
accordingly.  Reorder some words to make some more sense as a description.
2016-12-04 19:35:30 -08:00
Bob Wilson
13da3fa8b1 Merge remote-tracking branch 'origin/master' into master-next 2016-12-04 18:16:09 -08: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
Brian Gesiak
fc1c81f500 [Frontend] Preserve .swiftdeps files
The Swift compiler uses files with an extension of ".swiftdeps" to store
information about cross-file dependencies. These files are read in at the
start of compilation to compute a dependency graph, and updated as compilation
proceeds. However, because these files are updated on every build, an
issue with dependency analysis is hard to reproduce—the inputs have been
lost.

Address this by renaming swiftdeps files that are about to be
overwritten, to '.swiftdeps~'. This preserves dependency information
from the most recent compilation (but no further back).
2016-11-16 22:51:05 -05:00
Bob Wilson
956c7150d5 Tweak my previous changes for reading and writing times.
As far as I know, the previous code worked OK but this version seems
cleaner.
2016-11-09 10:40:40 -08:00
Bob Wilson
5c4f517824 Checkpoint fixes for llvm r284966 (TimeValue) 2016-10-28 12:09:57 -07:00
Graydon Hoare
8970d44675 Add "-swift-version <n>" that sets LangOpts.EffectiveLanguageVersion.
This flag switches the "effective language version" of the compiler,
at least to any version supported (as of this change: "3" or "3.0").

At the moment nothing uses it except the language version build
configuration statements (#if swift(...)) and various other places
that report, encode, or otherwise check version numbers.

In the future, it's intended as scaffolding for backwards compatibility.

Fixes SR-2582
2016-09-20 15:11:37 -07:00
Brian Gesiak
2b3647efc4 [Driver] Move .swiftdeps strings (NFC)
Define compilation record (.swiftdeps) top-level keys, as well as string
identifiers used in compilation record files (like "!dirty" and "!private"), in
a single location. NFC.
2016-08-30 12:30:14 -04:00
Brian Gesiak
ba8009bfa3 [SR-1788] Add -driver-time-compilation option (#4367)
Add an option to print the time it takes each driver task to complete.

Here's an example of the output:

```
$ swiftc -driver-time-compilation \
         -emit-library -module-name Crispix \
         Crispix/A.swift Crispix/B.swift Crispix/C.swift
===-------------------------------------------------------------------------===
                           Driver Time Compilation
===-------------------------------------------------------------------------===
  Total Execution Time: 0.0000 seconds (0.0875 wall clock)

   ---Wall Time---  --- Name ---
   0.0245 ( 28.0%)  link /path/to/Crispix/A.swift /path/to/Crispix/B.swift /path/to/Crispix/C.swift
   0.0211 ( 24.1%)  compile /path/to/Crispix/A.swift
   0.0209 ( 23.9%)  compile /path/to/Crispix/B.swift
   0.0176 ( 20.1%)  compile /path/to/Crispix/C.swift
   0.0035 (  4.0%)  swift-autolink-extract /path/to/Crispix/A.swift /path/to/Crispix/B.swift /path/to/Crispix/C.swift
   0.0875 (100.0%)  Total
```
2016-08-23 13:35:48 -07:00
Jordan Rose
c9c0df2e55 [Driver] Address Brian G's feedback on 848b3eb. (#4046)
No functionality change.
2016-08-05 17:26:03 -07:00
Jordan Rose
b8cc2673c3 [Driver] Remove debugging code from 848b3eb.
Thanks, Dmitri.
2016-08-03 11:15:49 -07:00
Jordan Rose
848b3eb6a3 [Driver] Make sure to rebuild dependents when a dirty file fails. (#3935)
Otherwise we get into a situation like this:

1. Change made to the interface of file A.swift that also causes an
   error in A.swift.
2. Fixing the error in A.swift does not affect A.swift's interface.
3. File B.swift that depends on A.swift is not rebuilt, since the most
   recent change to A.swift did not change its interface.

To fix this, mark downstream files as needing to be rebuilt even when
a compilation job fails with errors. Additionally, attempt to be extra
conservative when there's a crash.

rdar://problem/25405605
2016-08-02 19:07:29 -07:00