|
21 | 21 | namespace swift {
|
22 | 22 | struct SupplementaryOutputPaths {
|
23 | 23 | /// The path to which we should emit an Objective-C header for the module.
|
| 24 | + /// |
24 | 25 | /// Currently only makes sense when the compiler has whole module knowledge.
|
25 | 26 | /// The modes for which it makes sense incuide both WMO and the "merge
|
26 | 27 | /// modules" job that happens after the normal compilation jobs. That's where
|
27 | 28 | /// the header is emitted in single-file mode, since it needs whole-module
|
28 | 29 | /// information.
|
29 |
| - |
| 30 | + /// |
| 31 | + /// \sa swift::printAsObjC |
30 | 32 | std::string ObjCHeaderOutputPath;
|
31 | 33 |
|
32 | 34 | /// The path to which we should emit a serialized module.
|
33 | 35 | /// It is valid whenever there are any inputs.
|
| 36 | + /// |
| 37 | + /// This binary format is used to describe the interface of a module when |
| 38 | + /// imported by client source code. The swiftmodule format is described in |
| 39 | + /// docs/Serialization.rst. |
| 40 | + /// |
| 41 | + /// \sa swift::serialize |
34 | 42 | std::string ModuleOutputPath;
|
35 | 43 |
|
36 | 44 | /// The path to which we should emit a module documentation file.
|
37 | 45 | /// It is valid whenever there are any inputs.
|
| 46 | + /// |
| 47 | + /// This binary format stores doc comments and other information about the |
| 48 | + /// declarations in a module. |
| 49 | + /// |
| 50 | + /// \sa swift::serialize |
38 | 51 | std::string ModuleDocOutputPath;
|
39 | 52 |
|
40 | 53 | /// The path to which we should output a Make-style dependencies file.
|
41 | 54 | /// It is valid whenever there are any inputs.
|
| 55 | + /// |
| 56 | + /// Swift's compilation model means that Make-style dependencies aren't |
| 57 | + /// well-suited to model fine-grained dependencies. See docs/Driver.md for |
| 58 | + /// more information. |
| 59 | + /// |
| 60 | + /// \sa ReferenceDependenciesFilePath |
42 | 61 | std::string DependenciesFilePath;
|
43 | 62 |
|
44 |
| - /// The path to which we should output a Swift reference dependencies file. |
| 63 | + /// The path to which we should output a Swift "reference dependencies" file. |
45 | 64 | /// It is valid whenever there are any inputs.
|
| 65 | + /// |
| 66 | + /// "Reference dependencies" track dependencies on a more fine-grained level |
| 67 | + /// than just "this file depends on that file". With Swift's "implicit |
| 68 | + /// visibility" within a module, that becomes very important for any sort of |
| 69 | + /// incremental build. These files are consumed by the Swift driver to decide |
| 70 | + /// whether a source file needs to be recompiled during a build. See |
| 71 | + /// docs/DependencyAnalysis.rst for more information. |
| 72 | + /// |
| 73 | + /// \sa swift::emitReferenceDependencies |
| 74 | + /// \sa DependencyGraph |
46 | 75 | std::string ReferenceDependenciesFilePath;
|
47 | 76 |
|
48 | 77 | /// Path to a file which should contain serialized diagnostics for this
|
49 | 78 | /// frontend invocation.
|
| 79 | + /// |
| 80 | + /// This uses the same serialized diagnostics format as Clang, for tools that |
| 81 | + /// want machine-parseable diagnostics. There's a bit more information on |
| 82 | + /// how clients might use this in docs/Driver.md. |
| 83 | + /// |
| 84 | + /// \sa swift::serialized_diagnostics::createConsumer |
50 | 85 | std::string SerializedDiagnosticsPath;
|
51 | 86 |
|
52 | 87 | /// The path to which we should output fix-its as source edits.
|
| 88 | + /// |
| 89 | + /// This is a JSON-based format that is used by the migrator, but is not |
| 90 | + /// really vetted for anything else. |
| 91 | + /// |
| 92 | + /// \sa swift::writeEditsInJson |
53 | 93 | std::string FixItsOutputPath;
|
54 | 94 |
|
55 | 95 | /// The path to which we should output a loaded module trace file.
|
56 |
| - /// It is currently only used with WMO, but could be generalized. |
| 96 | + /// It is valid whenever there are any inputs. |
| 97 | + /// |
| 98 | + /// The file is appended to, and consists of line-delimited JSON objects, |
| 99 | + /// where each line is of the form `{ "name": NAME, "target": TARGET, |
| 100 | + /// "swiftmodules": [PATH, PATH, ...] }`, representing the (real-path) PATHs |
| 101 | + /// to each .swiftmodule that was loaded while building module NAME for target |
| 102 | + /// TARGET. This format is subject to arbitrary change, however. |
57 | 103 | std::string LoadedModuleTracePath;
|
58 | 104 |
|
59 | 105 | /// The path to which we should output a TBD file.
|
60 |
| - /// It is currently only used with WMO, but could be generalized. |
| 106 | + /// |
| 107 | + /// "TBD" stands for "text-based dylib". It's a YAML-based format that |
| 108 | + /// describes the public ABI of a library, which clients can link against |
| 109 | + /// without having an actual dynamic library binary. |
| 110 | + /// |
| 111 | + /// Only makes sense when the compiler has whole-module knowledge. |
| 112 | + /// |
| 113 | + /// \sa swift::writeTBDFile |
61 | 114 | std::string TBDPath;
|
62 | 115 |
|
63 | 116 | /// The path to which we should emit a textual module interface, which can be
|
64 | 117 | /// used by a client source file to import this module.
|
65 | 118 | ///
|
| 119 | + /// This format is similar to the binary format used for #ModuleOutputPath, |
| 120 | + /// but is intended to be stable across compiler versions. |
| 121 | + /// |
66 | 122 | /// Currently only makes sense when the compiler has whole-module knowledge.
|
| 123 | + /// |
| 124 | + /// \sa ModuleOutputPath |
67 | 125 | std::string ModuleInterfaceOutputPath;
|
68 | 126 |
|
69 | 127 | SupplementaryOutputPaths() = default;
|
|
0 commit comments