@@ -3910,60 +3910,60 @@ final class SwiftDriverTests: XCTestCase {
3910
3910
serializer. writeDOT ( to: & output)
3911
3911
3912
3912
let linkerDriver = driver. targetTriple. isDarwin ? executableName ( " ld " ) : executableName ( " clang " )
3913
- # if os(Linux) || os(Android)
3914
- XCTAssertEqual ( output,
3915
- """
3916
- digraph Jobs {
3917
- " emitModule ( \( executableName ( " swift-frontend " ) ) ) " [style=bold];
3918
- " test.swift " [fontsize=12];
3919
- " test.swift " -> " emitModule ( \( executableName ( " swift-frontend " ) ) ) " [color=blue];
3920
- " test.swiftmodule " [fontsize=12];
3921
- " emitModule ( \( executableName ( " swift-frontend " ) ) ) " -> " test.swiftmodule " [color=green];
3922
- " test.swiftdoc " [fontsize=12];
3923
- " emitModule ( \( executableName ( " swift-frontend " ) ) ) " -> " test.swiftdoc " [color=green];
3924
- " test.abi.json " [fontsize=12];
3925
- " emitModule ( \( executableName ( " swift-frontend " ) ) ) " -> " test.abi.json " [color=green];
3926
- " compile ( \( executableName ( " swift-frontend " ) ) ) " [style=bold];
3927
- " test.swift " -> " compile ( \( executableName ( " swift-frontend " ) ) ) " [color=blue];
3928
- " test-1.o " [fontsize=12];
3929
- " compile ( \( executableName ( " swift-frontend " ) ) ) " -> " test-1.o " [color=green];
3930
- " autolinkExtract ( \( executableName ( " swift-autolink-extract " ) ) ) " [style=bold];
3931
- " test-1.o " -> " autolinkExtract ( \( executableName ( " swift-autolink-extract " ) ) ) " [color=blue];
3932
- " test-2.autolink " [fontsize=12];
3933
- " autolinkExtract ( \( executableName ( " swift-autolink-extract " ) ) ) " -> " test-2.autolink " [color=green];
3934
- " link ( \( executableName ( " clang " ) ) ) " [style=bold];
3935
- " test-1.o " -> " link ( \( executableName ( " clang " ) ) ) " [color=blue];
3936
- " test-2.autolink " -> " link ( \( executableName ( " clang " ) ) ) " [color=blue];
3937
- " \( executableName ( " test " ) ) " [fontsize=12];
3938
- " link ( \( executableName ( " clang " ) ) ) " -> " \( executableName ( " test " ) ) " [color=green];
3939
- }
3940
-
3941
- """ )
3942
- # else
3943
- XCTAssertEqual ( output,
3944
- """
3945
- digraph Jobs {
3946
- " emitModule ( \( executableName ( " swift-frontend " ) ) ) " [style=bold];
3947
- " test.swift " [fontsize=12];
3948
- " test.swift " -> " emitModule ( \( executableName ( " swift-frontend " ) ) ) " [color=blue];
3949
- " test.swiftmodule " [fontsize=12];
3950
- " emitModule ( \( executableName ( " swift-frontend " ) ) ) " -> " test.swiftmodule " [color=green];
3951
- " test.swiftdoc " [fontsize=12];
3952
- " emitModule ( \( executableName ( " swift-frontend " ) ) ) " -> " test.swiftdoc " [color=green];
3953
- " test.abi.json " [fontsize=12];
3954
- " emitModule ( \( executableName ( " swift-frontend " ) ) ) " -> " test.abi.json " [color=green];
3955
- " compile ( \( executableName ( " swift-frontend " ) ) ) " [style=bold];
3956
- " test.swift " -> " compile ( \( executableName ( " swift-frontend " ) ) ) " [color=blue];
3957
- " test-1.o " [fontsize=12];
3958
- " compile ( \( executableName ( " swift-frontend " ) ) ) " -> " test-1.o " [color=green];
3959
- " link ( \( linkerDriver) ) " [style=bold];
3960
- " test-1.o " -> " link ( \( linkerDriver) ) " [color=blue];
3961
- " \( executableName ( " test " ) ) " [fontsize=12];
3962
- " link ( \( linkerDriver) ) " -> " \( executableName ( " test " ) ) " [color=green];
3963
- }
3964
-
3965
- """ )
3966
- #endif
3913
+ if driver . targetTriple . objectFormat == . elf {
3914
+ XCTAssertEqual ( output,
3915
+ """
3916
+ digraph Jobs {
3917
+ " emitModule ( \( executableName ( " swift-frontend " ) ) ) " [style=bold];
3918
+ " test.swift " [fontsize=12];
3919
+ " test.swift " -> " emitModule ( \( executableName ( " swift-frontend " ) ) ) " [color=blue];
3920
+ " test.swiftmodule " [fontsize=12];
3921
+ " emitModule ( \( executableName ( " swift-frontend " ) ) ) " -> " test.swiftmodule " [color=green];
3922
+ " test.swiftdoc " [fontsize=12];
3923
+ " emitModule ( \( executableName ( " swift-frontend " ) ) ) " -> " test.swiftdoc " [color=green];
3924
+ " test.abi.json " [fontsize=12];
3925
+ " emitModule ( \( executableName ( " swift-frontend " ) ) ) " -> " test.abi.json " [color=green];
3926
+ " compile ( \( executableName ( " swift-frontend " ) ) ) " [style=bold];
3927
+ " test.swift " -> " compile ( \( executableName ( " swift-frontend " ) ) ) " [color=blue];
3928
+ " test-1.o " [fontsize=12];
3929
+ " compile ( \( executableName ( " swift-frontend " ) ) ) " -> " test-1.o " [color=green];
3930
+ " autolinkExtract ( \( executableName ( " swift-autolink-extract " ) ) ) " [style=bold];
3931
+ " test-1.o " -> " autolinkExtract ( \( executableName ( " swift-autolink-extract " ) ) ) " [color=blue];
3932
+ " test-2.autolink " [fontsize=12];
3933
+ " autolinkExtract ( \( executableName ( " swift-autolink-extract " ) ) ) " -> " test-2.autolink " [color=green];
3934
+ " link ( \( executableName ( " clang " ) ) ) " [style=bold];
3935
+ " test-1.o " -> " link ( \( executableName ( " clang " ) ) ) " [color=blue];
3936
+ " test-2.autolink " -> " link ( \( executableName ( " clang " ) ) ) " [color=blue];
3937
+ " \( executableName ( " test " ) ) " [fontsize=12];
3938
+ " link ( \( executableName ( " clang " ) ) ) " -> " \( executableName ( " test " ) ) " [color=green];
3939
+ }
3940
+
3941
+ """ )
3942
+ } else {
3943
+ XCTAssertEqual ( output,
3944
+ """
3945
+ digraph Jobs {
3946
+ " emitModule ( \( executableName ( " swift-frontend " ) ) ) " [style=bold];
3947
+ " test.swift " [fontsize=12];
3948
+ " test.swift " -> " emitModule ( \( executableName ( " swift-frontend " ) ) ) " [color=blue];
3949
+ " test.swiftmodule " [fontsize=12];
3950
+ " emitModule ( \( executableName ( " swift-frontend " ) ) ) " -> " test.swiftmodule " [color=green];
3951
+ " test.swiftdoc " [fontsize=12];
3952
+ " emitModule ( \( executableName ( " swift-frontend " ) ) ) " -> " test.swiftdoc " [color=green];
3953
+ " test.abi.json " [fontsize=12];
3954
+ " emitModule ( \( executableName ( " swift-frontend " ) ) ) " -> " test.abi.json " [color=green];
3955
+ " compile ( \( executableName ( " swift-frontend " ) ) ) " [style=bold];
3956
+ " test.swift " -> " compile ( \( executableName ( " swift-frontend " ) ) ) " [color=blue];
3957
+ " test-1.o " [fontsize=12];
3958
+ " compile ( \( executableName ( " swift-frontend " ) ) ) " -> " test-1.o " [color=green];
3959
+ " link ( \( linkerDriver) ) " [style=bold];
3960
+ " test-1.o " -> " link ( \( linkerDriver) ) " [color=blue];
3961
+ " \( executableName ( " test " ) ) " [fontsize=12];
3962
+ " link ( \( linkerDriver) ) " -> " \( executableName ( " test " ) ) " [color=green];
3963
+ }
3964
+
3965
+ """ )
3966
+ }
3967
3967
}
3968
3968
3969
3969
func testRegressions( ) throws {
0 commit comments