Commit Graph

684 Commits

Author SHA1 Message Date
David Ungar
5b0c4b2486 Fix memory violation when build record is bad. 2019-11-22 14:56:31 -08:00
David Ungar
62ae2bfd2f Merge pull request #28164 from davidungar/WIP-custom-diff
[Incremental compilation] Source-range-based dependencies
2019-11-21 23:47:52 -08:00
David Ungar
ae64f471cd Reporting refactoring 2019-11-19 16:42:21 -08:00
David Ungar
ee17f61179 factor out comparator and report supp jobs 2019-11-19 12:22:04 -08:00
David Ungar
38a6559aa9 Take path arg for comparo 2019-11-18 20:23:10 -08:00
David Ungar
3433bf8cef comparision WIP 2019-11-16 21:39:19 -08:00
David Ungar
6e453f0f6b Fix how batching is disabled and check batching in test 2019-11-16 18:08:20 -08:00
David Ungar
6b8b954e98 Recompile all when removed. 2019-11-16 14:45:34 -08:00
David Ungar
72f4837417 WIP executable 2019-11-16 08:41:20 -08:00
swift_jenkins
b9f998ffa4 Merge remote-tracking branch 'origin/master' into master-next 2019-11-15 15:56:48 -08:00
David Ungar
0c72c1e375 fmt 2019-11-15 10:32:45 -08:00
David Ungar
6a0dcdb2f8 Add range outputs even if ranges are enabled but not used 2019-11-14 14:41:34 -08:00
Doug Gregor
ec70b62d5e Merge pull request #28107 from allevato/emit-pcm
Add driver flag to precompile Swift-compatible explicit Clang modules.
2019-11-14 10:25:53 -08:00
David Ungar
6bc631725d Only output range-dep outputs when it's enabled. 2019-11-13 23:33:33 -08:00
David Ungar
742c3985bd Source-range-based dependencies
Frontend outputs source-as-compiled, and source-ranges file with function body ranges and ranges that were unparsed in secondaries.
Driver computes diffs for each source file. If diffs are in function bodies, only recompiles that one file. Else if diffs are in what another file did not parse, then the other file need not be rebuilt.
2019-11-12 20:41:02 -08:00
Dan Liew
63e72909b5 [Sanitizers] Add Driver/Frontend option to enable sanitizer instrumentation that supports error recovery.
The new option `-sanitize-recover=` takes a list of sanitizers that
recovery instrumentation should be enabled for. Currently we only
support it for Address Sanitizer.

If the option is not specified then the generated instrumentation does
not allow error recovery.

This option mirrors the `-fsanitize-recover=` option of Clang.

We don't enable recoverable instrumentation by default because it may
lead to code size blow up (control flow has to be resumable).

The motivation behind this change is that today, setting
`ASAN_OPTIONS=halt_on_error=0` at runtime doesn't always work. If you
compile without the `-sanitize-recover=address` option (equivalent to
the current behavior of the swift compiler) then the generated
instrumentation doesn't allow for error recovery. What this means is
that if you set `ASAN_OPTIONS=halt_on_error=0` at runtime and if an ASan
issue is caught via instrumentation then the process will always halt
regardless of how `halt_on_error` is set. However, if ASan catches an
issue via one of its interceptors (e.g. memcpy) then `the halt_on_error`
runtime option is respected.

With `-sanitize-recover=address` the generated instrumentation allows
for error recovery which means that the `halt_on_error` runtime option
is also respected when the ASan issue is caught by instrumentation.

ASan's default for `halt_on_error` is true which means this issue only
effects people who choose to not use the default behavior.

rdar://problem/56346688
2019-11-12 11:33:58 -08:00
Tony Allevato
3c45041b17 Add driver modes to emit and dump Clang precompiled modules. 2019-11-11 15:00:51 -08:00
swift-ci
84f192ddce Merge remote-tracking branch 'origin/master' into master-next 2019-10-10 13:50:08 -07:00
Xi Ge
014f863546 SerializeLoc: address more comments from Jordan. NFC 2019-10-09 15:29:52 -07:00
Xi Ge
dec878360f Driver: rename Name.swiftmodule/Private directory to Name.swiftmodule/Project
This directory should be excluded during installation since the content is only
used for local development. swiftsourceinfo file is currently emitted to this directory.
2019-10-09 15:29:52 -07:00
swift-ci
76e7b1d2eb Merge remote-tracking branch 'origin/master' into master-next 2019-09-24 20:50:21 -07:00
Xi Ge
70137251c6 Address Jordan's code review comments 2019-09-24 13:52:17 -07:00
Xi Ge
ec9cf33af0 Driver: expose -emit-module-source-info-path as a driver option 2019-09-24 13:52:17 -07:00
Xi Ge
3103b5cec1 Frontend: set up output file .swiftsourceinfo
This patch will focus on teaching driver and frontend to emit this file.
The actual content and de-serialization parts will come later.

More details: https://forums.swift.org/t/proposal-emitting-source-information-file-during-compilation/28794
2019-09-24 13:52:17 -07:00
swift-ci
0c440ff5ef Merge remote-tracking branch 'origin/master' into master-next 2019-09-13 20:49:32 -07:00
Harlan Haskins
c82c9b8210 [ModuleInterfaces] Remove references to 'parseable' interfaces everywhere
Now that we've settled on Module Interface as the name, let's remove the
vestiges of "Parseable Interfaces"
2019-09-13 14:55:48 -07:00
Jonas Devlieghere
b4d268e9e1 Migrate llvm::make_unique to std::make_unique
Now that we've moved to C++14, we no longer need the llvm::make_unique
implementation from STLExtras.h. This patch is a mechanical replacement
of (hopefully) all the llvm::make_unique instances in the swift repo.
2019-08-15 11:32:39 -07:00
Saleem Abdulrasool
1d84cb60a8 Driver: loosen restrictions for -force-autolink-symbol
On targets which support COMDAT (PE/COFF, ELF), use that to relax the
constraints on the emission of `-force-autolink-symbol` so that it is
possible to use that with `-incremental`.
2019-08-12 10:54:07 -07:00
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
Luciano Almeida
c69d754758 Removing trailing. 2019-07-18 23:25:46 -03:00
Luciano Almeida
cfd882cfb6 Place back validate header. 2019-07-18 23:24:24 -03:00
Luciano Almeida
ba597a02b9 Refactoring validate Deployment targets to darwing toolchain validation 2019-07-18 23:20:58 -03:00
Jordan Rose
419e97d7db Merge pull request #26136 from LucianoPAlmeida/patch-sr11015
[Driver] DarwinToolChain should explicitly reject -static-stdlib
2019-07-16 08:55:25 -07:00
Luciano Almeida
53917874dd Adding todo. 2019-07-15 22:35:51 -03:00
Luciano Almeida
c95f28c9dc Moving -static-stdlib validation to Darwin toolchain. 2019-07-15 21:02:39 -03:00
Luciano Almeida
1983e15ef2 Validate -static-stdlib on Driver::validate args and removing handles on Darwing toolchain 2019-07-14 22:22:13 -03:00
Harlan Haskins
21bd24a150 Revert "[Driver] Load the standard library before starting parallel frontend invocations"
This failed the source compat suite, it seems we need more driver
changes for this.
2019-07-12 21:38:23 -07:00
Harlan Haskins
7022110a05 [Driver] Load the standard library before starting parallel frontend invocations
Add a new action, LoadModuleJobAction, that the driver can use to schedule a
load of a given module before we fan out and invoke the frontend multiple
times. This gives the module interface loader a chance to compile it from a
module interface before we start with parallel invocations, avoiding starting
potentially dozens of redundant compiles of a large module. Start by using this
on the standard library.

Quick fix for rdar://52839445
2019-07-12 14:53:25 -07:00
Aasim Kandrikar
6328322eea [Driver] Add warning when using -F and path ends in ".framework"
This commit also includes cases where user uses -Fsystem and when path
ends in ".framework/"

(cherry picked from commit a5d9750a9d25441517f3bec97488f57d1bb4b03f)
2019-07-01 22:14:14 +05:30
Thomas Roughton
e5ea42d774 Driver: renamic LinkJob to DynamicLinkJob and ArchiveJob to StaticLinkJob
# Conflicts:
#	lib/Driver/DarwinToolChains.cpp
2019-06-17 12:49:17 +12:00
Thomas Roughton
b34a1cbbc6 Driver: add -static flag for generating static archives 2019-06-17 12:49:03 +12:00
Jordan Rose
6b87e97ca1 [Driver] Bump the required Apple SDK versions to the 2019 OSs (#25469)
rdar://problem/50779459
2019-06-14 11:48:50 -07:00
Kelly Hutchison
78802be3e0 SR-20 Update swift --help to explain multitool support ("swift build", etc.) 2019-06-07 17:51:14 -07:00
Saleem Abdulrasool
7514adf66a Driver: introduce new -libc option for Windows
On Windows, there are multiple variants of the C runtime that must be
explicitly specified and consistently used from the runtime to the
application.  The new `-libc` option allows us to control the linking
phase by correctly embedding the requested library to be linked.  It is
made into a required parameter on Windows and will add in the
appropriate flags for the imported C headers as well.  This ensures that
the C library is not incorrectly linked.
2019-05-16 21:01:47 -07:00
Harlan Haskins
ea7e7e918f [ModuleInterface] Remove 'parseable interface' from diagnostics
Part of rdar://49359734
2019-04-11 18:05:09 -07:00
Harlan Haskins
e5456984f7 [ModuleInterfaces] Remove 'parseable' from command-line flags
Leave the old flag in as an alias to the new flag, for transition
purposes. Also go ahead and remove the long-deprecated and unused
`emit-interface-path`.

Part of rdar://49359734
2019-04-11 18:05:09 -07:00
Saleem Abdulrasool
1cb57b6fc2 Driver: perform the ModuleWrap job for COFF
The ModuleWrap job is responsible for wrapping the AST into the swift
module.  It was only enabled for ELF objects, but COFF needs this
operation to be performed as well.  Enable this for the COFF targets as
well.  This is needed to fix the DebugInfo AST Section verification.
2019-03-22 12:45:50 -07:00
Jason Mittertreiner
9eeabc9875 Allow Arguments in -driver-use-frontend-path (#22596)
Windows doesn't know what a shebang is, so it's unable to run tests that
use -driver-use-frontend-path with a script. This allows the script
interpreter to be run as the executable with the script as its first
argument. e.g. --driver-use-frontend-path "python;my-script.py"
2019-02-20 11:20:21 -08:00
David Ungar
76629f1307 Format 2019-01-30 17:21:44 -08:00
David Ungar
b82694c307 Format 2019-01-30 17:19:56 -08:00