Skip to content

Commit f21e2e0

Browse files
committed
[DNM] Diagnostic prints for CI debugging
1 parent 21c13e9 commit f21e2e0

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Sources/SwiftDriver/Toolchains/DarwinToolchain.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,7 @@ public final class DarwinToolchain: Toolchain {
406406
// If not specified otherwise, we should use the same triple as -target
407407
if !driver.parsedOptions.hasArgument(.disableClangTarget) &&
408408
driver.isFrontendArgSupported(.clangTarget) {
409+
print("Frontend Supports '-clang-target'")
409410
// The common target triple for all Clang dependencies of this compilation,
410411
// both direct and transitive is computed as:
411412
// 1. An explicitly-specified `-clang-target` argument to this driver invocation
@@ -423,6 +424,9 @@ public final class DarwinToolchain: Toolchain {
423424

424425
commandLine.appendFlag(.clangTarget)
425426
commandLine.appendFlag(clangTargetTriple)
427+
print("Adding '-clang-target \(clangTargetTriple)'")
428+
} else {
429+
print("Frontend Does not support '-clang-target'")
426430
}
427431
}
428432
}

Tests/SwiftDriverTests/SwiftDriverTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3634,6 +3634,7 @@ final class SwiftDriverTests: XCTestCase {
36343634
XCTAssertEqual(plannedJobs.count, 2)
36353635
XCTAssertTrue(plannedJobs[0].commandLine.contains(.flag("-target")))
36363636
XCTAssertTrue(plannedJobs[0].commandLine.contains(.flag("-clang-target")))
3637+
print(plannedJobs[0].commandLine.joinedUnresolvedArguments)
36373638
#endif
36383639
}
36393640

0 commit comments

Comments
 (0)