Skip to content

Commit

Permalink
[DNM] Diagnostic prints for CI debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
artemcm committed Jan 27, 2023
1 parent 21c13e9 commit f21e2e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/SwiftDriver/Toolchains/DarwinToolchain.swift
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ public final class DarwinToolchain: Toolchain {
// If not specified otherwise, we should use the same triple as -target
if !driver.parsedOptions.hasArgument(.disableClangTarget) &&
driver.isFrontendArgSupported(.clangTarget) {
print("Frontend Supports '-clang-target'")
// The common target triple for all Clang dependencies of this compilation,
// both direct and transitive is computed as:
// 1. An explicitly-specified `-clang-target` argument to this driver invocation
Expand All @@ -423,6 +424,9 @@ public final class DarwinToolchain: Toolchain {

commandLine.appendFlag(.clangTarget)
commandLine.appendFlag(clangTargetTriple)
print("Adding '-clang-target \(clangTargetTriple)'")
} else {
print("Frontend Does not support '-clang-target'")
}
}
}
Expand Down
1 change: 1 addition & 0 deletions Tests/SwiftDriverTests/SwiftDriverTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3634,6 +3634,7 @@ final class SwiftDriverTests: XCTestCase {
XCTAssertEqual(plannedJobs.count, 2)
XCTAssertTrue(plannedJobs[0].commandLine.contains(.flag("-target")))
XCTAssertTrue(plannedJobs[0].commandLine.contains(.flag("-clang-target")))
print(plannedJobs[0].commandLine.joinedUnresolvedArguments)
#endif
}

Expand Down

0 comments on commit f21e2e0

Please sign in to comment.