Commit Graph

1784 Commits

Author SHA1 Message Date
Huon Wilson
151bbf95a3 [Driver] Obey -emit-module-path in -wmo that only does -emit-module. 2017-08-23 11:18:52 -07:00
Jordan Rose
0a4cf89a33 Merge pull request #11482 from jrose-apple/take-action
[Driver] Clean up ownership of Action objects
2017-08-16 09:40:17 -07:00
Jordan Rose
47872d9190 [Driver] Transfer all ownership of Actions to the Compilation.
Previously, Actions were responsible for freeing their inputs...
except for the ones that weren't. Or the ones that were supposed
to, but then they needed to share an input, so they couldn't anymore.
If this sounds ridiculous, you're right; now Actions are just
immediately allocated and owned by the Compilation.

The graph structure of the actions is still useful for some things; in
particular, "top-level" actions get to put their outputs somewhere
permanent rather than TMPDIR. But I expect these things to get cleaned
up in the future too.
2017-08-11 21:09:34 -07:00
Jordan Rose
64df9b1edc [Driver] Actually free Actions instead of just leaking them.
Fixes rdar://problem/32518867, though in a fairly messy way. Next
commit will clean this up again.
2017-08-11 21:09:34 -07:00
Jordan Rose
4934c57491 [Driver] Remove ActionList typedef, improve const correctness.
No functionality change.
2017-08-11 21:09:34 -07:00
swift-ci
326756d7fa Merge pull request #11379 from cheshire/whitespace_cleanup 2017-08-07 19:01:45 -07:00
George Karpenkov
efe143c2f4 Adding support for -sanitize=fuzzer flag (#11381)
Similarly to Clang, the flag enables coverage instrumentation, and links
`libLLVMFuzzer.a` to the produced binary.
Additionally, this change affects the driver logic, and enables the
concurrent usage of multiple sanitizers.
2017-08-07 18:16:51 -07:00
George Karpenkov
ddb7fcf81d [NFC] Clean up whitespace (no tabs!) and indentation. 2017-08-07 17:11:32 -07:00
swift-ci
ad51a5851d Merge remote-tracking branch 'origin/master' into master-next 2017-08-02 09:08:58 -07:00
Jordan Rose
d495e1c075 Merge pull request #11272 from gmilos/sr-5405-position-independent-executables-on-linux
Build position independent Linux binaries.
2017-08-02 08:49:57 -07:00
swift-ci
d549147e43 Merge remote-tracking branch 'origin/master' into master-next 2017-07-31 18:48:50 -07:00
Huon Wilson
374826c960 Merge pull request #11219 from huonw/tbd-is-not-a-main-product
[Frontend] Emit tbd as an extra output, not a frontend action.
2017-07-31 18:46:02 -07:00
Grzegorz Miłoś
78938d8f86 Add -pie flag to clang++ linker invocation. 2017-07-31 19:21:32 +01:00
Huon Wilson
dfa8501e59 [Frontend] Emit tbd as an extra output, not a frontend action.
This means it can be emitted during an -emit-module frontend job, which is the
most common place it will be used, so reusing work like this is important for
performance.

For now, this has to happen as part of a single frontend invocation, i.e. -wmo
or -force-single-frontend-invocation.
2017-07-31 11:05:29 -07:00
Chris Bieneman
9c35042ae6 Merge remote-tracking branch 'origin/master' into master-next 2017-07-28 09:51:36 -07:00
John McCall
efaf5e66ba Now that the Clang importer honors and expects -O, make sure we
pass it to the PCH-generation job.

This depends on the merge-modules patch because we don't want merging
modules when optimization is enabled to re-run the optimizer.
(Thanks, Jordan!)

rdar://33541306
2017-07-27 10:21:02 -04:00
John McCall
dda3a3827c [SR-3063] Suppress SIL transforms when merging modules. 2017-07-27 10:21:02 -04:00
swift-ci
f6a4fb6b5c Merge remote-tracking branch 'origin/master' into master-next 2017-07-21 14:28:51 -07:00
Harlan
37f88e7372 Add frontend flag to serialize Syntax tree (#11095)
* Add frontend flag to serialize Syntax tree

* Rename dump-serialized-syntax-tree to emit-syntax
2017-07-21 14:23:50 -07:00
Bob Wilson
5f02db4d3e Merge remote-tracking branch 'origin/master' into master-next 2017-07-20 21:59:23 -07:00
Pavel Yaskevich
4f8872598b [ConstraintSolver] NFC: Add option to control early termination of shrinking phase
Currently we have a number of unsolved disjunctions hard-coded to 5,
which breaks some existing code by terminating shrinking too early.
This patch makes it a command-line option so users have control over
what that threshold can be.

Resolves: rdar://problem/33433595
2017-07-20 12:44:48 -07:00
swift-ci
f79b640686 Merge remote-tracking branch 'origin/master' into master-next 2017-07-19 13:09:13 -07:00
Jordan Rose
e994f61e58 Merge pull request #9958 from spevans/pr_static_libs
SR-648: Allow swiftpm to statically link binaries on Linux
2017-07-19 12:52:54 -07:00
swift-ci
e98182387b Merge remote-tracking branch 'origin/master' into master-next 2017-07-11 12:23:35 -07:00
Doug Gregor
f03685b6d0 Introduce a command-line option to limit the # of typo corrections.
Typo correction can be particularly expensive, so introduce a
command-line flag to limit the number of typo corrections we will
perform per type-checker instance. Default this limit to 10.

Addresses rdar://problem/28469270 to some extent.
2017-07-10 11:40:35 -07:00
swift-ci
ad02e41239 Merge remote-tracking branch 'origin/master' into master-next 2017-07-02 13:06:41 -07:00
Carl Brown
dacbb8750f Linux Address and Thread Sanitizer Support (#6446) 2017-07-02 12:42:01 -07:00
swift-ci
609f493fcd Merge remote-tracking branch 'origin/master' into master-next 2017-06-30 16:08:53 -07:00
Graydon Hoare
411b13309a Merge pull request #10733 from graydon/rdar-32984579-emit-bc-depends-on-bridging-pch-as-well
[Bridging PCH] Move dependency-on-bridging-PCH to -emit-bc JobAction itself
2017-06-30 16:06:16 -07:00
Graydon Hoare
d4ff4537b9 [Bridging PCH] Move dependency-on-bridging-PCH to -emit-bc JobAction itself. 2017-06-30 15:13:41 -07:00
Arnold Schwaighofer
a72b685927 Merge remote-tracking branch 'origin/master' into master-next 2017-06-30 12:21:33 -07:00
David Farler
645aaad551 [index/build] Upstream indexing while building changes
This patch upstreams previously AppleInternal changes for
indexing while building.
2017-06-29 16:20:06 -07:00
Simon Evans
3ac5e12c67 [Linux] Reorder the -Xlinker and -l arguments
- Move the -Xlinker and -l options to just before swift_end.o

- Add testcase to check linker option ordering.
2017-06-29 13:10:04 +01:00
Simon Evans
03b067b949 [Linux] Reorder arguments for autolink files from swift-autolink-extract
- Reordering the auto link files when linking in static libraries
  and object files is required because the ordering of arguments
  is important, and the dependant libraries need to come after the
  objects/libs that require them. This is not a problem for
  libswiftCore.a but can be an issue with libs that sit on top of
  it, e.g. libFoundation.a

- Dont add an -rpath to the Swift dynamic libraries if using
  -static-stdlib
2017-06-29 13:08:15 +01:00
Greg Parker
7b009eccde Merge remote-tracking branch 'origin/master' into master-next 2017-06-28 15:25:17 -07:00
Michael Gottesman
3617134b69 [upstream-update] llvm::opt::filtered_{begin,end} => llvm::opt::filtered. 2017-06-22 21:17:01 -07:00
Jordan Rose
ad3c773446 Merge pull request #10381 from keith/ks/no-linking-rpath
Don't add rpath to swift with statically linking.
2017-06-20 09:01:18 -07:00
Keith Smiley
607312663b Don't add rpath to swift with statically linking
This updates the rpath linking logic to only add the rpath that points
to the swift dylibs in the case that the libraries are not statically
linked into the binary.
2017-06-19 13:36:47 -07:00
George Karpenkov
071f23eb63 Code review comments. 2017-06-16 13:26:46 -07:00
George Karpenkov
479aeca88c Addressing code review comments. 2017-06-16 13:26:46 -07:00
George Karpenkov
9637bd2c36 Change driver logic for sanitizers support.
With this patch different sanitizers (tsan/asan) will be enabled or
disabled on the driver level on a particular OS depending on whether
the required library is present.

The current patch only supports Darwin architectures, but Linux support
should not be hard to add.
2017-06-16 13:26:46 -07:00
swift-ci
e057a05fbe Merge remote-tracking branch 'origin/master' into master-next 2017-06-14 16:28:39 -07:00
Mishal Shah
c5ff1f2cac Update master to build with Xcode 9 beta 1, OS X 10.13, iOS 11, tvOS 11, and watchOS 4 SDKs. 2017-06-14 16:20:35 -07:00
swift-ci
6a0b7391f8 Merge remote-tracking branch 'origin/master' into master-next 2017-06-14 14:08:42 -07:00
Erik Verbruggen
97b9886a70 Do stricter checking of -D command-line arguments
Check if the condition "name" is a proper identifier, and generate an
error when assigning specific values in -D conditions.

Fixes SR-2404.
2017-06-13 23:19:08 -07:00
swift-ci
6afda14ba8 Merge remote-tracking branch 'origin/master' into master-next 2017-06-07 15:48:34 -07:00
Argyrios Kyrtzidis
ffd9e952d8 Merge pull request #10158 from akyrtzi/persistent-pch-diag-file
[driver] For the persistent bridging PCH job action, make sure to pass a serialized diagnostics path in the PCH output directory
2017-06-07 15:34:24 -07:00
Argyrios Kyrtzidis
563a37f053 [driver] For the persistent bridging PCH job action, make sure to pass a serialized diagnostics path in the PCH output directory
Previously it was passing a relative filename and the invocation was creating .dia files in the source directory.
If a filename is not determined for inside the PCH output directory, it fallsback to creating a temporary for the diagnostics file,
similarly to the non-persistent bridging PCH job.

rdar://32594291
2017-06-07 15:08:05 -07:00
swift-ci
54af467191 Merge remote-tracking branch 'origin/master' into master-next 2017-06-03 00:28:33 -07:00
Graydon Hoare
7fc8bd270b [Stats] Tidy up stray characters in filenames. 2017-06-02 23:42:38 -07:00