Skip to content

Commit 480c631

Browse files
committed
Linux-specific fixes for the swift-frontend rename.
Hardlinking to a symlink is not permitted, so use "swift-frontend" instead of "swift" as the hard-link target. Also, update one Linux-specific test to check for swift-frontend.
1 parent bb2d6c5 commit 480c631

9 files changed

+11
-9
lines changed

test/Driver/driver-compile.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
// RUN: %swiftc_driver -driver-print-jobs -c -target x86_64-apple-macosx10.9 %s %S/../Inputs/empty.swift -module-name main -driver-filelist-threshold=0 2>&1 | %FileCheck -check-prefix=FILELIST %s
4747

4848
// RUN: %empty-directory(%t)/DISTINCTIVE-PATH/usr/bin/
49-
// RUN: %hardlink-or-copy(from: %swift_driver_plain, to: %t/DISTINCTIVE-PATH/usr/bin/swiftc)
49+
// RUN: %hardlink-or-copy(from: %swift_frontend_plain, to: %t/DISTINCTIVE-PATH/usr/bin/swiftc)
5050
// RUN: ln -s "swiftc" %t/DISTINCTIVE-PATH/usr/bin/swift-update
5151
// RUN: %t/DISTINCTIVE-PATH/usr/bin/swiftc -driver-print-jobs -c -update-code -target x86_64-apple-macosx10.9 %s 2>&1 > %t.upd.txt
5252
// RUN: %FileCheck -check-prefix UPDATE-CODE %s < %t.upd.txt

test/Driver/embed-bitcode.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
// CHECK-coff: "swiftc.{{exe}}", inputs: ["[[BC]]"], output: {object: "[[OBJECT:.*\.o]]"}
77
// CHECK-coff: "clang.exe", inputs: ["[[OBJECT]]"], output: {image: "embed-bitcode"}
88

9-
// CHECK-elf: "swift", inputs: ["{{.*}}embed-bitcode.swift"], output: {llvm-bc: "[[BC:.*\.bc]]"}
10-
// CHECK-elf: "swift", inputs: ["[[BC]]"], output: {object: "[[OBJECT:.*\.o]]"}
9+
// CHECK-elf: "swift-frontend", inputs: ["{{.*}}embed-bitcode.swift"], output: {llvm-bc: "[[BC:.*\.bc]]"}
10+
// CHECK-elf: "swift-frontend", inputs: ["[[BC]]"], output: {object: "[[OBJECT:.*\.o]]"}
1111
// CHECK-elf: "swift-autolink-extract", inputs: ["[[OBJECT]]"], output: {autolink: "[[AUTOLINK:.*\.autolink]]"}
1212
// CHECK-elf: "clang", inputs: ["[[OBJECT]]", "[[AUTOLINK]]"], output: {image: "main"}
1313

test/Driver/linker-autolink-extract.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// DEBUG_LINUX: bin/swift
66
// DEBUG_LINUX-NEXT: bin/swift-autolink-extract
77
// DEBUG_LINUX-NEXT: bin/swift
8-
// DEBUG_LINUX-NEXT: bin/swift -modulewrap
8+
// DEBUG_LINUX-NEXT: bin/swift-frontend -modulewrap
99
// DEBUG_LINUX-NEXT: bin/clang{{"? }}
1010
// DEBUG_LINUX: -o main
1111
// DEBUG_LINUX-NOT: dsymutil

test/Driver/linker-clang_rt.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
// RUN: rm -rf %t
88
// RUN: %empty-directory(%t/bin)
9-
// RUN: %hardlink-or-copy(from: %swift_driver_plain, to: %t/bin/swiftc)
9+
// RUN: %hardlink-or-copy(from: %swift_frontend_plain, to: %t/bin/swiftc)
1010
// RUN: %empty-directory(%t/lib/swift/clang/lib/darwin/)
1111

1212
// RUN: %t/bin/swiftc -driver-print-jobs -target x86_64-apple-macosx10.9 %S/../Inputs/empty.swift | %FileCheck -check-prefix CHECK -check-prefix CHECK-NO-RUNTIME %s

test/Driver/linker.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@
415415
// RUN: %empty-directory(%t/DISTINCTIVE-PATH/usr/bin)
416416
// RUN: touch %t/DISTINCTIVE-PATH/usr/bin/ld
417417
// RUN: chmod +x %t/DISTINCTIVE-PATH/usr/bin/ld
418-
// RUN: %hardlink-or-copy(from: %swift_driver_plain, to: %t/DISTINCTIVE-PATH/usr/bin/swiftc)
418+
// RUN: %hardlink-or-copy(from: %swift_frontend_plain, to: %t/DISTINCTIVE-PATH/usr/bin/swiftc)
419419
// RUN: %t/DISTINCTIVE-PATH/usr/bin/swiftc -target x86_64-apple-macosx10.9 %s -### | %FileCheck -check-prefix=RELATIVE-LINKER %s
420420

421421
// RELATIVE-LINKER: {{/|\\\\}}DISTINCTIVE-PATH{{/|\\\\}}usr{{/|\\\\}}bin{{/|\\\\}}swift

test/Driver/options-repl.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
// RUN: %empty-directory(%t)
99
// RUN: mkdir -p %t/usr/bin
10-
// RUN: %hardlink-or-copy(from: %swift_driver_plain, to: %t/usr/bin/swift)
10+
// RUN: %hardlink-or-copy(from: %swift_frontend_plain, to: %t/usr/bin/swift)
1111

1212
// RUN: %t/usr/bin/swift -sdk "" -deprecated-integrated-repl -### | %FileCheck -check-prefix=INTEGRATED %s
1313

test/Driver/subcommands.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
// RUN: rm -rf %t.dir
55
// RUN: mkdir -p %t.dir/usr/bin
6-
// RUN: %hardlink-or-copy(from: %swift_driver_plain, to: %t.dir/usr/bin/swift)
6+
// RUN: %hardlink-or-copy(from: %swift_frontend_plain, to: %t.dir/usr/bin/swift)
77

88
// RUN: %t.dir/usr/bin/swift -### 2>&1 | %FileCheck -check-prefix=CHECK-SWIFT-INVOKES-REPL %s
99
// RUN: %t.dir/usr/bin/swift repl -### 2>&1 | %FileCheck -check-prefix=CHECK-SWIFT-INVOKES-REPL %s

test/Driver/windows-link-job.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// RUN: %empty-directory(%t/DISTINCTIVE-WINDOWS-PATH/usr/bin)
2-
// RUN: %hardlink-or-copy(from: %swift_driver_plain, to: %t/DISTINCTIVE-WINDOWS-PATH/usr/bin/swiftc)
2+
// RUN: %hardlink-or-copy(from: %swift_frontend_plain, to: %t/DISTINCTIVE-WINDOWS-PATH/usr/bin/swiftc)
33
// RUN: env PATH= %t/DISTINCTIVE-WINDOWS-PATH/usr/bin/swiftc -target x86_64-unknown-windows-msvc -### -module-name link -emit-library %s 2>&1 | %FileCheck %s
44
// CHECK: {{^}}clang

test/lit.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,8 @@ config.substitutions.append( ('%{python}', sys.executable) )
381381
config.substitutions.append( ('%mcp_opt', mcp_opt) )
382382
config.substitutions.append( ('%swift_driver_plain', "%r" % config.swift) )
383383
config.substitutions.append( ('%swiftc_driver_plain', "%r" % config.swiftc) )
384+
config.substitutions.append( ('%swift_frontend_plain', "%r" % config.swift_frontend))
385+
384386
if kIsWindows:
385387
config.substitutions.append( ('%swift_driver',
386388
"%r %s %s %s -libc %s" % (config.swift, mcp_opt,

0 commit comments

Comments
 (0)