Skip to content

Commit 1c99ddc

Browse files
committed
[xcodegen] Make sure to realPath Clang file paths
Ensure we get the `realPath` for file paths in the `compile_commands.json` to canonicalize casing.
1 parent 8acde34 commit 1c99ddc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

utils/swift-xcodegen/Sources/SwiftXcodeGen/BuildArgs/ClangBuildArgsProvider.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ struct ClangBuildArgsProvider {
3737
(output: AbsolutePath?, args: [Command.Argument])] = [:]
3838
for command in parsed {
3939
guard command.command.executable.knownCommand == .clang,
40-
let relFilePath = command.file.removingPrefix(repoPath)
40+
command.file.exists,
41+
let relFilePath = command.file.realPath.removingPrefix(repoPath)
4142
else {
4243
continue
4344
}

0 commit comments

Comments
 (0)