File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Sources/SwiftDriver/Driver Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1855,7 +1855,7 @@ extension Driver {
18551855 return path
18561856 }
18571857
1858- return path. replacingExtension ( with : type)
1858+ return path. parentDirectory . appending ( component : " \( moduleName ) . \( type. rawValue ) " )
18591859 }
18601860
18611861 return try VirtualPath ( path: moduleName. appendingFileTypeExtension ( type) )
@@ -1954,12 +1954,15 @@ extension Driver {
19541954 _ = parsedOptions. hasArgument ( isOutput)
19551955 }
19561956
1957+ let parentPath : VirtualPath
19571958 if let projectDirectory = projectDirectory {
19581959 // If the build system has created a Project dir for us to include the file, use it.
1959- return projectDirectory. appending ( component: moduleName. appendingFileTypeExtension ( type) )
1960+ parentPath = projectDirectory
1961+ } else {
1962+ parentPath = moduleOutputPath. parentDirectory
19601963 }
19611964
1962- return moduleOutputPath . replacingExtension ( with: type)
1965+ return parentPath . appending ( component : moduleName ) . replacingExtension ( with: type)
19631966 }
19641967
19651968 // If the output option was not provided, don't produce this output at all.
You can’t perform that action at this time.
0 commit comments