Commit Graph

1773 Commits

Author SHA1 Message Date
Mishal Shah
a8aec14bce [Apple Silicon] Adjust linking deployment target from 11.0 down to 10.16 on x86. 2020-07-02 18:31:09 -07:00
Mishal Shah
3c9e72f6e1 [Apple Silicon] [macCatalyst] Baseline arm64(e) macCatalyst at Swift 5.3/iOS 14.0. 2020-07-02 18:28:33 -07:00
Mishal Shah
134f202e01 [Apple Silicon] Baseline arm64 macOS at Swift 5.3 / macOS 10.16 2020-07-02 16:42:15 -07:00
swift_jenkins
0b243773f6 Merge remote-tracking branch 'origin/master' into master-next 2020-07-01 03:18:10 -07:00
David Zarzycki
9e85a396f6 Merge pull request #32630 from HassanElDesouky/LocaleFlagsRE
Reopen [Diag] Create frontend flags for localization
2020-07-01 05:58:50 -04:00
HassanElDesouky
063e92aa53 Create frontend flags for localization 2020-06-30 23:12:40 +02:00
swift_jenkins
22ae05a5f7 Merge remote-tracking branch 'origin/master' into master-next 2020-06-30 08:19:10 -07:00
David Zarzycki
621cecbe71 Revert "[Diag] Create frontend flags for localization and write tests (#32568)"
This reverts commit 621b3b4223.

The driver is double faulting on my Linux box (Fedora 32 / x86-64). It
crashes due to heap corruption, then hangs trying to introspect and
print the stack. There also appears to be an unrelated(?) uninitialized
memory error that valgrind detects (as opposed to malloc's own self
diagnostics).
2020-06-30 08:31:38 -04:00
swift_jenkins
f376272f21 Merge remote-tracking branch 'origin/master' into master-next 2020-06-29 23:38:11 -07:00
Hassan ElDesouky
621b3b4223 [Diag] Create frontend flags for localization and write tests (#32568)
* Create frontend flags for localization

* Remove assertion
2020-06-29 23:32:44 -07:00
swift_jenkins
a75e04e03a Merge remote-tracking branch 'origin/master' into master-next 2020-06-29 18:58:23 -07:00
Butta
e6fe8d47c2 Driver: update old doc comments from when clang++ was the linker driver 2020-06-24 18:38:03 +05:30
swift_jenkins
b960584a93 Merge remote-tracking branch 'origin/master' into master-next 2020-06-17 15:19:31 -07:00
Doug Gregor
ad9a7efaca [Driver] .tbd files are linker inputs 2020-06-17 10:27:49 -07:00
swift_jenkins
90dd9dbae8 Merge remote-tracking branch 'origin/master' into master-next 2020-06-16 14:18:53 -07:00
Keith Smiley
1b77448d37 Add path remapping with -coverage-prefix-map to coverage data
Previously the path to covered files in the __LLVM_COV / __llvm_covmap
section were absolute. This made remote builds with coverage information
difficult because all machines would have to have the same build root.
This change uses the values for `-coverage-prefix-map` to remap files in
the coverage info to relative paths. These paths work correctly with
llvm-cov when it is run from the same source directory as the
compilation, or from a different directory using the `-path-equivalence`
argument.

This is analogous to this change in clang https://reviews.llvm.org/D81122
2020-06-15 17:38:34 -07:00
David Zarzycki
b675ddb411 Add missing header 2020-06-11 06:10:42 -04:00
Slava Pestov
965c735a06 Merge pull request #32131 from slavapestov/binary-swiftdeps-format
New binary swiftdeps format
2020-06-11 03:58:35 -04:00
Nathan Hawes
f89e213bec Merge pull request #32281 from nathawes/handle-filelists-in-sourcekit-driver-args
[Driver/SourceKit] Handle filelist driver args in getSingleFrontendInvocationFromDriverArguments
2020-06-10 17:39:52 -07:00
Slava Pestov
d59a76c248 Dependencies: New binary format for fine-grained dependency graph 2020-06-10 15:40:55 -04:00
Nathan Hawes
50dc7d85dd [Driver/SourceKit] Handle filelist driver args in getSingleFrontendInvocationFromDriverArguments
getSingleFrontendInvocationFromDriverArguments is set up to never produce file
lists in the output frontend arguments, but since the driver accepts file lists
as input arguments, this should too.
2020-06-10 10:50:56 -07:00
Robert Widmann
3228a5903a [NFC] Rename Flags
-enable-experimental-private-intransitive-dependencies -> -enable-direct-intramodule-dependencies
-disable-experimental-private-intransitive-dependencies -> -disable-direct-intramodule-dependencies

While we're here, rename DependencyCollector::Mode's constants and clean
up the documentation.
2020-06-09 16:00:59 -07:00
Robert Widmann
fdf31c88a6 Add Flags to Enable or Disable EnableExperientalPrivateIntransitiveDependencies
Turn the existing flag into an on-off switch and migrate all the tests in preparation for it being on by default
2020-06-09 12:24:57 -07:00
Saleem Abdulrasool
71309a8fa9 Revert "[LTO] Support LLVM level link time optimization on Darwin, Linux and Windows" 2020-06-07 11:25:48 -07:00
Ben Langmuir
fadfb6c945 Merge pull request #31874 from benlangmuir/driver-tmp-sad
[driver/sourcekit] Avoid creating temporary output files in TMPDIR
2020-06-05 13:43:23 -07:00
Saleem Abdulrasool
d0131ba6be Merge pull request #31146 from kateinoigakukun/katei/enable-lang-agnostic-lto
[LTO] Support LLVM level link time optimization on Darwin, Linux and Windows
2020-06-05 11:38:09 -07:00
Arnold Schwaighofer
3f903b4891 Merge pull request #31986 from aschwaighofer/irgen_inherit_clangs_fp_elim
IRGen: Default to clang's frame pointer elimination settings
2020-06-03 07:38:24 -07:00
Anthony Latsis
267e32dcd8 Merge pull request #32118 from AnthonyLatsis/post-increment-cleanup
[NFC] Pre- increment and decrement where possible
2020-06-02 20:10:29 +03:00
Ben Langmuir
251dbb9b8c [driver] Improve handling of supplementary outputs in createCompilerInvocation
Mark the relevant options in Options.td rather than hard-coding the
list in code, and handle a few more options suggested during the review.
2020-06-01 14:00:39 -07:00
Anthony Latsis
9fd1aa5d59 [NFC] Pre- increment and decrement where possible 2020-06-01 15:39:29 +03:00
Varun Gandhi
fea589e470 [NFC] Remove redundant includes for llvm/ADT/DenseSet.h. 2020-05-31 13:07:45 -07:00
Yuta Saito
915c4a6997 [LTO] Support LLVM level link time optimization
This commit adds -lto flag for driver to enable LTO at LLVM level.
When -lto=llvm given, compiler emits LLVM bitcode file instead of object
file and perform thin LTO using libLTO.dylib plugin.
When -lto=llvm-full given, perform full LTO instead of thin LTO.
2020-05-31 08:12:52 +09:00
Arnold Schwaighofer
20f4ef93de IRGen: Default to clang's frame pointer elimination settings
Clang provides options to override that default value.
These options are accessible via the -Xcc flag.

Some Swift functions explicitly disable the frame pointer.

The clang options will not override those.
2020-05-28 12:21:42 -07:00
Owen Voorhees
e40e86fc94 Merge pull request #32017 from owenv/diag-style-opt
[Diagnostics] Add -diagnostic-style=(llvm|swift) to control printed output
2020-05-27 20:22:23 -07:00
Arnold Schwaighofer
45810d0aea Merge pull request #31921 from aschwaighofer/irgen_frame_pointer_non_leaf_only
IRGen: Always eliminate frame pointers of leaf functions
2020-05-22 16:24:27 -07:00
Tony Allevato
966ffbbd7d Propagate -vfsoverlay from driver to frontend.
Today, the driver does not propagate the flag to the frontend
but also does not emit an error (silently consuming the flag
instead).

I'll open a similar PR for apple/swift-driver once this one is
merged, in case there are any issues that need to be worked out
first.

Fixes SR-12834.
2020-05-22 10:38:32 -07:00
Arnold Schwaighofer
109813ffe5 Add option to disable leaf frame pointer elimination 2020-05-21 13:19:24 -07:00
Owen Voorhees
c4e67e29ed [Diagnostics] Add -diagnostic-style=(llvm|swift) to control printed output
This default formatting style remains the same "LLVM style". "Swift style"
is what was previously enabled via -enable-experimental-diagnostic-formatting
2020-05-20 19:34:15 -05:00
Ben Langmuir
ffc990f999 [driver/sourcekit] Avoid creating temporary output files in TMPDIR
When producing frontend arguments for sourcekitd, force the output mode
to -typecheck so that we do not create any temporary output files in the
driver. Previously, any sourcekitd operation that created a compiler
invocation would create 0-sized .o file inside $TMPDIR that would never
be cleaned up.

The new swift-driver project handles temporaries much better as
VirtualPath, and should not need this approach.

rdar://62366123
2020-05-18 16:52:41 -07:00
Robert Widmann
f2b3f8ffb6 Merge pull request #31621 from davezarzycki/pr31621
Remove all uses of -force-single-frontend-invocation
2020-05-08 09:48:48 -07:00
David Zarzycki
5dcc32f98f Remove all uses of -force-single-frontend-invocation
The `-force-single-frontend-invocation` flag predates WMO and is now an
alias for `-whole-module-optimization`. We should use the latter and let
the former fade into history.
2020-05-08 06:37:41 -04:00
Saleem Abdulrasool
09975d1253 sprinkle llvm_unreachable for covered switches (NFC)
Annotate the covered switches with `llvm_unreachable` to avoid the MSVC
warning which does not recognise the covered switches.  This allows us
to avoid a spew of warnings.
2020-05-07 11:05:35 -07:00
Robert Widmann
b06211eac4 Initial plumbing for private dependencies
Add a mode bit to the dependency collector that respects the frontend flag in the previous commit.

Notably, we now write over the dependency files at the end of the compiler pipeline when this flag is on so that dependency from SILGen and IRGen are properly written to disk.
2020-05-05 13:48:25 -07:00
Saleem Abdulrasool
d14bb1eed5 Driver: sink the static-stdlib-args.lnk generation
This moves the standard library response file into the standard library
generation rather than in the driver.  Although the driver consumes this
file, it is part of the standard library as it knows its dependencies.

This removes the last of the ICU references in the toolchain.
2020-05-02 19:52:35 -07:00
Slava Pestov
368d47429d Frontend: Remove coarse-grained dependency graph implementation 2020-04-29 16:55:53 -04:00
Varun Gandhi
65577940d0 [NFC] Get rid of -Wrange-loop-analysis warnings. (#31324) 2020-04-27 09:47:52 -07:00
Doug Gregor
33cdd61835 Fast dependency scanning for Swift
Implement a new "fast" dependency scanning option,
`-scan-dependencies`, in the Swift frontend that determines all
of the source file and module dependencies for a given set of
Swift sources. It covers four forms of modules:

1) Swift (serialized) module files, by reading the module header
2) Swift interface files, by parsing the source code to find imports
3) Swift source modules, by parsing the source code to find imports
4) Clang modules, using Clang's fast dependency scanning tool

A single `-scan-dependencies` operation maps out the full
dependency graph for the given Swift source files, including all
of the Swift and Clang modules that may need to be built, such
that all of the work can be scheduled up front by the Swift
driver or any other build system that understands this
option. The dependency graph is emitted as JSON, which can be
consumed by these other tools.
2020-04-24 12:58:41 -07:00
Doug Gregor
c59abcd543 Merge pull request #31154 from DougGregor/restrict-simulator-inference
[Darwin] Restrict inference of the simulator environment
2020-04-20 12:54:37 -07:00
Doug Gregor
b63e9a6bcf [Frontend] Infer simulator environment in the frontend, too.
Some code paths that see target triples go through the frontend
without seeing the driver. Therefore, perform the same "simulator"
inference for x86 iOS/tvOS/watchOS triples also in the frontend,
to ensure that we remain compatible. Also make sure that
-print-target-info performs the appropriate adjustment.
2020-04-20 08:50:35 -07:00
Doug Gregor
38e3621bf1 [Driver] Infer simulator-ness for iOS/tvOS/watchOS.
Localize the hack to infer simulator-ness of the target in the driver
itself, when it first processes the target. Emit a warning about the
missing "-simulator" and correct the triple immediately.

This gives a longer grace period for tools that might still not pass
through the simulator environment, while narrowing the hack.
2020-04-20 08:50:35 -07:00