File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Sources/SwiftDriver/Toolchains Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -373,9 +373,10 @@ public final class DarwinToolchain: Toolchain {
373
373
frontendTargetInfo: FrontendTargetInfo ,
374
374
driver: inout Driver
375
375
) throws {
376
+ print ( " WWW: Adding platform-specific flags. " )
376
377
guard let sdkPath = frontendTargetInfo. sdkPath? . path,
377
378
let sdkInfo = getTargetSDKInfo ( sdkPath: sdkPath) else { return }
378
-
379
+ print ( " WWW: ... " )
379
380
commandLine. append ( . flag( " -target-sdk-version " ) )
380
381
commandLine. append ( . flag( sdkInfo. sdkVersion ( for: frontendTargetInfo. target. triple) . sdkVersionString) )
381
382
@@ -406,6 +407,7 @@ public final class DarwinToolchain: Toolchain {
406
407
// If not specified otherwise, we should use the same triple as -target
407
408
if !driver. parsedOptions. hasArgument ( . disableClangTarget) &&
408
409
driver. isFrontendArgSupported ( . clangTarget) {
410
+ print ( " Frontend supports '-clang-target' " )
409
411
// The common target triple for all Clang dependencies of this compilation,
410
412
// both direct and transitive is computed as:
411
413
// 1. An explicitly-specified `-clang-target` argument to this driver invocation
@@ -419,6 +421,7 @@ public final class DarwinToolchain: Toolchain {
419
421
420
422
commandLine. appendFlag ( . clangTarget)
421
423
commandLine. appendFlag ( clangTargetTriple)
424
+ print ( " Added '-clang-target \( clangTargetTriple) ' " )
422
425
}
423
426
}
424
427
}
Original file line number Diff line number Diff line change @@ -3641,6 +3641,8 @@ final class SwiftDriverTests: XCTestCase {
3641
3641
XCTAssertEqual ( plannedJobs. count, 2 )
3642
3642
XCTAssertTrue ( plannedJobs [ 0 ] . commandLine. contains ( . flag( " -target " ) ) )
3643
3643
XCTAssertTrue ( plannedJobs [ 0 ] . commandLine. contains ( subsequence: [ . flag( " -clang-target " ) , . flag( " arm64-apple-ios13.0 " ) ] ) )
3644
+
3645
+ print ( " COMMAND_LINE2: \( plannedJobs [ 0 ] . commandLine. joinedUnresolvedArguments) " )
3644
3646
#endif
3645
3647
}
3646
3648
You can’t perform that action at this time.
0 commit comments