Skip to content

Commit c2ce6c5

Browse files
Add Tests to check if adding space doesn't break invocation
1 parent 4f5cb6a commit c2ce6c5

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/Driver/linker.swift

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
// RUN: %swiftc_driver -sdk "" -driver-print-jobs -target x86_64-unknown-linux-gnu -Ffoo -Fsystem car -F cdr -framework bar -Lbaz -lboo -Xlinker -undefined %s 2>&1 > %t.linux.txt
2020
// RUN: %FileCheck -check-prefix LINUX-x86_64 %s < %t.linux.txt
2121

22+
// RUN: %swiftc_driver -sdk "" -driver-print-jobs -target x86_64-unknown-linux-gnu -Ffoo -Fsystem car -F cdr -framework bar -Lbaz -l boo -Xlinker -undefined %s 2>&1 > %t.linux.txt
23+
// RUN: %FileCheck -check-prefix LINUX-lib-flag-space %s < %t.linux.txt
24+
2225
// RUN: %swiftc_driver -sdk "" -driver-print-jobs -target armv6-unknown-linux-gnueabihf -Ffoo -Fsystem car -F cdr -framework bar -Lbaz -lboo -Xlinker -undefined %s 2>&1 > %t.linux.txt
2326
// RUN: %FileCheck -check-prefix LINUX-armv6 %s < %t.linux.txt
2427

@@ -217,6 +220,22 @@
217220
// LINUX-x86_64-DAG: -Xlinker -undefined
218221
// LINUX-x86_64: -o linker
219222

223+
// LINUX-lib-flag-space: swift
224+
// LINUX-lib-flag-space: -o [[OBJECTFILE:.*]]
225+
226+
// LINUX-lib-flag-space: clang{{(\.exe)?"? }}
227+
// LINUX-lib-flag-space-DAG: -pie
228+
// LINUX-lib-flag-space-DAG: [[OBJECTFILE]]
229+
// LINUX-lib-flag-space-DAG: -lswiftCore
230+
// LINUX-lib-flag-space-DAG: -L [[STDLIB_PATH:[^ ]+(/|\\\\)lib(/|\\\\)swift(/|\\\\)]]
231+
// LINUX-lib-flag-space-DAG: -Xlinker -rpath -Xlinker [[STDLIB_PATH]]
232+
// LINUX-lib-flag-space-DAG: -F foo -iframework car -F cdr
233+
// LINUX-lib-flag-space-DAG: -framework bar
234+
// LINUX-lib-flag-space-DAG: -L baz
235+
// LINUX-lib-flag-space-DAG: -lboo
236+
// LINUX-lib-flag-space-DAG: -Xlinker -undefined
237+
// LINUX-lib-flag-space: -o linker
238+
220239
// LINUX-armv6: swift
221240
// LINUX-armv6: -o [[OBJECTFILE:.*]]
222241

0 commit comments

Comments
 (0)