Skip to content

Commit 5f46179

Browse files
kastiglionejrose-apple
authored andcommitted
Link to docs referenced from Driver.md (#19420)
1 parent 4733bfc commit 5f46179

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

docs/Driver.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ The target audience for this document is people who want to integrate the Swift
1414
compiler into their build system, rather than using Xcode or the package
1515
manager (`swift build`). If you're looking to work on the driver itself...well,
1616
this is probably still useful to you, but you should also check out
17-
DriverInternals.rst and maybe DependencyAnalysis.rst as well. If you're just
18-
using Xcode or SwiftPM and want to find out what mysterious command-line
19-
options you could be passing, `swiftc --help` is a better choice.
17+
[DriverInternals.rst](DriverInternals.rst) and maybe
18+
[DependencyAnalysis.rst](DependencyAnalysis.rst) as well. If you're just using
19+
Xcode or SwiftPM and want to find out what mysterious command-line options you
20+
could be passing, `swiftc --help` is a better choice.
2021

2122
If you're invoking `swift -frontend` directly, and you aren't working on the
2223
compiler itself...well, this document should convince you to not do that.
@@ -25,8 +26,8 @@ Some terms:
2526

2627
- For the purposes of this document, a _module_ is a single distributable unit
2728
of API. (We use this term for a lot of other things too, though; check out
28-
Lexicon.rst for the full list.) "Foundation" is a single module, as is the
29-
Swift standard library ("Swift"). An app is a module too.
29+
[Lexicon.rst](Lexicon.rst) for the full list.) "Foundation" is a single
30+
module, as is the Swift standard library ("Swift"). An app is a module too.
3031

3132
- A _compilation unit_ is a set of source files that are compiled together. In
3233
Swift, everything intended to be in the same module must be part of the same
@@ -205,13 +206,13 @@ in becoming more like non-whole-module builds.
205206
## Incremental Builds ##
206207

207208
Incremental builds in Swift work by primarily by cross-file dependency
208-
analysis, described in DependencyAnalysis.rst. Compiling a single file might be
209-
necessary because that file has changed, but it could also be because that file
210-
depends on something else that might have changed. From a build system
211-
perspective, the files in a particular module can't be extracted from each
212-
other; a top-level invocation of the compiler will result in a valid
213-
compilation of the entire module, but manually recompiling certain files is not
214-
guaranteed to do anything sensible.
209+
analysis, described in [DependencyAnalysis.rst](DependencyAnalysis.rst).
210+
Compiling a single file might be necessary because that file has changed, but
211+
it could also be because that file depends on something else that might have
212+
changed. From a build system perspective, the files in a particular module
213+
can't be extracted from each other; a top-level invocation of the compiler will
214+
result in a valid compilation of the entire module, but manually recompiling
215+
certain files is not guaranteed to do anything sensible.
215216

216217
Performing an incremental build is easy; just pass `-incremental` and be sure to
217218
put "swift-dependencies" entries in your output file map.

0 commit comments

Comments
 (0)