Commit Graph

1773 Commits

Author SHA1 Message Date
Jordan Rose
40cd9e479b [Driver] Always quote file paths in the build record.
rdar://problem/21753365

Swift SVN r30054
2015-07-10 01:39:12 +00:00
Jordan Rose
80b734d014 [Driver] -driver-show-incremental: avoid showing duplicates.
Swift SVN r29819
2015-06-30 23:12:43 +00:00
Jordan Rose
6275c78a69 [Driver] -driver-show-incremental: fix printing of protocols.
Actually use the existential-like name we constructed.

Swift SVN r29818
2015-06-30 23:12:41 +00:00
Jordan Rose
83f9ed43c3 [Driver] Don't assert when some files /don't/ get rebuilt but we still merge modules.
...or do anything else that depends on the compile commands that get skipped.

Fix-up to rdar://problem/21129029

Swift SVN r29816
2015-06-30 22:37:22 +00:00
Jordan Rose
45189f9feb [Driver] Add a basic tracing mode to determine why files are getting rebuilt.
Enabled with -driver-show-incremental. For debugging purposes only.

Swift SVN r29804
2015-06-30 19:31:07 +00:00
Jordan Rose
9a39d71d1a [Driver] Add Job::dump.
No functionality change.

Swift SVN r29803
2015-06-30 19:31:05 +00:00
Jordan Rose
753ca13a83 [Driver] Don't assert that all Compile jobs have only one input.
...whole-module compilations obviously don't. This should fix the
PlaygroundLogger build assertion.

Swift SVN r29716
2015-06-26 00:51:39 +00:00
Dmitri Hrybenko
502d0d5120 Adjust to the new ParseArgs API
Swift SVN r29701
2015-06-25 22:01:40 +00:00
Jordan Rose
036b083138 [Driver] Eliminate the JobList class.
This was just a wrapper around SmallVector that optionally owned the Job pointers
in it. Now that all Jobs are owned by the Compilation, we don't have to worry
about this any more.

No functionality change.

Swift SVN r29668
2015-06-25 15:45:45 +00:00
Jordan Rose
482cfac8a1 [Driver] Store all Jobs in a flat list in the Compilation object.
The Compilation is now the only owner of the Jobs.

No end-user functionality change.

Swift SVN r29667
2015-06-25 15:45:43 +00:00
Jordan Rose
6fce6d331d [Driver] Better separation of concerns in the Tool hierarchy.
No intended functionality change.

Swift SVN r29666
2015-06-25 15:45:41 +00:00
Jordan Rose
4af8295600 [Driver] Put all jobs in a single task queue.
Previously, we would process all of a job's dependencies separately before
even scheduling it, and we wouldn't interleave dependencies from different
jobs. This meant (a) more overhead than necessary, and more importantly
(b) -embed-bitcode builds weren't being parallelized.

rdar://problem/21129029

Swift SVN r29665
2015-06-25 15:45:36 +00:00
Jordan Rose
2b7b78d162 [Driver] A .swift file should be rebuilt if its mtime has changed.
...not if it's newer than its output .o file. This handles cases where the
object file is generated too quickly (rdar://problem/19404140) or when you
revert to a previous version of the file, mtime intact (rdar://problem/19720146).

There's a lot of test churn here; the only real new test is the backwards
mtime update in one-way.swift.

Swift SVN r29584
2015-06-24 00:06:58 +00:00
Jordan Rose
e40dc7fc7a [bitcode] Pass -bitcode_bundle to the linker when linking via swiftc.
...and either -embed-bitcode or -embed-bitcode-marker is passed. This is
the same behavior as Clang.

rdar://problem/20246442

Swift SVN r29387
2015-06-15 20:57:38 +00:00
Jordan Rose
6b59ff8dc5 [bitcode] Don't allow -Xcc or -Xllvm arguments to bitcode backend jobs.
This is consistent with Clang, which rejects -mllvm options. All options
Clang /does/ accept should be covered by normal Swift flags.

rdar://problem/21245117

Swift SVN r29386
2015-06-15 20:57:31 +00:00
Jordan Rose
af49aa65e0 [Driver] Don't crash when a new file is added to the build.
This was supposed to be part of r28776, but the test got truncated and then
I forgot to commit it.

rdar://problem/21012796

Swift SVN r29039
2015-05-26 23:13:37 +00:00
Erik Eckstein
b6d3472d5e Driver: fix a crash with -wmo, -num-threads, -embed-bitcode and -parseable-output.
Fixes rdar://problem/21072204




Swift SVN r28911
2015-05-22 11:19:07 +00:00
Jordan Rose
4875a1279d [Driver] Stop pretending that incremental builds work without build records.
They mostly did (r28750 was incorrect about this) but we should be testing
real configurations. Now that the tests have been updated, remove this.

(Eventually we'll need to design incremental builds without an output file
map, so that they work with simpler build systems like Ninja.)

Swift SVN r28777
2015-05-19 18:25:52 +00:00
Jordan Rose
4dacca912d [Driver] Don't full-rebuild when a new file is added.
Continue to full-rebuild when a file is removed, because we don't know what
was depending on it.

Swift SVN r28776
2015-05-19 18:25:51 +00:00
Jordan Rose
31b309906e [Driver] Always write a build record, even if there's only one input.
Don't just exec() a subprocess if there's more work to do when the build
finishes.

Swift SVN r28775
2015-05-19 18:25:49 +00:00
Dmitri Hrybenko
ea17483633 Add CMake options and #ifs to hide tvOS
Swift SVN r28752
2015-05-19 05:15:52 +00:00
Jordan Rose
b5b787b909 [Driver] Reordering inputs should not force a rebuild.
For that matter, adding and removing inputs should not force a rebuild
either. Those need to be taken care of by more specific cases.

Swift SVN r28751
2015-05-19 05:08:11 +00:00
Erik Eckstein
50423166aa Driver: fix a few things to get -embed-bitcode working with multi-threaded compilation.
Swift SVN r28517
2015-05-13 17:52:57 +00:00
Manman Ren
ac15eedafb [Bitcode Driver] we allow -parse-stdlib in BackendJobAction.
Testing case will be checked in soon.

rdar://20796819


Swift SVN r28146
2015-05-05 02:36:54 +00:00
Manman Ren
249239e14d [Bitcode Driver] make sure -embed-bitcode works with -force-single-frontend-invocation.
With both force-single-frontend-invocation and embed-bitcode, we create
CompileJobAction and BackendJobAction, similar to how we handle embed-bitcode
with StandarCompile.

This commit should only affect Bitcode mode.

rdar://20796819


Swift SVN r28129
2015-05-04 19:40:54 +00:00
David Farler
91c64fdbb1 Stop re-exporting the Objective-C library
and link it properly. This is needed to embed LLVM bitcode sections
in the standard library and overlays. The linker doesn't support
embedded bitcode and reexport flags (among others).

rdar://problem/20750099

Swift SVN r28052
2015-05-01 22:24:14 +00:00
Jordan Rose
b33994fabd [Driver] Bump required versions of the SDKs.
rdar://problem/20408977

Swift SVN r28043
2015-05-01 18:16:13 +00:00
Manman Ren
142f41ffb2 [Bitcode Driver] implement whitelist of compiler options for Swift.
Only white-listed options are allowed to be embedded.

This commit only affects embed_bitcode option.

rdar://20040420


Swift SVN r28004
2015-04-30 23:11:00 +00:00
Dmitri Hrybenko
c53cbc63e7 stdlib: when linking arclite, link in CoreFoundation
Arclite now depends on CoreFoundation.

rdar://problem/20735508

Swift SVN r27884
2015-04-28 22:09:59 +00:00
Manman Ren
7ae5ba82df [Bitcode Driver] make sure -embed-bitcode works with -emit-module.
With both emit-module and embed-bitcode, MergeModule will get the swiftmodule
inputs from CompileJobAction instead of BackendJobAction.

This commit should only affect Bitcode mode since it only touches how we handle
BackendJobAction which is used for Bitcode mode.

rdar://20678489


Swift SVN r27878
2015-04-28 18:43:32 +00:00
Doug Gregor
2c909b4d36 Remove Objective-C selector splitting options.
We're not going this way.

Swift SVN r27717
2015-04-25 03:59:00 +00:00
Erik Eckstein
e9d761e15b Driver: fix a crash with -wmo, -num-threads and -parseable-output.
rdar://problem/20652017



Swift SVN r27633
2015-04-23 10:23:16 +00:00
Nadav Rotem
26c62643de Silence a warning that shows up in Release builds.
Swift SVN r27333
2015-04-15 21:38:20 +00:00
Argyrios Kyrtzidis
3fd55cf69f [driver] Factor out some common code, NFC.
Swift SVN r27221
2015-04-10 23:00:31 +00:00
Argyrios Kyrtzidis
f97926f72e [driver] If '-update-code' is enabled, use 'swift-update' for the module merging action as well.
Swift SVN r27211
2015-04-10 18:26:55 +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
6ee8f9b9b7 [driver] Add option "-fixit-code" which delegates to 'swift-fixit'.
Swift SVN r27142
2015-04-08 22:20:34 +00:00
Argyrios Kyrtzidis
48abdd0881 [driver] Add some missing cases.
Swift SVN r27141
2015-04-08 22:14:00 +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
Jordan Rose
2c93f561f3 [Driver] Don't reuse a possibly-invalidated iterator.
No test case; this is apparently hitting Enrico but not reproducing in
any obvious way for me. Nevertheless, it /could/ be an issue, so let's be
conservative.

rdar://problem/20402875

Swift SVN r26882
2015-04-02 19:04:28 +00:00
Graham Batty
5e223da24e Verify blocking job count doesn't increase.
This is instead of verifying that it's 0 after running a round.
The previous way would cause it to assert if it the blocking task
was at a higher level of the stack than the current level, and
thus in a different TaskQueue. This way we just verify that
no new tasks are left over.

Swift SVN r26501
2015-03-24 21:55:42 +00:00
Jordan Rose
a0c64d7533 Teach getEffectiveAccess() to respect -enable-testing.
SIL seems to be doing the right thing here already, which is great!

Part of rdar://problem/17732115. We'll be able to really see this working
with the next change: allowing references to testable things when using
"@testable import".

Swift SVN r26473
2015-03-24 02:17:01 +00:00
Arnold Schwaighofer
6d5706bb76 Add a now missing include file
Yay for upstream header cleanup

Swift SVN r26444
2015-03-23 20:32:36 +00:00
Arnold Schwaighofer
680b1ded21 Add a now missing include file
Yay for upstream header cleanup

Swift SVN r26443
2015-03-23 20:32:36 +00:00
David Farler
544ef4002d Merge tvOS and watchOS Support
- Add frontend and standard library build support for tvOS.
- Add frontend support for watchOS.

watchOS standard library builds are still disabled during SDK bring-up.

To build for TVOS, specify --tvos to build-script.
To build for watchOS, specify --watchos to build-script (not yet supported).

This patch does not include turning on full tests for TVOS or watchOS, and
will be included in a follow-up patch.

Swift SVN r26278
2015-03-18 21:35:07 +00:00
Erik Eckstein
f3ff3db85f Driver: small corrections according to Jordan's feedback
Swift SVN r26267
2015-03-18 17:43:47 +00:00
Erik Eckstein
5537cf84ca Driver: Support -num-threads <n> option.
Together with -wmo it enables multi-threaded compilation.
I didn't want to reuse the -j option for this, because -num-threads (even if n == 1) does change the generated code.
For details see commit message of r25930.



Swift SVN r26258
2015-03-18 10:05:11 +00:00
Erik Eckstein
cedc6c5671 Driver: simplify handling of temporary files.
Should be NFC.



Swift SVN r26228
2015-03-17 17:06:25 +00:00
Luqman Aden
0c6464aec7 [driver] Add -emit-sibgen option.
Swift SVN r25936
2015-03-10 18:31:08 +00:00
Luqman Aden
34b74cfa1c [driver] Add -emit-sib primary action.
Swift SVN r25783
2015-03-05 19:15:07 +00:00