Commit Graph

456 Commits

Author SHA1 Message Date
Graydon Hoare
d5a9f44e4a [BatchMode] <rdar://41271283> Limit memory pressure on large modules. 2018-07-30 17:26:31 -07:00
swift-ci
f3dea5d0b0 Merge remote-tracking branch 'origin/master' into master-next 2018-07-30 11:29:05 -07:00
Keith Smiley
7f3804683b Add warning for bitcode marker without object (#18304)
Previously if you passed `-embed-bitcode-marker` to a command that
wasn't producing an object file, it would silently be ignored. This
change puts it inline with `-embed-bitcode` in this same case, which
generates a warning.
2018-07-30 11:24:09 -07:00
swift-ci
9711455ad8 Merge remote-tracking branch 'origin/master' into master-next 2018-07-26 14:49:10 -07:00
Jordan Rose
97b152d71e Consistently get extensions from swift/Basic/FileTypes.h (part 2)
Remove the last few literal extension strings from Strings.h in favor
of the file_types APIs, and use those APIs in a few more places.
2018-07-25 22:23:01 -07:00
Jordan Rose
6e5aefc0b5 Rename file_types::getTypeTempSuffix to getExtension
Let's be honest: this isn't just for temporary files. Also, it's not
really a "suffix" if it doesn't include the leading dot.

No functionality change.
2018-07-25 21:49:01 -07:00
swift-ci
36ead37964 Merge remote-tracking branch 'origin/master' into master-next 2018-07-24 17:49:02 -07:00
Jordan Rose
de30596ccd Merge pull request #17665 from allevato/debug-prefix-map-wip
Implement -debug-prefix-map flag.
2018-07-24 17:34:42 -07:00
swift-ci
d7c334c1e7 Merge remote-tracking branch 'origin/master' into master-next 2018-07-24 12:49:50 -07:00
Jordan Rose
a39afdc778 Merge pull request #18090 from jrose-apple/emit-interface-path
[Frontend] Add a new -emit-interface-path option
2018-07-24 12:49:27 -07:00
Jordan Rose
b9ae66d768 [Frontend] Add a new -emit-interface-path option
...but don't hook it up to anything yet.

This is the very very start of the module stability / textual
interfaces feature described at

  https://forums.swift.org/t/plan-for-module-stability/14551/

For now I've just made it a frontend option (not a driver option),
which is good enough for testing.
2018-07-20 16:40:51 -07:00
swift-ci
817e5e80e7 Merge remote-tracking branch 'origin/master' into master-next 2018-07-19 16:49:18 -07:00
Huon Wilson
103170bcbb Merge pull request #17688 from huonw/merging-tbd
Allow TBD files to be generated in non-wmo mode
2018-07-20 09:44:50 +10:00
Huon Wilson
2e3e6558b7 [Driver] Pass -emit-tbd through to -frontend -merge-modules, to get TBD files without -wmo.
Fixes rdar://problem/33735706
2018-07-20 08:12:22 +10:00
Huon Wilson
9dab667544 [Driver] Make the TBD file behave more like a normal auxiliary output. 2018-07-20 08:12:22 +10:00
swift-ci
e6011356fb Merge remote-tracking branch 'origin/master' into master-next 2018-07-13 14:39:37 -07:00
Robert Widmann
2282065197 Rename "Name Binding" action to "Resolve Imports" 2018-07-13 11:00:48 -07:00
Robert Widmann
cb1e9dd821 Introduce Name Binding as a Frontend Action
Introduces the -name-bind frontend action that is intended as an intermediary between the parse-only actions and a full typechecking pass.  In this phase, module imports will be validated and resolved, making it possible to emit full make-style dependencies files among other things.

Note that all information available to a parse-only pass is available to name binding, but because it does not continue-on to typecheck input files, full semantic information is not.
2018-07-13 10:56:03 -07:00
swift-ci
3406cebee3 Merge remote-tracking branch 'origin/master' into master-next 2018-07-03 16:09:00 -07:00
Huon Wilson
0113ed01ce Merge pull request #17415 from huonw/remove-emit-public-type-metadata-accessors-flag
[Driver] Completely remove -emit-public-type-metadata-accessors.
2018-07-04 09:04:23 +10:00
Tony Allevato
78edd30ddf Implement -debug-prefix-map flag.
This flag is based on Clang's -fdebug-prefix-map, which lets the user remap absolute paths in debug info. This is necessary for reproducible builds and allows debugging to work on a different machine than the one that built the code when paths to the source may be different.
2018-07-01 18:22:15 -07:00
swift-ci
fc21b40f24 Merge remote-tracking branch 'origin/master' into master-next 2018-06-27 14:09:22 -07:00
David Ungar
c1c9cb8f5d Merge pull request #16762 from davidungar/buildCompilation-refactor-1
NFC: Some small refactoring in `buildCompilation`
2018-06-27 13:57:34 -07:00
David Ungar
62d8501f03 Remove unneeded comment. 2018-06-27 13:05:26 -07:00
David Ungar
3045a25e9c Fix wrong comment. 2018-06-22 13:47:30 -07:00
David Ungar
77ec1e1c36 Clarify lifetime of result of computeWorkingDirectory. 2018-06-22 13:41:53 -07:00
Huon Wilson
db476ba5cd [Driver] Completely remove -emit-public-type-metadata-accessors.
This was retained to help ease migration between versions of the 4.2 compiler
between when the flag was originally introduced and the full fix landed. It's
not longer needed and there's no reason to retain it in the full release.

Fixes rdar://problem/40502379.
2018-06-22 11:31:27 +10:00
swift-ci
9092ac1caf Merge remote-tracking branch 'origin/master' into master-next 2018-06-20 10:10:28 -07:00
Ellis Hoag
c93a5a5776 Add -debug-info-format=[dwarf|codeview] option (#16888) 2018-06-20 09:52:57 -07:00
David Ungar
272c5d87ed Small improvements from Jordan’s review. 2018-06-15 11:09:19 -07:00
David Ungar
9fd23bbeec Minor refactor of buildCompilation
1. Compute things closer to use, and use const, and
2. Factor out some computations into subroutines in order to shorten buildCompilation.
2018-06-15 10:51:05 -07:00
Bob Wilson
5df3d1f100 Merge remote-tracking branch 'origin/master' into master-next 2018-06-14 20:51:48 -07:00
Graydon Hoare
8be2c53b24 [BatchMode] Add -driver-batch-count to allow overriding batch count inferred by -j 2018-06-14 11:51:31 -07:00
Bob Wilson
c3e02955bb [master-next] Adjust for VersionTuple moving from clang to llvm.
LLVM r334399 (and related Clang changes) moved clang::VersionTuple to
llvm::VersionTuple. Update Swift to match.

Patch by Jason Molenda.
rdar://problem/41025046
2018-06-12 16:44:11 -07:00
David Ungar
46339a79d8 Remove “using batch mode” remark. 2018-06-05 11:19:22 -07:00
Mishal Shah
3f8ce7d2f9 Update master to build with Xcode 10 beta 1, OS X 10.14, iOS 12, tvOS 12, and watchOS 5 SDKs. 2018-06-04 23:14:19 -07:00
Robert Widmann
da13d89c24 Move DummyQueue logic into buildTaskQueue 2018-05-29 21:58:27 -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
Benjamin Herzog
07d4303b40 Merge pull request #16444 from BenchR267/feature/add-metrics-to-driver-output
[Driver] Added process information to emitted task messages
2018-05-25 16:49:09 -07:00
Benjamin Herzog
ac10fb3462 [Driver] Added process information to emitted messages
When providing the -parseable-output flag to the swift compiler, it will provide json formatted messages about tasks that run.
I added some optional usage information in form of user time, system time and maxrss to the output. This can be used by other tools using the compiler to get some insights about time and memory usage.
Since the output does not longer match processes run (in batch mode), I also added a real_pid field so the client could reason about jobs that belong together if needed.

rdar://39798231
2018-05-25 13:12:57 -07:00
Huon Wilson
60ae475ca0 [IRGen] Make -emit-public-type-metadata-accessors a no-op.
This work-around is no longer needed now that the full fix landed in
https://github.com/apple/swift/pull/16615. The argument is left with a warning
to help with migration between compilers with the work-around and compilers with
the full fix (see also rdar://problem/40502379).

Fixes rdar://problem/40476573.
2018-05-24 09:37:35 +10:00
David Ungar
83c0d77c1f Batch mode driver remark 2018-05-13 12:58:31 -07:00
Jordan Rose
606ee29b74 [Driver] -enable-batch-mode implies -continue-building-after-errors (#16521)
The logic in 46b8ad3 to avoid putting certain diagnostics into
serialized diagnostic files only makes sense if

1. every diagnostic emitted in file A.swift while processing a
   different file B.swift would be emitted if we processed A.swift on
   its own

2. we actually do process A.swift on its own in the same build,
   or have previously done an incremental build and produced the same
   diagnostic

But the latter isn't actually guaranteed: if one batch job exits with
a failure status, the driver will exit as well, assuming there's no
point in continuing. Fortunately, we do have a flag that overrides
this behavior, -continue-building-after-errors.

(As noted in the patch, -continue-building-after-errors isn't *exactly*
what we want. But it's conservatively correct.)
2018-05-10 21:44:12 -07:00
Jordan Rose
a214f0b39b Fix call to llvm::opt::OptionTable::PrintHelp (#16269)
The signature here changed, but the old arguments implicitly converted
to the parameter types for the wrong overload, so we didn't notice.
Add a simple test that would have at least caught this for the driver.
2018-05-02 16:54:10 -07:00
Huon Wilson
d4f49a1252 [IDE] std::function -> llvm::function_ref for some non-escaping params. 2018-05-01 08:29:06 +10:00
David Ungar
2b89d1cf1b Instead of crashing for bad output-file-map path, exit. Also print the path in the diagnostic. 2018-04-24 11:53:52 -07:00
Jordan Rose
e1b70cdb7b Merge pull request #15813 from jrose-apple/decremental
[Driver] Disallow -autolink-force-load with -incremental
2018-04-19 14:20:41 -07:00
Thomas Roughton
5bb6ac2e12 Implement a Windows toolchain. 2018-04-18 15:26:05 +12:00
Jordan Rose
c3d8fc0254 [Driver] Break up validateArgs() into several helper functions
No functionality change.
2018-04-16 20:01:25 -07:00
Argyrios Kyrtzidis
b6a8725ba5 Remove unnecessary newline whitespace 2018-04-12 19:45:51 -07:00