Commit Graph

1187 Commits

Author SHA1 Message Date
Artem Chikin
70441d1906 Merge pull request #33430 from artemcm/ExplicitFrameworkBuild
[Explicit Module Builds] Distinguish whether an explicit module is a framework.
2020-08-14 09:11:11 -07:00
Nathan Hawes
51beab6889 Manually merge remote-tracking branch 'upstream/master' into HEAD
Conflicts:
	test/DebugInfo/modulecache.swift
2020-08-13 11:16:33 -07:00
Hamish Knight
f6976d8620 Have TBDGenDescriptor take ownership of TBDGenOptions
This is necessary for caching TBD requests.
2020-08-13 10:21:37 -07:00
Artem Chikin
40c1687fd2 [Fast Dependency Scanner] Produce information on whether an explicit module is a framework
In the fast dependency scanner, depending on whether a module intrface was found via the import search path or framework search path, encode into the dependency graph Swift module details, whether a given module is a framework.
2020-08-12 10:12:35 -07:00
Varun Gandhi
ad4aba8b98 Merge pull request #33377 from varungandhi-apple/vg-fix-module-trace-cycle
[ModuleTrace] Handle cycle detection edge case in module trace emission.
2020-08-11 23:22:39 -07:00
Varun Gandhi
0ca8458189 [NFC] Remove caching for "isOverlay" computation when emitting a trace.
Based on measurements, it seemed to save about 0.2 ms - 0.4 ms for a module
with a large number of imports from the SDK. That's insignificant compared to
the compile time for a typical module, which usually takes somewhere between
a few seconds and a few minutes.
2020-08-08 01:02:40 -07:00
Varun Gandhi
99cefe707e [ModuleTrace] Handle cycle detection edge case in module trace emission.
Fixes rdar://66512316.
2020-08-07 18:07:29 -07:00
Brent Royal-Gordon
9bc787ef5f Add a “typecheck module interface” mode 2020-08-07 16:00:15 -07:00
swift-ci
cb656432df Merge remote-tracking branch 'origin/master' into master-rebranch 2020-08-05 20:43:51 -07:00
Xi Ge
d0c1a45068 DependenciesScanner: teach the scanner to diagnose dependency cycles 2020-08-05 16:52:58 -07:00
Nathan Hawes
607e2b8822 Manually merge remote-tracking branch 'upstream/master' into HEAD 2020-08-04 13:47:48 -07:00
Dario Rexin
7e60a73335 Merge pull request #33168 from drexin/wip-fix-resource-folder
Properly compute resource folder when linking statically
2020-08-04 12:52:38 -07:00
Dario Rexin
0850436d9f Properly compute resource folder when linking statically
- deduplicate the logic to compute the resource folder
- install headers and module files in shared and static resource folders
- forward -static flag when calling swiftc with -print-target-info
2020-07-30 15:07:03 -07:00
swift-ci
113db8c6d8 Merge remote-tracking branch 'origin/master' into master-rebranch 2020-07-28 14:43:59 -07:00
Artem Chikin
413bbab306 Merge pull request #33032 from artemcm/ExplicitPackageBuilds
[Dependency Scanner] Add a scanner for explicit placeholder module dependencies
2020-07-28 14:36:26 -07:00
Nathan Hawes
498e767765 Manually merge remote-tracking branch 'upstream/master' into merge-m-to-mr 2020-07-27 22:41:53 -07:00
Hamish Knight
81d455d701 Merge pull request #33107 from hamishknight/tbd-two 2020-07-27 17:03:05 -07:00
Nathan Hawes
e3a2059393 [master-rebranch] Fix up missing include causing build failures. 2020-07-27 12:32:52 -07:00
Nathan Hawes
2b26c221d7 [master-rebranch] Fix up another implicit -> explcit StringRef -> std::string conversion 2020-07-27 11:00:15 -07:00
Nathan Hawes
b0a2230860 Manually merge remote-tracking branch 'upstream/master' into merge-in-master 2020-07-27 09:25:01 -07:00
Artem Chikin
746e89b252 Rename external dependencies to placeholder dependencies. 2020-07-27 09:24:36 -07:00
Artem Chikin
b5af62f93f Add new dependency kind (swiftExternal) to model external dependencies. 2020-07-27 09:24:35 -07:00
Varun Gandhi
1ddf4ff790 [Gardening] Use consistent style for referencing notes. 2020-07-25 23:36:17 -07:00
Hamish Knight
3ae136ce7d [Frontend] Fix error detection
Seperating out TBD file generation uncovered a bug
in the frontend where we could fail to notice that
we emitted an error during the end-of-pipeline
actions and returned a zero exit code. Tweak the
logic to detect this case.
2020-07-24 15:49:08 -07:00
Varun Gandhi
497e049401 Merge pull request #32738 from varungandhi-apple/vg-fix-indirect-dep
[ModuleTrace] Track direct dependencies through #import and @_exported import
2020-07-24 14:15:01 -07:00
Varun Gandhi
7e34fb040a [ModuleTrace] More precise dependency tracking through ObjC.
We need to traverse the module dependency graph and track which modules expose
which other modules' ABIs, while making sure that we don't hit a loop while
trawling through Clang (sub)modules.

Fixes rdar://64993153.
2020-07-23 19:25:02 -07:00
Xi Ge
056f00322d DependenciesScanner: refactor cross import overlay resolver to a standalone function. NFC
This change facilitates resolving cross-import overlays from transitive dependencies.
2020-07-23 17:47:47 -07:00
Nathan Hawes
9d4ed5f39c Manually merge remote-tracking branch 'upstream/master' into manually-merge-master-to-master-rebranch 2020-07-20 16:09:55 -07:00
Varun Gandhi
986f27f771 [NFC] Separate out trace import filtering into a separate function. 2020-07-18 01:22:42 -07:00
Xi Ge
b93ff79cb0 DependenciesScanner: include compiled module candidates for textual module interface in JSON output
Instead of replacing an interface file with its up-to-date compile module,
the dep-scanner should report potentially up-to-date module candidates either adjacent to
the interface file or in the prebuilt module cache. swift-driver should later pass down
these candidates to -compile-module-from-interface invocation and the front-end job
will check if one of the candidates is ready to use. The front-end job then either emits a forwarding
module to an up-to-date candidate or a binary module.
2020-07-17 12:32:38 -07:00
Robert Widmann
638977454b Remove SharedTimer Infrastructure
Teach the UnifiedStatsReporter to directly construct
llvm::NamedRegionTimer for itself.
2020-07-16 17:35:50 -07:00
Robert Widmann
2198d7174c Remove -debug-time-compilation
This flag no longer does anything now that the unified statistics
reporting infrastructure exists. It is better to use
-driver-time-compilation to see a bird's eye view of timing statistics
for frontend jobs, and -stats-output-dir to see a down-and-dirty view of
everything including performance counters.
2020-07-16 17:35:50 -07:00
Hamish Knight
9b2bcd13f9 [TBDGen] Return a vector of symbols instead of set
A couple of clients are iterating over the result,
so switch to a vector to ensure we don't
accidentally introduce any non-determinism.

(cherry picked from commit 56929fdaaa)
2020-07-15 18:41:57 -07:00
Hamish Knight
4daeb4fa3a Sink linker directive computation into IRGen
With an inverted pipeline, IRGen needs to be able
to compute the linker directives itself, so sink
it down such that it can be computed by the
`IRGenDescriptor`.

(cherry picked from commit c0a2ea7d0e)
2020-07-15 18:41:52 -07:00
Hamish Knight
e284d7e8e5 [TBDGen] Make enumeratePublicSymbols more functional
Instead of taking an out parameter, have it return
the set directly. Also coalesce the two overloads
into a single overload that takes a
`TBDGenDescriptor`.

(cherry picked from commit 0e97ecedd6)
2020-07-15 18:41:42 -07:00
Hamish Knight
f9d70661dd [IRGen] Hash compiler version instead of lang version
The LLVM passes we apply don't depend on the language
version, only the compiler version.
2020-07-15 16:46:41 -07:00
Hamish Knight
45f11c8615 [IRGen] Allow IRGenDescriptor to hold a FileUnit
This will allow it to better interact with the
SILGen descriptor.
2020-07-15 16:46:41 -07:00
Hamish Knight
c354b0faa1 [TBDGen] Return a vector of symbols instead of set
A couple of clients are iterating over the result,
so switch to a vector to ensure we don't
accidentally introduce any non-determinism.
2020-07-13 20:42:54 -07:00
Hamish Knight
db7fea4665 Sink linker directive computation into IRGen
With an inverted pipeline, IRGen needs to be able
to compute the linker directives itself, so sink
it down such that it can be computed by the
`IRGenDescriptor`.
2020-07-13 20:42:54 -07:00
Hamish Knight
b5f9e05255 [TBDGen] Make enumeratePublicSymbols more functional
Instead of taking an out parameter, have it return
the set directly. Also coalesce the two overloads
into a single overload that takes a
`TBDGenDescriptor`.
2020-07-13 20:42:53 -07:00
Varun Gandhi
e72629df92 Merge pull request #32771 from varungandhi-apple/vg-include-spi-deps-in-trace
Include SPI dependencies in module trace.
2020-07-10 13:48:31 -07:00
Varun Gandhi
7c366839b3 [FrontendTool] Include SPI dependencies in module trace. 2020-07-08 17:57:50 -07:00
Doug Gregor
618af0420f [Frontend] Add compatibility libraries to -print-target-info.
The driver and any other client that attempts to properly link Swift
code need to know which compatibility libraries should be linked on a
per-target basis. Vend that information as part of -print-target-info.
2020-07-07 23:57:10 -07:00
Doug Gregor
7bf676d335 [Frontend] Add compiler version information to -print-target-info output.
Clients that use -print-target-info can avoid an extra frontend
invocation by using this information.
2020-07-07 22:11:19 -07:00
swift_jenkins
d883300bc1 Merge remote-tracking branch 'origin/master' into master-next 2020-07-01 17:59:25 -07:00
Xi Ge
84dd4db0b1 Dependencies Scanner: report compiled Swift module paths if they are available
For the explicit module mode, swift-driver uses -compile-module-from-interface to
generate modules from interfaces found by the dependency scanner. However, we don't
need to build the binary module if up-to-date modules are available, either adjacent
to the interface file or in the prebuilt module cache directory. This patch teaches
dependencies scanner to report these ready-to-use binary modules.
2020-07-01 11:54:15 -07:00
swift_jenkins
465eae8559 Merge remote-tracking branch 'origin/master' into master-next 2020-06-30 08:58:09 -07:00
Hamish Knight
553dadd87e [Frontend] dumpAPI at the end of the pipeline
This allows us to remove another condition that
was previously preventing the ASTContext from being
freed before LLVM.
2020-06-29 15:26:28 -07:00
Hamish Knight
4ca67327fe [Frontend] NFC: Move dumpAPI up a bit 2020-06-29 15:26:27 -07:00
Hamish Knight
958bf8e3fd [Frontend] Move dependency verifier to end of pipeline
Allow the verification of dependencies before LLVM,
allowing the freeing of the ASTContext.
2020-06-29 15:26:27 -07:00