Commit 4d8cc2a
committed
Driver: provide a more suitable default for
Provide a fallback default for the `emit-module.d` file. It has been
observed on Windows and Android that builds subsequent to #1056 would
emit files into the root of the source tree (specifically, `pwd`). If
there is no explicit location specified for the new output, and given
that there is no primary output associated with the command, the path
that defaults is simply a singular file name component, emitting that
file into the location that the driver was executed from (which comes
out to the root of the package for commandline invocations), dirtying
the source tree.
Rather than sinking the knowledge for the default into
`existingOutputForSingleInput`, where we have no access to the module
name, emit the logic inline and derive a name based on the Swift module
and place it as a peer. This should help ensure that the serialized
diagnostics do not end up committed accidentally.emit-module.d
1 parent dffa61d commit 4d8cc2a
1 file changed
+15
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3011 | 3011 | | |
3012 | 3012 | | |
3013 | 3013 | | |
3014 | | - | |
3015 | | - | |
3016 | | - | |
3017 | | - | |
| 3014 | + | |
| 3015 | + | |
| 3016 | + | |
| 3017 | + | |
| 3018 | + | |
| 3019 | + | |
| 3020 | + | |
| 3021 | + | |
| 3022 | + | |
| 3023 | + | |
| 3024 | + | |
| 3025 | + | |
| 3026 | + | |
| 3027 | + | |
| 3028 | + | |
3018 | 3029 | | |
3019 | 3030 | | |
3020 | 3031 | | |
| |||
0 commit comments