mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Fixing Driver tests on Windows (#20209)
This commit is contained in:
committed by
Jordan Rose
parent
a8f5502228
commit
4e0b092fbe
@@ -1,7 +1,7 @@
|
||||
// RUN: echo "{\"%s\": {\"object\": \"/build/obj/advanced_output_file_map.o\", \"swiftmodule\": \"/build/swiftmodule/advanced_output_file_map.swiftmodule\", \"swiftdoc\": "/build/swiftmodule/advanced_output_file_map_x.swiftdoc", \"diagnostics\": \"/build/dia/advanced_output_file_map.dia\", \"dependencies\": \"/build/d/advanced_output_file_map.d\"}, \"%S/Inputs/main.swift\": {\"object\": \"/build/obj/main.o\", \"swiftmodule\": \"/build/swiftmodule/main.swiftmodule\", \"swiftdoc\": "/build/swiftmodule/main_x.swiftdoc", \"diagnostics\": \"/build/dia/main.dia\", \"dependencies\": \"/build/d/main.d\"}, \"%S/Inputs/lib.swift\": {\"object\": \"/build/obj/lib.o\", \"swiftmodule\": \"/build/swiftmodule/lib.swiftmodule\", \"swiftdoc\": \"/build/swiftmodule/lib_x.swiftdoc\", \"diagnostics\": \"/build/dia/lib.dia\", \"dependencies\": \"/build/d/lib.d\"}}" > %t.json
|
||||
// RUN: echo "{\"%/s\": {\"object\": \"/build/obj/advanced_output_file_map.o\", \"swiftmodule\": \"/build/swiftmodule/advanced_output_file_map.swiftmodule\", \"swiftdoc\": "/build/swiftmodule/advanced_output_file_map_x.swiftdoc", \"diagnostics\": \"/build/dia/advanced_output_file_map.dia\", \"dependencies\": \"/build/d/advanced_output_file_map.d\"}, \"%/S/Inputs/main.swift\": {\"object\": \"/build/obj/main.o\", \"swiftmodule\": \"/build/swiftmodule/main.swiftmodule\", \"swiftdoc\": "/build/swiftmodule/main_x.swiftdoc", \"diagnostics\": \"/build/dia/main.dia\", \"dependencies\": \"/build/d/main.d\"}, \"%/S/Inputs/lib.swift\": {\"object\": \"/build/obj/lib.o\", \"swiftmodule\": \"/build/swiftmodule/lib.swiftmodule\", \"swiftdoc\": \"/build/swiftmodule/lib_x.swiftdoc\", \"diagnostics\": \"/build/dia/lib.dia\", \"dependencies\": \"/build/d/lib.d\"}}" > %t.json
|
||||
|
||||
// RUN: %swiftc_driver -driver-print-output-file-map -target x86_64-apple-macosx10.9 -emit-executable -emit-module -serialize-diagnostics %s %S/Inputs/main.swift %S/Inputs/lib.swift -g -o /build/advanced_output_file_map.out -emit-module-path /build/OutputFileMap.swiftmodule -module-name OutputFileMap -output-file-map %t.json 2>&1 | %FileCheck %s -check-prefix=DUMPOFM
|
||||
// RUN: %swiftc_driver -driver-print-bindings -target x86_64-apple-macosx10.9 -emit-executable -emit-module -serialize-diagnostics -emit-dependencies %s %S/Inputs/main.swift %S/Inputs/lib.swift -g -o /build/advanced_output_file_map.out -emit-module-path /build/OutputFileMap.swiftmodule -module-name OutputFileMap -output-file-map %t.json 2>&1 | %FileCheck %s -check-prefix=BINDINGS
|
||||
// RUN: %swiftc_driver -driver-print-output-file-map -target x86_64-apple-macosx10.9 -emit-executable -emit-module -serialize-diagnostics %/s %/S/Inputs/main.swift %/S/Inputs/lib.swift -g -o /build/advanced_output_file_map.out -emit-module-path /build/OutputFileMap.swiftmodule -module-name OutputFileMap -output-file-map %t.json 2>&1 | %FileCheck %/s -check-prefix=DUMPOFM
|
||||
// RUN: %swiftc_driver -driver-print-bindings -target x86_64-apple-macosx10.9 -emit-executable -emit-module -serialize-diagnostics -emit-dependencies %/s %/S/Inputs/main.swift %/S/Inputs/lib.swift -g -o /build/advanced_output_file_map.out -emit-module-path /build/OutputFileMap.swiftmodule -module-name OutputFileMap -output-file-map %t.json 2>&1 | %FileCheck %/s -check-prefix=BINDINGS
|
||||
|
||||
// DUMPOFM: {{.*}}/Inputs/lib.swift -> object: "/build/obj/lib.o"
|
||||
// DUMPOFM-NEXT: {{.*}}/Inputs/lib.swift -> dependencies: "/build/d/lib.d"
|
||||
@@ -19,9 +19,9 @@
|
||||
// DUMPOFM-NEXT: {{.*}}/advanced_output_file_map.swift -> swiftdoc: "/build/swiftmodule/advanced_output_file_map_x.swiftdoc"
|
||||
// DUMPOFM-NEXT: {{.*}}/advanced_output_file_map.swift -> diagnostics: "/build/dia/advanced_output_file_map.dia"
|
||||
|
||||
// BINDINGS: # "x86_64-apple-macosx10.9" - "swift", inputs: ["{{.*}}/advanced_output_file_map.swift"], output: {object: "/build/obj/advanced_output_file_map.o", dependencies: "/build/d/advanced_output_file_map.d", swiftmodule: "/build/swiftmodule/advanced_output_file_map.swiftmodule", swiftdoc: "/build/swiftmodule/advanced_output_file_map_x.swiftdoc", diagnostics: "/build/dia/advanced_output_file_map.dia"}
|
||||
// BINDINGS: # "x86_64-apple-macosx10.9" - "swift", inputs: ["{{.*}}/Inputs/main.swift"], output: {object: "/build/obj/main.o", dependencies: "/build/d/main.d", swiftmodule: "/build/swiftmodule/main.swiftmodule", swiftdoc: "/build/swiftmodule/main_x.swiftdoc", diagnostics: "/build/dia/main.dia"}
|
||||
// BINDINGS: # "x86_64-apple-macosx10.9" - "swift", inputs: ["{{.*}}/Inputs/lib.swift"], output: {object: "/build/obj/lib.o", dependencies: "/build/d/lib.d", swiftmodule: "/build/swiftmodule/lib.swiftmodule", swiftdoc: "/build/swiftmodule/lib_x.swiftdoc", diagnostics: "/build/dia/lib.dia"}
|
||||
// BINDINGS: # "x86_64-apple-macosx10.9" - "swift", inputs: ["/build/obj/advanced_output_file_map.o", "/build/obj/main.o", "/build/obj/lib.o"], output: {swiftmodule: "/build/OutputFileMap.swiftmodule", swiftdoc: "/build/OutputFileMap.swiftdoc"}
|
||||
// BINDINGS: # "x86_64-apple-macosx10.9" - "swift{{c?(\.EXE)?}}", inputs: ["{{.*}}/advanced_output_file_map.swift"], output: {object: "/build/obj/advanced_output_file_map.o", dependencies: "/build/d/advanced_output_file_map.d", swiftmodule: "/build/swiftmodule/advanced_output_file_map.swiftmodule", swiftdoc: "/build/swiftmodule/advanced_output_file_map_x.swiftdoc", diagnostics: "/build/dia/advanced_output_file_map.dia"}
|
||||
// BINDINGS: # "x86_64-apple-macosx10.9" - "swift{{c?(\.EXE)?}}", inputs: ["{{.*}}/Inputs/main.swift"], output: {object: "/build/obj/main.o", dependencies: "/build/d/main.d", swiftmodule: "/build/swiftmodule/main.swiftmodule", swiftdoc: "/build/swiftmodule/main_x.swiftdoc", diagnostics: "/build/dia/main.dia"}
|
||||
// BINDINGS: # "x86_64-apple-macosx10.9" - "swift{{c?(\.EXE)?}}", inputs: ["{{.*}}/Inputs/lib.swift"], output: {object: "/build/obj/lib.o", dependencies: "/build/d/lib.d", swiftmodule: "/build/swiftmodule/lib.swiftmodule", swiftdoc: "/build/swiftmodule/lib_x.swiftdoc", diagnostics: "/build/dia/lib.dia"}
|
||||
// BINDINGS: # "x86_64-apple-macosx10.9" - "swift{{c?(\.EXE)?}}", inputs: ["/build/obj/advanced_output_file_map.o", "/build/obj/main.o", "/build/obj/lib.o"], output: {swiftmodule: "/build/OutputFileMap.swiftmodule", swiftdoc: "/build/OutputFileMap.swiftdoc"}
|
||||
// BINDINGS: # "x86_64-apple-macosx10.9" - "ld", inputs: ["/build/obj/advanced_output_file_map.o", "/build/obj/main.o", "/build/obj/lib.o", "/build/OutputFileMap.swiftmodule"], output: {image: "/build/advanced_output_file_map.out"}
|
||||
// BINDINGS: # "x86_64-apple-macosx10.9" - "dsymutil", inputs: ["/build/advanced_output_file_map.out"], output: {dSYM: "/build/advanced_output_file_map.out.dSYM"}
|
||||
// BINDINGS: # "x86_64-apple-macosx10.9" - "dsymutil{{(\.exe)?}}", inputs: ["/build/advanced_output_file_map.out"], output: {dSYM: "/build/advanced_output_file_map.out.dSYM"}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
// RUN: echo "{\"%s\": {\"object\": \"/build/basic_output_file_map.o\"}, \"%S/Inputs/main.swift\": {\"object\": \"/build/main.o\"}, \"%S/Inputs/lib.swift\": {\"object\": \"/build/lib.o\"}}" > %t.json
|
||||
// RUN: echo "{\"%/s\": {\"object\": \"/build/basic_output_file_map.o\"}, \"%/S/Inputs/main.swift\": {\"object\": \"/build/main.o\"}, \"%/S/Inputs/lib.swift\": {\"object\": \"/build/lib.o\"}}" > %t.json
|
||||
|
||||
// RUN: %swiftc_driver -driver-print-output-file-map -target x86_64-apple-macosx10.9 -emit-executable %s %S/Inputs/main.swift %S/Inputs/lib.swift -o /build/basic_output_file_map.out -module-name OutputFileMap -output-file-map %t.json 2>&1 | %FileCheck %s -check-prefix=DUMPOFM
|
||||
// RUN: %swiftc_driver -driver-print-bindings -target x86_64-apple-macosx10.9 -emit-executable %s %S/Inputs/main.swift %S/Inputs/lib.swift -o /build/basic_output_file_map.out -module-name OutputFileMap -output-file-map %t.json 2>&1 | %FileCheck %s -check-prefix=BINDINGS
|
||||
// RUN: %swiftc_driver -driver-print-output-file-map -target x86_64-apple-macosx10.9 -emit-executable %/s %/S/Inputs/main.swift %/S/Inputs/lib.swift -o /build/basic_output_file_map.out -module-name OutputFileMap -output-file-map %t.json 2>&1 | %FileCheck %/s -check-prefix=DUMPOFM
|
||||
// RUN: %swiftc_driver -driver-print-bindings -target x86_64-apple-macosx10.9 -emit-executable %/s %/S/Inputs/main.swift %/S/Inputs/lib.swift -o /build/basic_output_file_map.out -module-name OutputFileMap -output-file-map %t.json 2>&1 | %FileCheck %/s -check-prefix=BINDINGS
|
||||
|
||||
// DUMPOFM: {{.*}}/Inputs/lib.swift -> object: "/build/lib.o"
|
||||
// DUMPOFM: {{.*}}/Inputs/main.swift -> object: "/build/main.o"
|
||||
// DUMPOFM: {{.*}}/basic_output_file_map.swift -> object: "/build/basic_output_file_map.o"
|
||||
|
||||
// BINDINGS: # "x86_64-apple-macosx10.9" - "swift", inputs: ["{{.*}}/basic_output_file_map.swift"], output: {object: "/build/basic_output_file_map.o"}
|
||||
// BINDINGS: # "x86_64-apple-macosx10.9" - "swift", inputs: ["{{.*}}/Inputs/main.swift"], output: {object: "/build/main.o"}
|
||||
// BINDINGS: # "x86_64-apple-macosx10.9" - "swift", inputs: ["{{.*}}/Inputs/lib.swift"], output: {object: "/build/lib.o"}
|
||||
// BINDINGS: # "x86_64-apple-macosx10.9" - "ld", inputs: ["/build/basic_output_file_map.o", "/build/main.o", "/build/lib.o"], output: {image: "/build/basic_output_file_map.out"}
|
||||
// BINDINGS: # "x86_64-apple-macosx10.9" - "swift{{c?(\.EXE)?}}", inputs: ["{{.*}}/basic_output_file_map.swift"], output: {object: "/build/basic_output_file_map.o"}
|
||||
// BINDINGS: # "x86_64-apple-macosx10.9" - "swift{{c?(\.EXE)?}}", inputs: ["{{.*}}/Inputs/main.swift"], output: {object: "/build/main.o"}
|
||||
// BINDINGS: # "x86_64-apple-macosx10.9" - "swift{{c?(\.EXE)?}}", inputs: ["{{.*}}/Inputs/lib.swift"], output: {object: "/build/lib.o"}
|
||||
// BINDINGS: # "x86_64-apple-macosx10.9" - "ld{{(\.exe)?}}", inputs: ["/build/basic_output_file_map.o", "/build/main.o", "/build/lib.o"], output: {image: "/build/basic_output_file_map.out"}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// Windows does not support batch-mode yet
|
||||
// XFAIL: win32
|
||||
//
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: touch %t/file-01.swift %t/file-02.swift %t/file-03.swift %t/file-04.swift %t/file-05.swift
|
||||
// RUN: touch %t/file-06.swift %t/file-07.swift %t/file-08.swift %t/file-09.swift %t/file-10.swift
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// Batch-mode is not supported on Windows yet
|
||||
// XFAIL: win32
|
||||
//
|
||||
// When multiple additional-outputs on the same command-line are no longer
|
||||
// supported (i.e. when we've moved to mandatory use of output file maps for
|
||||
// communicating multiple additional-outputs to frontends) this test will no
|
||||
@@ -12,9 +15,9 @@
|
||||
//
|
||||
// Each batch should get 3 primaries; check that each has 3 modules _in the same numeric order_.
|
||||
//
|
||||
// CHECK: {{.*}}/swift {{.*}}-primary-file {{[^ ]*}}/file-[[A1:[0-9]+]].swift {{.*}}-primary-file {{[^ ]*}}/file-[[A2:[0-9]+]].swift {{.*}}-primary-file {{[^ ]*}}/file-[[A3:[0-9]+]].swift
|
||||
// CHECK-SAME: -o {{.*}}/file-[[A1]]-{{[a-z0-9]+}}.swiftmodule -o {{.*}}/file-[[A2]]-{{[a-z0-9]+}}.swiftmodule -o {{.*}}/file-[[A3]]-{{[a-z0-9]+}}.swiftmodule
|
||||
// CHECK: {{.*}}/swift {{.*}}-primary-file {{[^ ]*}}/file-[[B1:[0-9]+]].swift {{.*}}-primary-file {{[^ ]*}}/file-[[B2:[0-9]+]].swift {{.*}}-primary-file {{[^ ]*}}/file-[[B3:[0-9]+]].swift
|
||||
// CHECK-SAME: -o {{.*}}/file-[[B1]]-{{[a-z0-9]+}}.swiftmodule -o {{.*}}/file-[[B2]]-{{[a-z0-9]+}}.swiftmodule -o {{.*}}/file-[[B3]]-{{[a-z0-9]+}}.swiftmodule
|
||||
// CHECK: {{.*}}/swift {{.*}}-primary-file {{[^ ]*}}/file-[[C1:[0-9]+]].swift {{.*}}-primary-file {{[^ ]*}}/file-[[C2:[0-9]+]].swift {{.*}}-primary-file {{[^ ]*}}/file-[[C3:[0-9]+]].swift
|
||||
// CHECK-SAME: -o {{.*}}/file-[[C1]]-{{[a-z0-9]+}}.swiftmodule -o {{.*}}/file-[[C2]]-{{[a-z0-9]+}}.swiftmodule -o {{.*}}/file-[[C3]]-{{[a-z0-9]+}}.swiftmodule
|
||||
// CHECK: {{.*[\\/]}}swift{{c?(\.EXE)?"?}} {{.*}}-primary-file {{[^ ]*[\\/]}}file-[[A1:[0-9]+]].swift{{"?}} {{.*}}-primary-file {{[^ ]*[\\/]}}file-[[A2:[0-9]+]].swift{{"?}} {{.*}}-primary-file {{[^ ]*[\\/]}}file-[[A3:[0-9]+]].swift{{"?}}
|
||||
// CHECK-SAME: -o {{.*[\\/]}}file-[[A1]]-{{[a-z0-9]+}}.swiftmodule{{"?}} -o {{.*[\\/]}}file-[[A2]]-{{[a-z0-9]+}}.swiftmodule{{"?}} -o {{.*[\\/]}}file-[[A3]]-{{[a-z0-9]+}}.swiftmodule{{"?}}
|
||||
// CHECK: {{.*[\\/]}}swift{{c?(\.EXE)?"?}} {{.*}}-primary-file {{[^ ]*[\\/]}}file-[[B1:[0-9]+]].swift{{"?}} {{.*}}-primary-file {{[^ ]*[\\/]}}file-[[B2:[0-9]+]].swift{{"?}} {{.*}}-primary-file {{[^ ]*[\\/]}}file-[[B3:[0-9]+]].swift{{"?}}
|
||||
// CHECK-SAME: -o {{.*[\\/]}}file-[[B1]]-{{[a-z0-9]+}}.swiftmodule{{"?}} -o {{.*[\\/]}}file-[[B2]]-{{[a-z0-9]+}}.swiftmodule{{"?}} -o {{.*[\\/]}}file-[[B3]]-{{[a-z0-9]+}}.swiftmodule{{"?}}
|
||||
// CHECK: {{.*[\\/]}}swift{{c?(\.EXE)?"?}} {{.*}}-primary-file {{[^ ]*[\\/]}}file-[[C1:[0-9]+]].swift{{"?}} {{.*}}-primary-file {{[^ ]*[\\/]}}file-[[C2:[0-9]+]].swift{{"?}} {{.*}}-primary-file {{[^ ]*[\\/]}}file-[[C3:[0-9]+]].swift{{"?}}
|
||||
// CHECK-SAME: -o {{.*[\\/]}}file-[[C1]]-{{[a-z0-9]+}}.swiftmodule{{"?}} -o {{.*[\\/]}}file-[[C2]]-{{[a-z0-9]+}}.swiftmodule{{"?}} -o {{.*[\\/]}}file-[[C3]]-{{[a-z0-9]+}}.swiftmodule{{"?}}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// XFAIL: win32
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: touch %t/file-01.swift %t/file-02.swift %t/file-03.swift
|
||||
// RUN: echo 'public func main() {}' >%t/main.swift
|
||||
@@ -18,7 +19,7 @@
|
||||
// RUN: %swiftc_driver -enable-bridging-pch -v -I %t -import-objc-header %t/foo-bridging-header.h -enable-batch-mode -c -emit-module -module-name main -j 2 %t/file-01.swift %t/file-02.swift %t/file-03.swift %t/main.swift -serialize-diagnostics %s 2>&1 | %FileCheck %s
|
||||
//
|
||||
// CHECK: -emit-pch
|
||||
// CHECK: -primary-file {{.*}}/file-01.swift -primary-file {{.*}}/file-02.swift
|
||||
// CHECK: -primary-file {{.*}}/file-01.swift{{"?}} -primary-file {{.*}}/file-02.swift{{"?}}
|
||||
|
||||
func bar() {
|
||||
print(foo)
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
// RUN: echo 'public func main() {}' >%t/main.swift
|
||||
//
|
||||
// First prime the incremental state, but note that we're building in the d c b a (reverse-alphabetical) order.
|
||||
// RUN: (cd %t && %swiftc_driver -enable-batch-mode -incremental -output-file-map %S/Inputs/abcd_filemap.yaml -module-name main -j 1 d.swift c.swift b.swift a.swift main.swift)
|
||||
// RUN: cd %t && %swiftc_driver -enable-batch-mode -incremental -output-file-map %S/Inputs/abcd_filemap.yaml -module-name main -j 1 d.swift c.swift b.swift a.swift main.swift
|
||||
//
|
||||
// Now perturb the interface of a.swift and delete its output
|
||||
// RUN: echo 'class a { var x : Int = 10 }' >%t/a.swift
|
||||
// RUN: rm %t/a.o
|
||||
//
|
||||
// Now rebuild, which will rebuild a.swift then do a cascading dep-graph invalidation
|
||||
// RUN: (cd %t && %swiftc_driver -enable-batch-mode -incremental -output-file-map %S/Inputs/abcd_filemap.yaml -module-name main -j 1 d.swift c.swift b.swift a.swift main.swift -driver-show-incremental -driver-show-job-lifecycle) >%t/out.txt 2>&1
|
||||
// RUN: cd %t && %swiftc_driver -enable-batch-mode -incremental -output-file-map %S/Inputs/abcd_filemap.yaml -module-name main -j 1 d.swift c.swift b.swift a.swift main.swift -driver-show-incremental -driver-show-job-lifecycle >%t/out.txt 2>&1
|
||||
// RUN: %FileCheck %s <%t/out.txt
|
||||
//
|
||||
// Check that we saw invalidation happen in alphabetic order
|
||||
|
||||
@@ -9,40 +9,40 @@
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "kind": "began",
|
||||
// CHECK-NEXT: "name": "compile",
|
||||
// CHECK-NEXT: "command": "{{.*}}/swift{{c?}} -frontend -c -primary-file {{.*}}/file-01.swift {{.*}}/file-02.swift {{.*}}/file-03.swift {{.*}}/main.swift -emit-module-path {{.*}}/file-01-[[MODULE01:[a-z0-9]+]].swiftmodule -emit-module-doc-path {{.*}}/file-01-[[SWIFTDOC01:[a-z0-9]+]].swiftdoc {{.*}} -module-name main -o {{.*}}/file-01-[[OBJ01:[a-z0-9]+]].o",
|
||||
// CHECK-NEXT: "command_executable": "{{.*}}/swift{{c?}}",
|
||||
// CHECK-NEXT: "command": "{{.*[\\/]}}swift{{c?(\.EXE)?(\\")?}} -frontend -c -primary-file {{.*}}/file-01.swift{{(\\")?}} {{.*}}file-02.swift{{(\\")?}} {{.*}}file-03.swift{{(\\")?}} {{.*}}main.swift{{(\\")?}} -emit-module-path {{.*}}file-01-[[MODULE01:[a-z0-9]+]].swiftmodule{{(\\")?}} -emit-module-doc-path {{.*}}file-01-[[SWIFTDOC01:[a-z0-9]+]].swiftdoc{{(\\")?}} {{.*}} -module-name main -o {{.*}}file-01-[[OBJ01:[a-z0-9]+]].o{{(\\")?}}",
|
||||
// CHECK-NEXT: "command_executable": "{{.*[\\/]}}swift{{c?(\.EXE)?}}",
|
||||
// CHECK-NEXT: "command_arguments": [
|
||||
// CHECK-NEXT: "-frontend",
|
||||
// CHECK-NEXT: "-c",
|
||||
// CHECK-NEXT: "-primary-file",
|
||||
// CHECK-NEXT: "{{.*}}/file-01.swift",
|
||||
// CHECK-NEXT: "{{.*}}/file-02.swift",
|
||||
// CHECK-NEXT: "{{.*}}/file-03.swift",
|
||||
// CHECK-NEXT: "{{.*}}/main.swift",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}file-01.swift",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}file-02.swift",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}file-03.swift",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}main.swift",
|
||||
// CHECK-NEXT: "-emit-module-path",
|
||||
// CHECK-NEXT: "{{.*}}/file-01-[[MODULE01:[a-z0-9]+]].swiftmodule",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}file-01-[[MODULE01:[a-z0-9]+]].swiftmodule",
|
||||
// CHECK-NEXT: "-emit-module-doc-path",
|
||||
// CHECK-NEXT: "{{.*}}/file-01-[[SWIFTDOC01:[a-z0-9]+]].swiftdoc",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}file-01-[[SWIFTDOC01:[a-z0-9]+]].swiftdoc",
|
||||
// CHECK: "-module-name",
|
||||
// CHECK-NEXT: "main",
|
||||
// CHECK-NEXT: "-o",
|
||||
// CHECK-NEXT: "{{.*}}/file-01-[[OBJ01:[a-z0-9]+]].o"
|
||||
// CHECK-NEXT: "{{.*[\\/]}}file-01-[[OBJ01:[a-z0-9]+]].o"
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "inputs": [
|
||||
// CHECK-NEXT: "{{.*}}/file-01.swift"
|
||||
// CHECK-NEXT: "{{.*[\\/]}}file-01.swift"
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "outputs": [
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "object",
|
||||
// CHECK-NEXT: "path": "{{.*}}/file-01-[[OBJ01]].o"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}file-01-[[OBJ01]].o"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "swiftmodule",
|
||||
// CHECK-NEXT: "path": "{{.*}}/file-01-[[MODULE01]].swiftmodule"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}file-01-[[MODULE01]].swiftmodule"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "swiftdoc",
|
||||
// CHECK-NEXT: "path": "{{.*}}/file-01-[[SWIFTDOC01]].swiftdoc"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}file-01-[[SWIFTDOC01]].swiftdoc"
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "pid": -{{[1-9][0-9]*}},
|
||||
@@ -54,40 +54,40 @@
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "kind": "began",
|
||||
// CHECK-NEXT: "name": "compile",
|
||||
// CHECK-NEXT: "command": "{{.*}}/swift{{c?}} -frontend -c {{.*}}/file-01.swift -primary-file {{.*}}/file-02.swift {{.*}}/file-03.swift {{.*}}/main.swift -emit-module-path {{.*}}/file-02-[[MODULE02:[a-z0-9]+]].swiftmodule -emit-module-doc-path {{.*}}/file-02-[[SWIFTDOC02:[a-z0-9]+]].swiftdoc {{.*}} -module-name main -o {{.*}}/file-02-[[OBJ02:[a-z0-9]+]].o",
|
||||
// CHECK-NEXT: "command_executable": "{{.*}}/swift{{c?}}",
|
||||
// CHECK-NEXT: "command": "{{.*[\\/]}}swift{{c?(\.EXE)?(\\")?}} -frontend -c {{.*}}file-01.swift{{(\\")?}} -primary-file {{.*}}file-02.swift{{(\\")?}} {{.*}}file-03.swift{{(\\")?}} {{.*}}main.swift{{(\\")?}} -emit-module-path {{.*}}file-02-[[MODULE02:[a-z0-9]+]].swiftmodule{{(\\")?}} -emit-module-doc-path {{.*}}file-02-[[SWIFTDOC02:[a-z0-9]+]].swiftdoc{{(\\")?}} {{.*}} -module-name main -o {{.*}}file-02-[[OBJ02:[a-z0-9]+]].o{{(\\")?}}",
|
||||
// CHECK-NEXT: "command_executable": "{{.*[\\/]}}swift{{c?(\.EXE)?(\\")?}}",
|
||||
// CHECK-NEXT: "command_arguments": [
|
||||
// CHECK-NEXT: "-frontend",
|
||||
// CHECK-NEXT: "-c",
|
||||
// CHECK-NEXT: "{{.*}}/file-01.swift",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}file-01.swift",
|
||||
// CHECK-NEXT: "-primary-file",
|
||||
// CHECK-NEXT: "{{.*}}/file-02.swift",
|
||||
// CHECK-NEXT: "{{.*}}/file-03.swift",
|
||||
// CHECK-NEXT: "{{.*}}/main.swift",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}file-02.swift",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}file-03.swift",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}main.swift",
|
||||
// CHECK-NEXT: "-emit-module-path",
|
||||
// CHECK-NEXT: "{{.*}}/file-02-[[MODULE02:[a-z0-9]+]].swiftmodule",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}file-02-[[MODULE02:[a-z0-9]+]].swiftmodule",
|
||||
// CHECK-NEXT: "-emit-module-doc-path",
|
||||
// CHECK-NEXT: "{{.*}}/file-02-[[SWIFTDOC02:[a-z0-9]+]].swiftdoc",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}file-02-[[SWIFTDOC02:[a-z0-9]+]].swiftdoc",
|
||||
// CHECK: "-module-name",
|
||||
// CHECK-NEXT: "main",
|
||||
// CHECK-NEXT: "-o",
|
||||
// CHECK-NEXT: "{{.*}}/file-02-[[OBJ02:[a-z0-9]+]].o"
|
||||
// CHECK-NEXT: "{{.*[\\/]}}file-02-[[OBJ02:[a-z0-9]+]].o"
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "inputs": [
|
||||
// CHECK-NEXT: "{{.*}}/file-02.swift"
|
||||
// CHECK-NEXT: "{{.*[\\/]}}file-02.swift"
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "outputs": [
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "object",
|
||||
// CHECK-NEXT: "path": "{{.*}}/file-02-[[OBJ02]].o"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}file-02-[[OBJ02]].o"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "swiftmodule",
|
||||
// CHECK-NEXT: "path": "{{.*}}/file-02-[[MODULE02]].swiftmodule"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}file-02-[[MODULE02]].swiftmodule"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "swiftdoc",
|
||||
// CHECK-NEXT: "path": "{{.*}}/file-02-[[SWIFTDOC02]].swiftdoc"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}file-02-[[SWIFTDOC02]].swiftdoc"
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "pid": -{{[1-9][0-9]*}},
|
||||
@@ -99,8 +99,8 @@
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "kind": "began",
|
||||
// CHECK-NEXT: "name": "compile",
|
||||
// CHECK-NEXT: "command": "{{.*}}/swift{{c?}} -frontend -c {{.*}}/file-01.swift {{.*}}/file-02.swift -primary-file {{.*}}/file-03.swift {{.*}}/main.swift -emit-module-path {{.*}}/file-03-[[MODULE03:[a-z0-9]+]].swiftmodule -emit-module-doc-path {{.*}}/file-03-[[SWIFTDOC03:[a-z0-9]+]].swiftdoc {{.*}} -module-name main -o {{.*}}/file-03-[[OBJ03:[a-z0-9]+]].o",
|
||||
// CHECK-NEXT: "command_executable": "{{.*}}/swift{{c?}}",
|
||||
// CHECK-NEXT: "command": "{{.*}}swift{{c?(\.EXE)?(\\")?}} -frontend -c {{.*}}file-01.swift{{(\\")?}} {{.*}}file-02.swift{{(\\")?}} -primary-file {{.*}}file-03.swift{{(\\")?}} {{.*}}main.swift{{(\\")?}} -emit-module-path {{.*}}file-03-[[MODULE03:[a-z0-9]+]].swiftmodule{{(\\")?}} -emit-module-doc-path {{.*}}file-03-[[SWIFTDOC03:[a-z0-9]+]].swiftdoc{{(\\")?}} {{.*}} -module-name main -o {{.*}}file-03-[[OBJ03:[a-z0-9]+]].o{{(\\")?}}",
|
||||
// CHECK-NEXT: "command_executable": "{{.*[\\/]}}swift{{c?(\.EXE)?}}",
|
||||
// CHECK-NEXT: "command_arguments": [
|
||||
// CHECK-NEXT: "-frontend",
|
||||
// CHECK-NEXT: "-c",
|
||||
@@ -110,29 +110,29 @@
|
||||
// CHECK-NEXT: "{{.*}}/file-03.swift",
|
||||
// CHECK-NEXT: "{{.*}}/main.swift",
|
||||
// CHECK-NEXT: "-emit-module-path",
|
||||
// CHECK-NEXT: "{{.*}}/file-03-[[MODULE03:[a-z0-9]+]].swiftmodule",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}file-03-[[MODULE03:[a-z0-9]+]].swiftmodule",
|
||||
// CHECK-NEXT: "-emit-module-doc-path",
|
||||
// CHECK-NEXT: "{{.*}}/file-03-[[SWIFTDOC03:[a-z0-9]+]].swiftdoc",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}file-03-[[SWIFTDOC03:[a-z0-9]+]].swiftdoc",
|
||||
// CHECK: "-module-name",
|
||||
// CHECK-NEXT: "main",
|
||||
// CHECK-NEXT: "-o",
|
||||
// CHECK-NEXT: "{{.*}}/file-03-[[OBJ03:[a-z0-9]+]].o"
|
||||
// CHECK-NEXT: "{{.*[\\/]}}file-03-[[OBJ03:[a-z0-9]+]].o"
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "inputs": [
|
||||
// CHECK-NEXT: "{{.*}}/file-03.swift"
|
||||
// CHECK-NEXT: "{{.*[\\/]}}file-03.swift"
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "outputs": [
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "object",
|
||||
// CHECK-NEXT: "path": "{{.*}}/file-03-[[OBJ03]].o"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}file-03-[[OBJ03]].o"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "swiftmodule",
|
||||
// CHECK-NEXT: "path": "{{.*}}/file-03-[[MODULE03]].swiftmodule"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}file-03-[[MODULE03]].swiftmodule"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "swiftdoc",
|
||||
// CHECK-NEXT: "path": "{{.*}}/file-03-[[SWIFTDOC03]].swiftdoc"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}file-03-[[SWIFTDOC03]].swiftdoc"
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "pid": -{{[1-9][0-9]*}},
|
||||
@@ -144,40 +144,40 @@
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "kind": "began",
|
||||
// CHECK-NEXT: "name": "compile",
|
||||
// CHECK-NEXT: "command": "{{.*}}/swift{{c?}} -frontend -c {{.*}}/file-01.swift {{.*}}/file-02.swift {{.*}}/file-03.swift -primary-file {{.*}}/main.swift -emit-module-path {{.*}}/main-[[MODULEMAIN:[a-z0-9]+]].swiftmodule -emit-module-doc-path {{.*}}/main-[[SWIFTDOCMAIN:[a-z0-9]+]].swiftdoc {{.*}} -module-name main -o {{.*}}/main-[[OBJMAIN:[a-z0-9]+]].o",
|
||||
// CHECK-NEXT: "command_executable": "{{.*}}/swift{{c?}}",
|
||||
// CHECK-NEXT: "command": "{{.*[\\/]}}swift{{c?(\.EXE)?(\\")?}} -frontend -c {{.*[\\/]}}file-01.swift{{(\\")?}} {{.*[\\/]}}file-02.swift{{(\\")?}} {{.*[\\/]}}file-03.swift{{(\\")?}} -primary-file {{.*[\\/]}}main.swift{{(\\")?}} -emit-module-path {{.*[\\/]}}main-[[MODULEMAIN:[a-z0-9]+]].swiftmodule{{(\\")?}} -emit-module-doc-path {{.*[\\/]}}main-[[SWIFTDOCMAIN:[a-z0-9]+]].swiftdoc{{(\\")?}} {{.*}} -module-name main -o {{.*[\\/]}}main-[[OBJMAIN:[a-z0-9]+]].o{{(\\")?}}",
|
||||
// CHECK-NEXT: "command_executable": "{{.*[\\/]}}swift{{c?(\.EXE)?}}",
|
||||
// CHECK-NEXT: "command_arguments": [
|
||||
// CHECK-NEXT: "-frontend",
|
||||
// CHECK-NEXT: "-c",
|
||||
// CHECK-NEXT: "{{.*}}/file-01.swift",
|
||||
// CHECK-NEXT: "{{.*}}/file-02.swift",
|
||||
// CHECK-NEXT: "{{.*}}/file-03.swift",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}file-01.swift",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}file-02.swift",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}file-03.swift",
|
||||
// CHECK-NEXT: "-primary-file",
|
||||
// CHECK-NEXT: "{{.*}}/main.swift",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}main.swift",
|
||||
// CHECK-NEXT: "-emit-module-path",
|
||||
// CHECK-NEXT: "{{.*}}/main-[[MODULEMAIN:[a-z0-9]+]].swiftmodule",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}main-[[MODULEMAIN:[a-z0-9]+]].swiftmodule",
|
||||
// CHECK-NEXT: "-emit-module-doc-path",
|
||||
// CHECK-NEXT: "{{.*}}/main-[[SWIFTDOCMAIN:[a-z0-9]+]].swiftdoc",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}main-[[SWIFTDOCMAIN:[a-z0-9]+]].swiftdoc",
|
||||
// CHECK: "-module-name",
|
||||
// CHECK-NEXT: "main",
|
||||
// CHECK-NEXT: "-o",
|
||||
// CHECK-NEXT: "{{.*}}/main-[[OBJMAIN:[a-z0-9]+]].o"
|
||||
// CHECK-NEXT: "{{.*[\\/]}}main-[[OBJMAIN:[a-z0-9]+]].o"
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "inputs": [
|
||||
// CHECK-NEXT: "{{.*}}/main.swift"
|
||||
// CHECK-NEXT: "{{.*[\\/]}}main.swift"
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "outputs": [
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "object",
|
||||
// CHECK-NEXT: "path": "{{.*}}/main-[[OBJMAIN]].o"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}main-[[OBJMAIN]].o"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "swiftmodule",
|
||||
// CHECK-NEXT: "path": "{{.*}}/main-[[MODULEMAIN]].swiftmodule"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}main-[[MODULEMAIN]].swiftmodule"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "swiftdoc",
|
||||
// CHECK-NEXT: "path": "{{.*}}/main-[[SWIFTDOCMAIN]].swiftdoc"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}main-[[SWIFTDOCMAIN]].swiftdoc"
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "pid": -{{[1-9][0-9]*}},
|
||||
@@ -233,16 +233,16 @@
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "kind": "began",
|
||||
// CHECK-NEXT: "name": "merge-module",
|
||||
// CHECK-NEXT: "command": "{{.*}}/swift{{c?}} -frontend -merge-modules -emit-module {{.*}}/file-01-[[MODULE01]].swiftmodule {{.*}}/file-02-[[MODULE02]].swiftmodule {{.*}}/file-03-[[MODULE03]].swiftmodule {{.*}}/main-[[MODULEMAIN]].swiftmodule {{.*}} -emit-module-doc-path main.swiftdoc -module-name main -o main.swiftmodule",
|
||||
// CHECK-NEXT: "command_executable": "{{.*}}/swift{{c?}}",
|
||||
// CHECK-NEXT: "command": "{{.*[\\/]}}swift{{c?(\.EXE)?(\\")?}} -frontend -merge-modules -emit-module {{.*[\\/]}}file-01-[[MODULE01]].swiftmodule{{(\\")?}} {{.*[\\/]}}file-02-[[MODULE02]].swiftmodule{{(\\")?}} {{.*[\\/]}}file-03-[[MODULE03]].swiftmodule{{(\\")?}} {{.*[\\/]}}main-[[MODULEMAIN]].swiftmodule{{(\\")?}} {{.*}} -emit-module-doc-path main.swiftdoc -module-name main -o main.swiftmodule",
|
||||
// CHECK-NEXT: "command_executable": "{{.*[\\/]}}swift{{c?(\.EXE)?}}",
|
||||
// CHECK-NEXT: "command_arguments": [
|
||||
// CHECK-NEXT: "-frontend",
|
||||
// CHECK-NEXT: "-merge-modules",
|
||||
// CHECK-NEXT: "-emit-module",
|
||||
// CHECK-NEXT: "{{.*}}/file-01-[[MODULE01]].swiftmodule",
|
||||
// CHECK-NEXT: "{{.*}}/file-02-[[MODULE02]].swiftmodule",
|
||||
// CHECK-NEXT: "{{.*}}/file-03-[[MODULE03]].swiftmodule",
|
||||
// CHECK-NEXT: "{{.*}}/main-[[MODULEMAIN]].swiftmodule",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}file-01-[[MODULE01]].swiftmodule",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}file-02-[[MODULE02]].swiftmodule",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}file-03-[[MODULE03]].swiftmodule",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}main-[[MODULEMAIN]].swiftmodule",
|
||||
// CHECK: "-emit-module-doc-path",
|
||||
// CHECK-NEXT: "main.swiftdoc",
|
||||
// CHECK-NEXT: "-module-name",
|
||||
@@ -251,10 +251,10 @@
|
||||
// CHECK-NEXT: "main.swiftmodule"
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "inputs": [
|
||||
// CHECK-NEXT: "{{.*}}/file-01-[[OBJ01]].o",
|
||||
// CHECK-NEXT: "{{.*}}/file-02-[[OBJ02]].o",
|
||||
// CHECK-NEXT: "{{.*}}/file-03-[[OBJ03]].o",
|
||||
// CHECK-NEXT: "{{.*}}/main-[[OBJMAIN]].o"
|
||||
// CHECK-NEXT: "{{.*[\\/]}}file-01-[[OBJ01]].o",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}file-02-[[OBJ02]].o",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}file-03-[[OBJ03]].o",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}main-[[OBJMAIN]].o"
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "outputs": [
|
||||
// CHECK-NEXT: {
|
||||
|
||||
@@ -15,5 +15,5 @@
|
||||
// RUN: %FileCheck %s -allow-empty -check-prefix=NEGATIVE-CHECK-COMBINED <%t/stderr1
|
||||
// RUN: %FileCheck %s -allow-empty -check-prefix=NEGATIVE-CHECK-COMBINED <%t/stderr2
|
||||
//
|
||||
// CHECK-COMBINED: -primary-file {{.*}}/file-01.swift -primary-file {{.*}}/file-02.swift {{.*}}/file-03.swift {{.*}}/main.swift
|
||||
// NEGATIVE-CHECK-COMBINED-NOT: -primary-file {{.*}}/file-01.swift -primary-file {{.*}}/file-02.swift {{.*}}/file-03.swift {{.*}}/main.swift
|
||||
// CHECK-COMBINED: -primary-file {{.*(/|\\)}}file-01.swift{{"?}} -primary-file {{.*(/|\\)}}file-02.swift{{"?}} {{.*(/|\\)}}file-03.swift{{"?}} {{.*(/|\\)}}main.swift{{"?}}
|
||||
// NEGATIVE-CHECK-COMBINED-NOT: -primary-file {{.*(/|\\)}}file-01.swift{{"?}} -primary-file {{.*(/|\\)}}file-02.swift{{"?}} {{.*(/|\\)}}file-03.swift{{"?}} {{.*(/|\\)}}main.swift{{"?}}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Ensure that driver does not issue a remark iff in batch mode. (The remark has been removed.)
|
||||
// Ensure that driver does not issue a remark iff in batch mode. (The remark has been removed.)
|
||||
//
|
||||
// RUN: %swiftc_driver -whole-module-optimization -enable-batch-mode %S/../Inputs/empty.swift -### 2>&1 >/dev/null | %FileCheck %s
|
||||
// RUN: %swiftc_driver %S/../Inputs/empty.swift -### 2>&1 >/dev/null | %FileCheck -allow-empty %s
|
||||
|
||||
@@ -35,4 +35,4 @@
|
||||
// RUN: %swiftc_driver %t/a.swift %t/b.swift %t/c.swift -num-threads 4 -whole-module-optimization -enable-batch-mode -### >%t/stdout_mt_wmo 2>%t/stderr_mt_wmo
|
||||
// RUN: %FileCheck --check-prefix CHECK-WMO %s <%t/stderr_mt_wmo
|
||||
// RUN: %FileCheck --check-prefix CHECK-MULTITHREADED-WMO-ARGS %s <%t/stdout_mt_wmo
|
||||
// CHECK-MULTITHREADED-WMO-ARGS: -num-threads 4 {{.*}}-o {{.*}}/a-{{[a-z0-9]+}}.o -o {{.*}}/b-{{[a-z0-9]+}}.o -o {{.*}}/c-{{[a-z0-9]+}}.o
|
||||
// CHECK-MULTITHREADED-WMO-ARGS: -num-threads 4 {{.*}}-o {{.*(/|\\)}}a-{{[a-z0-9]+}}.o{{"?}} -o {{.*(/|\\)}}b-{{[a-z0-9]+}}.o{{"?}} -o {{.*(/|\\)}}c-{{[a-z0-9]+}}.o{{"?}}
|
||||
|
||||
@@ -6,4 +6,4 @@
|
||||
//
|
||||
// RUN: %swiftc_driver -enable-batch-mode -driver-filelist-threshold=0 -j2 %t/main.swift %t/file-01.swift %t/file-02.swift %t/file-03.swift -o %t/file-01.o -o %t/file-02.o -o %t/file-03.o -### | %FileCheck %s -check-prefix=CHECK-SUPPLEMENTARY-OUTPUT-FILELIST
|
||||
//
|
||||
// CHECK-SUPPLEMENTARY-OUTPUT-FILELIST: -supplementary-output-file-map {{.*}}/supplementaryOutputs-
|
||||
// CHECK-SUPPLEMENTARY-OUTPUT-FILELIST: -supplementary-output-file-map {{.*(/|\\)}}supplementaryOutputs-
|
||||
|
||||
@@ -5,5 +5,5 @@
|
||||
// If the supplementary output file map does not escape the characters in the
|
||||
// source files, the frontend won't recognize the desired outputs.
|
||||
//
|
||||
// RUN: (cd %t && %target-build-swift -c -emit-dependencies -serialize-diagnostics -driver-filelist-threshold=0 -j2 main.swift 𝔼-file-01.swift 😂-file-02.swift Ω-file-03.swift -module-name mod)
|
||||
// RUN: (cd %t && test -e 😂-file-02.d -a -e 😂-file-02.dia -a -e 😂-file-02.o -a -e 😂-file-02.swift -a -e 𝔼-file-01.d -a -e 𝔼-file-01.dia -a -e 𝔼-file-01.o -a -e 𝔼-file-01.swift -a -e main.d -a -e main.dia -a -e Ω-file-03.d -a -e Ω-file-03.dia -a -e Ω-file-03.o -a -e Ω-file-03.swift)
|
||||
// RUN: cd %t && %target-build-swift -c -emit-dependencies -serialize-diagnostics -driver-filelist-threshold=0 -j2 main.swift 𝔼-file-01.swift 😂-file-02.swift Ω-file-03.swift -module-name mod
|
||||
// RUN: cd %t && test -e 😂-file-02.d -a -e 😂-file-02.dia -a -e 😂-file-02.o -a -e 😂-file-02.swift -a -e 𝔼-file-01.d -a -e 𝔼-file-01.dia -a -e 𝔼-file-01.o -a -e 𝔼-file-01.swift -a -e main.d -a -e main.dia -a -e Ω-file-03.d -a -e Ω-file-03.dia -a -e Ω-file-03.o -a -e Ω-file-03.swift
|
||||
|
||||
@@ -1,47 +1,47 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
|
||||
// RUN: %swiftc_driver -driver-print-bindings -target x86_64-apple-macosx10.9 %s 2>&1 | %FileCheck %s -check-prefix=BASIC
|
||||
// BASIC: # "x86_64-apple-macosx10.9" - "swift", inputs: ["{{.*}}bindings.swift"], output: {object: "[[OBJECT:.*\.o]]"}
|
||||
// RUN: %swiftc_driver -driver-print-bindings -target x86_64-apple-macosx10.9 %/s 2>&1 | %FileCheck %s -check-prefix=BASIC
|
||||
// BASIC: # "x86_64-apple-macosx10.9" - "swift{{c?(\.EXE)?}}", inputs: ["{{.*}}bindings.swift"], output: {object: "[[OBJECT:.*\.o]]"}
|
||||
// BASIC: # "x86_64-apple-macosx10.9" - "ld", inputs: ["[[OBJECT]]"], output: {image: "bindings"}
|
||||
|
||||
// RUN: %swiftc_driver -driver-print-bindings -target x86_64-apple-macosx10.9 - 2>&1 | %FileCheck %s -check-prefix=STDIN
|
||||
// STDIN: # "x86_64-apple-macosx10.9" - "swift", inputs: ["-"], output: {object: "[[OBJECT:.*\.o]]"}
|
||||
// STDIN: # "x86_64-apple-macosx10.9" - "swift{{c?(\.EXE)?}}", inputs: ["-"], output: {object: "[[OBJECT:.*\.o]]"}
|
||||
// STDIN: # "x86_64-apple-macosx10.9" - "ld", inputs: ["[[OBJECT]]"], output: {image: "main"}
|
||||
|
||||
// RUN: %swiftc_driver -driver-print-bindings -target x86_64-apple-macosx10.9 %S/Inputs/invalid-module-name.swift 2>&1 | %FileCheck %s -check-prefix=INVALID-NAME-SINGLE-FILE
|
||||
// INVALID-NAME-SINGLE-FILE: # "x86_64-apple-macosx10.9" - "swift", inputs: ["{{.*}}/Inputs/invalid-module-name.swift"], output: {object: "[[OBJECT:.*\.o]]"}
|
||||
// RUN: %swiftc_driver -driver-print-bindings -target x86_64-apple-macosx10.9 %/S/Inputs/invalid-module-name.swift 2>&1 | %FileCheck %s -check-prefix=INVALID-NAME-SINGLE-FILE
|
||||
// INVALID-NAME-SINGLE-FILE: # "x86_64-apple-macosx10.9" - "swift{{c?(\.EXE)?}}", inputs: ["{{.*}}/Inputs/invalid-module-name.swift"], output: {object: "[[OBJECT:.*\.o]]"}
|
||||
// INVALID-NAME-SINGLE-FILE: # "x86_64-apple-macosx10.9" - "ld", inputs: ["[[OBJECT]]"], output: {image: "invalid-module-name"}
|
||||
|
||||
// RUN: %swiftc_driver -driver-print-bindings -target x86_64-apple-macosx10.9 -o NamedOutput %s 2>&1 | %FileCheck %s -check-prefix=NAMEDIMG
|
||||
// RUN: %swiftc_driver -driver-print-bindings -target x86_64-apple-macosx10.9 -module-name NamedOutput %s 2>&1 | %FileCheck %s -check-prefix=NAMEDIMG
|
||||
// NAMEDIMG: # "x86_64-apple-macosx10.9" - "swift", inputs: ["{{.*}}bindings.swift"], output: {object: "[[OBJECT:.*\.o]]"}
|
||||
// RUN: %swiftc_driver -driver-print-bindings -target x86_64-apple-macosx10.9 -o NamedOutput %/s 2>&1 | %FileCheck %s -check-prefix=NAMEDIMG
|
||||
// RUN: %swiftc_driver -driver-print-bindings -target x86_64-apple-macosx10.9 -module-name NamedOutput %/s 2>&1 | %FileCheck %s -check-prefix=NAMEDIMG
|
||||
// NAMEDIMG: # "x86_64-apple-macosx10.9" - "swift{{c?(\.EXE)?}}", inputs: ["{{.*}}bindings.swift"], output: {object: "[[OBJECT:.*\.o]]"}
|
||||
// NAMEDIMG: # "x86_64-apple-macosx10.9" - "ld", inputs: ["[[OBJECT]]"], output: {image: "NamedOutput"}
|
||||
|
||||
// RUN: %swiftc_driver -driver-print-bindings -target x86_64-apple-macosx10.9 -c %s 2>&1 | %FileCheck %s -check-prefix=OBJ
|
||||
// OBJ: # "x86_64-apple-macosx10.9" - "swift", inputs: ["{{.*}}bindings.swift"], output: {object: "bindings.o"}
|
||||
// RUN: %swiftc_driver -driver-print-bindings -target x86_64-apple-macosx10.9 -c %/s 2>&1 | %FileCheck %s -check-prefix=OBJ
|
||||
// OBJ: # "x86_64-apple-macosx10.9" - "swift{{c?(\.EXE)?}}", inputs: ["{{.*}}bindings.swift"], output: {object: "bindings.o"}
|
||||
|
||||
// RUN: %swiftc_driver -driver-print-bindings -target x86_64-apple-macosx10.9 -c %s -o /build/bindings.o 2>&1 | %FileCheck %s -check-prefix=NAMEDOBJ
|
||||
// NAMEDOBJ: # "x86_64-apple-macosx10.9" - "swift", inputs: ["{{.*}}bindings.swift"], output: {object: "/build/bindings.o"}
|
||||
// RUN: %swiftc_driver -driver-print-bindings -target x86_64-apple-macosx10.9 -c %/s -o /build/bindings.o 2>&1 | %FileCheck %s -check-prefix=NAMEDOBJ
|
||||
// NAMEDOBJ: # "x86_64-apple-macosx10.9" - "swift{{c?(\.EXE)?}}", inputs: ["{{.*}}bindings.swift"], output: {object: "/build/bindings.o"}
|
||||
|
||||
// RUN: %swiftc_driver -driver-print-bindings -target x86_64-apple-macosx10.9 -emit-sil %s 2>&1 | %FileCheck %s -check-prefix=SIL
|
||||
// SIL: # "x86_64-apple-macosx10.9" - "swift", inputs: ["{{.*}}bindings.swift"], output: {sil: "-"}
|
||||
// RUN: %swiftc_driver -driver-print-bindings -target x86_64-apple-macosx10.9 -emit-sil %/s 2>&1 | %FileCheck %s -check-prefix=SIL
|
||||
// SIL: # "x86_64-apple-macosx10.9" - "swift{{c?(\.EXE)?}}", inputs: ["{{.*}}bindings.swift"], output: {sil: "-"}
|
||||
|
||||
// RUN: %swiftc_driver -driver-print-bindings -target x86_64-apple-macosx10.9 -emit-ir %S/Inputs/empty.sil 2>&1 | %FileCheck %s -check-prefix=SIL-INPUT
|
||||
// SIL-INPUT: # "x86_64-apple-macosx10.9" - "swift", inputs: ["{{.*}}empty.sil"], output: {llvm-ir: "-"}
|
||||
// SIL-INPUT: # "x86_64-apple-macosx10.9" - "swift{{c?(\.EXE)?}}", inputs: ["{{.*}}empty.sil"], output: {llvm-ir: "-"}
|
||||
|
||||
// RUN: %swiftc_driver -driver-print-bindings -target x86_64-apple-macosx10.9 -c -incremental %s 2>&1 | %FileCheck %s -check-prefix=OBJ-AND-DEPS
|
||||
// OBJ-AND-DEPS: # "x86_64-apple-macosx10.9" - "swift", inputs: ["{{.*}}bindings.swift"], output: {
|
||||
// RUN: %swiftc_driver -driver-print-bindings -target x86_64-apple-macosx10.9 -c -incremental %/s 2>&1 | %FileCheck %s -check-prefix=OBJ-AND-DEPS
|
||||
// OBJ-AND-DEPS: # "x86_64-apple-macosx10.9" - "swift{{c?(\.EXE)?}}", inputs: ["{{.*}}bindings.swift"], output: {
|
||||
// OBJ-AND-DEPS-DAG: swift-dependencies: "bindings.swiftdeps"
|
||||
// OBJ-AND-DEPS-DAG: object: "bindings.o"
|
||||
// OBJ-AND-DEPS: }
|
||||
|
||||
// RUN: echo '{"%s": {"object": "objroot/bindings.o"}}' > %t/map.json
|
||||
// RUN: %swiftc_driver -driver-print-bindings -output-file-map %t/map.json -target x86_64-apple-macosx10.9 %s 2>&1 | %FileCheck %s -check-prefix=MAP
|
||||
// MAP: # "x86_64-apple-macosx10.9" - "swift", inputs: ["{{.*}}bindings.swift"], output: {object: "objroot/bindings.o"}
|
||||
// RUN: echo '{"%/s": {"object": "objroot/bindings.o"}}' > %t/map.json
|
||||
// RUN: %swiftc_driver -driver-print-bindings -output-file-map %t/map.json -target x86_64-apple-macosx10.9 %/s 2>&1 | %FileCheck %s -check-prefix=MAP
|
||||
// MAP: # "x86_64-apple-macosx10.9" - "swift{{c?(\.EXE)?}}", inputs: ["{{.*}}bindings.swift"], output: {object: "objroot/bindings.o"}
|
||||
|
||||
// RUN: echo '{"": {"object": "objroot/bindings.o"}}' > %t/map.json
|
||||
// RUN: %swiftc_driver -driver-print-bindings -output-file-map %t/map.json -whole-module-optimization -target x86_64-apple-macosx10.9 %s %S/Inputs/lib.swift 2>&1 | %FileCheck %s -check-prefix=MAP-WFO
|
||||
// MAP-WFO: # "x86_64-apple-macosx10.9" - "swift", inputs: ["{{.*}}bindings.swift", "{{.*}}lib.swift"], output: {object: "objroot/bindings.o"}
|
||||
// RUN: %swiftc_driver -driver-print-bindings -output-file-map %t/map.json -whole-module-optimization -target x86_64-apple-macosx10.9 %/s %S/Inputs/lib.swift 2>&1 | %FileCheck %s -check-prefix=MAP-WFO
|
||||
// MAP-WFO: # "x86_64-apple-macosx10.9" - "swift{{c?(\.EXE)?}}", inputs: ["{{.*}}bindings.swift", "{{.*}}lib.swift"], output: {object: "objroot/bindings.o"}
|
||||
|
||||
// RUN: touch %t/a.o %t/b.o
|
||||
// RUN: %swiftc_driver -driver-print-bindings -target x86_64-apple-macosx10.9 %t/a.o %t/b.o -o main 2>&1 | %FileCheck %s -check-prefix=LINK-ONLY
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// UNSUPPORTED: win32
|
||||
// RUN: %empty-directory(%t)
|
||||
|
||||
// RUN: %target-build-swift -typecheck -driver-print-actions -import-objc-header %S/Inputs/bridging-header.h %s 2>&1 | %FileCheck %s -check-prefix=YESPCHACT
|
||||
@@ -11,21 +12,21 @@
|
||||
// NOPCHACT: 1: compile, {0}, none
|
||||
|
||||
// RUN: %target-build-swift -typecheck -driver-print-jobs -import-objc-header %S/Inputs/bridging-header.h %s 2>&1 | %FileCheck %s -check-prefix=YESPCHJOB
|
||||
// YESPCHJOB: {{.*}}swift -frontend {{.*}} -emit-pch -o {{.*}}bridging-header-{{.*}}.pch
|
||||
// YESPCHJOB: {{.*}}swift -frontend {{.*}} -import-objc-header {{.*}}bridging-header-{{.*}}.pch
|
||||
// YESPCHJOB: {{.*}}swift{{c?(\.EXE)?"?}} -frontend {{.*}} -emit-pch -o {{.*}}bridging-header-{{.*}}.pch
|
||||
// YESPCHJOB: {{.*}}swift{{c?(\.EXE)?"?}} -frontend {{.*}} -import-objc-header {{.*}}bridging-header-{{.*}}.pch
|
||||
|
||||
// RUN: %target-build-swift -typecheck -disable-bridging-pch -driver-print-jobs -import-objc-header %S/Inputs/bridging-header.h %s 2>&1 | %FileCheck %s -check-prefix=NOPCHJOB
|
||||
// NOPCHJOB: {{.*}}swift -frontend {{.*}} -import-objc-header {{.*}}Inputs/bridging-header.h
|
||||
// NOPCHJOB: {{.*}}swift{{c?(\.EXE)?"?}} -frontend {{.*}} -import-objc-header {{.*}}Inputs/bridging-header.h
|
||||
|
||||
// RUN: %target-build-swift -typecheck -driver-print-jobs -index-store-path %t/idx -import-objc-header %S/Inputs/bridging-header.h %s 2>&1 | %FileCheck %s -check-prefix=INDEXSTORE
|
||||
// INDEXSTORE: {{.*}}swift -frontend {{.*}} -index-store-path {{.*}}/idx -emit-pch -o {{.*}}bridging-header-{{.*}}.pch
|
||||
// INDEXSTORE: {{.*}}swift{{c?(\.EXE)?"?}} -frontend {{.*}} -index-store-path {{.*}}/idx{{"?}} -emit-pch -o {{.*}}bridging-header-{{.*}}.pch
|
||||
|
||||
// RUN: echo "{\"\": {\"swift-dependencies\": \"%t/master.swiftdeps\"}, \"%s\": {\"swift-dependencies\": \"%t/bridging-header.swiftdeps\"}}" > %t.json
|
||||
// RUN: echo "{\"\": {\"swift-dependencies\": \"%/t/master.swiftdeps\"}, \"%/s\": {\"swift-dependencies\": \"%/t/bridging-header.swiftdeps\"}}" > %t.json
|
||||
// RUN: %target-build-swift -typecheck -incremental -enable-bridging-pch -output-file-map %t.json -import-objc-header %S/Inputs/bridging-header.h %s
|
||||
|
||||
// RUN: mkdir %t/tmp
|
||||
// RUN: not env TMPDIR="%t/tmp/" %target-build-swift -typecheck -import-objc-header %S/../Inputs/empty.h -driver-use-frontend-path %S/Inputs/crash-after-generating-pch.py %s
|
||||
// RUN: ls %t/tmp/*.pch
|
||||
// RUN: ls %/t/tmp/*.pch
|
||||
|
||||
// Test persistent PCH
|
||||
|
||||
@@ -48,25 +49,25 @@
|
||||
// PERSISTENT-DISABLED-YESPCHJOB-NOT: -pch-output-dir
|
||||
|
||||
// RUN: %target-build-swift -typecheck -driver-print-jobs -import-objc-header %S/Inputs/bridging-header.h -pch-output-dir %t/pch %s 2>&1 | %FileCheck %s -check-prefix=PERSISTENT-YESPCHJOB
|
||||
// PERSISTENT-YESPCHJOB: {{.*}}swift -frontend {{.*}} -emit-pch -pch-output-dir {{.*}}/pch
|
||||
// PERSISTENT-YESPCHJOB: {{.*}}swift -frontend {{.*}} -import-objc-header {{.*}}bridging-header.h -pch-output-dir {{.*}}/pch -pch-disable-validation
|
||||
// PERSISTENT-YESPCHJOB: {{.*}}swift{{c?(\.EXE)?"?}} -frontend {{.*}} -emit-pch -pch-output-dir {{.*}}/pch
|
||||
// PERSISTENT-YESPCHJOB: {{.*}}swift{{c?(\.EXE)?"?}} -frontend {{.*}} -import-objc-header {{.*}}bridging-header.h -pch-output-dir {{.*}}/pch -pch-disable-validation
|
||||
|
||||
// RUN: %target-build-swift -typecheck -driver-print-jobs -import-objc-header %S/Inputs/bridging-header.h -pch-output-dir %t/pch -serialize-diagnostics %s 2>&1 | %FileCheck %s -check-prefix=PERSISTENT-YESPCHJOB-DIAG1
|
||||
// PERSISTENT-YESPCHJOB-DIAG1: {{.*}}swift -frontend {{.*}} -serialize-diagnostics-path {{.*}}bridging-header-{{.*}}.dia {{.*}} -emit-pch -pch-output-dir {{.*}}/pch
|
||||
// PERSISTENT-YESPCHJOB-DIAG1: {{.*}}swift{{c?(\.EXE)?"?}} -frontend {{.*}} -serialize-diagnostics-path {{.*}}bridging-header-{{.*}}.dia {{.*}} -emit-pch -pch-output-dir {{.*}}/pch
|
||||
|
||||
// RUN: %target-build-swift -typecheck -driver-print-jobs -import-objc-header %S/Inputs/bridging-header.h -pch-output-dir %t/pch-out-dir -serialize-diagnostics %s -emit-module -emit-module-path /module-path-dir 2>&1 | %FileCheck %s -check-prefix=PERSISTENT-YESPCHJOB-DIAG2
|
||||
// PERSISTENT-YESPCHJOB-DIAG2: {{.*}}swift -frontend {{.*}} -serialize-diagnostics-path {{.*}}/pch-out-dir/bridging-header-{{.*}}.dia {{.*}} -emit-pch -pch-output-dir {{.*}}/pch-out-dir
|
||||
// PERSISTENT-YESPCHJOB-DIAG2: {{.*}}swift{{c?(\.EXE)?"?}} -frontend {{.*}} -serialize-diagnostics-path {{.*}}/pch-out-dir/bridging-header-{{.*}}.dia {{.*}} -emit-pch -pch-output-dir {{.*}}/pch-out-dir
|
||||
|
||||
// RUN: %target-build-swift -typecheck -import-objc-header %S/Inputs/bridging-header.h -pch-output-dir %t/pch -parseable-output -driver-skip-execution %s 2>&1 | %FileCheck %s -check-prefix=PERSISTENT-OUTPUT
|
||||
// PERSISTENT-OUTPUT-NOT: "outputs": [
|
||||
|
||||
// RUN: %target-build-swift -typecheck -driver-print-jobs -import-objc-header %S/Inputs/bridging-header.h -pch-output-dir %t/pch -whole-module-optimization %s 2>&1 | %FileCheck %s -check-prefix=PERSISTENT-WMO-YESPCHJOB --implicit-check-not pch-disable-validation
|
||||
// PERSISTENT-WMO-YESPCHJOB: {{.*}}swift -frontend {{.*}} -import-objc-header {{.*}}bridging-header.h -pch-output-dir {{.*}}/pch
|
||||
// PERSISTENT-WMO-YESPCHJOB: {{.*}}swift{{c?(\.EXE)?"?}} -frontend {{.*}} -import-objc-header {{.*}}bridging-header.h -pch-output-dir {{.*}}/pch
|
||||
|
||||
// RUN: %target-build-swift -typecheck -disable-bridging-pch -driver-print-jobs -import-objc-header %S/Inputs/bridging-header.h -pch-output-dir %t/pch %s 2>&1 | %FileCheck %s -check-prefix=NOPCHJOB
|
||||
// RUN: %target-build-swift -typecheck -disable-bridging-pch -driver-print-jobs -import-objc-header %/S/Inputs/bridging-header.h -pch-output-dir %t/pch %/s 2>&1 | %FileCheck %s -check-prefix=NOPCHJOB
|
||||
// RUN: %target-build-swift -typecheck -incremental -enable-bridging-pch -output-file-map %t.json -import-objc-header %S/Inputs/bridging-header.h -pch-output-dir %t/pch %s
|
||||
|
||||
// RUN: %target-build-swift -### -typecheck -O -import-objc-header %S/Inputs/bridging-header.h %s 2>&1 | %FileCheck %s -check-prefix=OPTPCH
|
||||
// OPTPCH: swift -frontend
|
||||
// OPTPCH: swift{{c?(\.EXE)?"?}} -frontend
|
||||
// OPTPCH-SAME: -O{{ }}
|
||||
// OPTPCH-SAME: -emit-pch
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: echo "{\"%s\": {\"object\": \"/build/broken_output_file_map.o\", \"completely-bogus-type\": \"\"}}" > %t.json
|
||||
// RUN: echo "{\"%/s\": {\"object\": \"/build/broken_output_file_map.o\", \"completely-bogus-type\": \"\"}}" > %t.json
|
||||
|
||||
// RUN: %swiftc_driver -driver-print-output-file-map -target x86_64-apple-macosx10.9 -emit-executable %s %S/Inputs/main.swift %S/Inputs/lib.swift -o /build/basic_output_file_map.out -module-name OutputFileMap -output-file-map %t.json 2>&1 | %FileCheck %s
|
||||
// RUN: %swiftc_driver -driver-print-output-file-map -target x86_64-apple-macosx10.9 -emit-executable %s %/S/Inputs/main.swift %/S/Inputs/lib.swift -o /build/basic_output_file_map.out -module-name OutputFileMap -output-file-map %t.json 2>&1 | %FileCheck %s
|
||||
|
||||
// CHECK: {{.*}}/broken_output_file_map.swift -> object: "/build/broken_output_file_map.o"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// UNSUPPORTED: win32
|
||||
// RUN: not %swiftc_driver -emit-executable -o %t.exe %s -Xfrontend -debug-crash-immediately 2>&1 | %FileCheck %s
|
||||
|
||||
// RUN: not %swiftc_driver -emit-executable -o %t.exe %s -Xfrontend -debug-crash-after-parse 2>&1 | %FileCheck %s
|
||||
|
||||
@@ -64,13 +64,13 @@
|
||||
// REQUIRES: CODEGENERATOR=X86
|
||||
|
||||
|
||||
// CHECK: bin/swift
|
||||
// CHECK: Driver/driver-compile.swift
|
||||
// CHECK: bin{{/|\\\\}}swift
|
||||
// CHECK: Driver{{/|\\\\}}driver-compile.swift
|
||||
// CHECK: -o
|
||||
|
||||
// COMPLEX: bin/swift
|
||||
// COMPLEX: bin{{/|\\\\}}swift
|
||||
// COMPLEX: -c
|
||||
// COMPLEX: Driver/driver-compile.swift
|
||||
// COMPLEX: Driver{{/|\\\\}}driver-compile.swift
|
||||
// COMPLEX-DAG: -sdk {{.*}}/Inputs/clang-importer-sdk
|
||||
// COMPLEX-DAG: -foo -bar
|
||||
// COMPLEX-DAG: -Xllvm -baz
|
||||
@@ -78,59 +78,59 @@
|
||||
// COMPLEX-DAG: -F /path/to/frameworks -Fsystem /path/to/systemframeworks -F /path/to/more/frameworks
|
||||
// COMPLEX-DAG: -I /path/to/headers -I path/to/more/headers
|
||||
// COMPLEX-DAG: -module-cache-path /tmp/modules
|
||||
// COMPLEX-DAG: -emit-reference-dependencies-path {{(.*/)?driver-compile[^ /]+}}.swiftdeps
|
||||
// COMPLEX-DAG: -emit-reference-dependencies-path {{(.*(/|\\))?driver-compile[^ /]+}}.swiftdeps
|
||||
// COMPLEX: -o {{.+}}.o
|
||||
|
||||
|
||||
// AST-STDOUT: bin/swift
|
||||
// AST-STDOUT: bin{{/|\\\\}}swift
|
||||
// AST-STDOUT: -dump-ast
|
||||
// AST-STDOUT: -o -
|
||||
|
||||
// AST-O: bin/swift
|
||||
// AST-O: bin{{/|\\\\}}swift
|
||||
// AST-O: -dump-ast
|
||||
// AST-O: -o output.ast
|
||||
|
||||
// SILGEN: bin/swift
|
||||
// SILGEN: bin{{/|\\\\}}swift
|
||||
// SILGEN: -emit-silgen
|
||||
// SILGEN: -o -
|
||||
|
||||
// SIL: bin/swift
|
||||
// SIL: bin{{/|\\\\}}swift
|
||||
// SIL: -emit-sil{{ }}
|
||||
// SIL: -o -
|
||||
|
||||
// IR: bin/swift
|
||||
// IR: bin{{/|\\\\}}swift
|
||||
// IR: -emit-ir
|
||||
// IR: -o -
|
||||
|
||||
// BC: bin/swift
|
||||
// BC: bin{{/|\\\\}}swift
|
||||
// BC: -emit-bc
|
||||
// BC: -o {{[^-]}}
|
||||
|
||||
// ASM: bin/swift
|
||||
// ASM: bin{{/|\\\\}}swift
|
||||
// ASM: -S{{ }}
|
||||
// ASM: -o -
|
||||
|
||||
// OBJ: bin/swift
|
||||
// OBJ: bin{{/|\\\\}}swift
|
||||
// OBJ: -c{{ }}
|
||||
// OBJ: -o {{[^-]}}
|
||||
|
||||
// DUPLICATE-NAME: error: filename "driver-compile.swift" used twice: '{{.*}}test/Driver/driver-compile.swift' and '{{.*}}driver-compile.swift'
|
||||
// DUPLICATE-NAME: error: filename "driver-compile.swift" used twice: '{{.*}}test{{[/\\]}}Driver{{[/\\]}}driver-compile.swift' and '{{.*}}driver-compile.swift'
|
||||
// DUPLICATE-NAME: note: filenames are used to distinguish private declarations with the same name
|
||||
|
||||
// FILELIST: bin/swift
|
||||
// FILELIST: bin{{/|\\\\}}swift
|
||||
// FILELIST: -filelist [[SOURCES:(["][^"]+sources[^"]+["]|[^ ]+sources[^ ]+)]]
|
||||
// FILELIST: -primary-filelist {{(["][^"]+primaryInputs[^"]+["]|[^ ]+primaryInputs[^ ]+)}}
|
||||
// FILELIST: -supplementary-output-file-map {{(["][^"]+supplementaryOutputs[^"]+["]|[^ ]+supplementaryOutputs[^ ]+)}}
|
||||
// FILELIST: -output-filelist {{[^-]}}
|
||||
// FILELIST-NEXT: bin/swift
|
||||
// FILELIST-NEXT: bin{{/|\\\\}}swift
|
||||
// FILELIST: -filelist [[SOURCES]]
|
||||
// FILELIST: -primary-filelist {{(["][^"]+primaryInputs[^"]+["]|[^ ]+primaryInputs[^ ]+)}}
|
||||
// FILELIST: -supplementary-output-file-map {{(["][^"]+supplementaryOutputs[^"]+["]|[^ ]+supplementaryOutputs[^ ]+)}}
|
||||
// FILELIST: -output-filelist {{[^-]}}
|
||||
|
||||
// UPDATE-CODE: DISTINCTIVE-PATH/usr/bin/swift
|
||||
// UPDATE-CODE: DISTINCTIVE-PATH{{/|\\\\}}usr{{/|\\\\}}bin{{/|\\\\}}swift
|
||||
// UPDATE-CODE: -frontend -c
|
||||
// UPDATE-CODE: -emit-remap-file-path {{.+}}.remap
|
||||
|
||||
// NO-REFERENCE-DEPENDENCIES: bin/swift
|
||||
// NO-REFERENCE-DEPENDENCIES: bin{{/|\\\\}}swift
|
||||
// NO-REFERENCE-DEPENDENCIES-NOT: -emit-reference-dependencies
|
||||
|
||||
@@ -10,5 +10,9 @@
|
||||
// CHECK-SWIFTC-elf: 2: swift-autolink-extract, {1}, autolink
|
||||
// CHECK-SWIFTC-elf: 3: link, {1, 2}, image
|
||||
|
||||
// CHECK-SWIFTC-coff: 0: input, "{{.*}}driver_mode.swift", swift
|
||||
// CHECK-SWIFTC-coff: 1: compile, {0}, object
|
||||
// CHECK-SWIFTC-coff: 2: link, {1}, image
|
||||
|
||||
// CHECK-SWIFT: 0: input, "{{.*}}driver_mode.swift", swift
|
||||
// CHECK-SWIFT: 1: interpret, {0}, none
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
// CHECK-macho: "swift", inputs: ["{{.*}}embed-bitcode.swift"], output: {llvm-bc: "[[BC:.*\.bc]]"}
|
||||
// CHECK-macho: "swift", inputs: ["[[BC]]"], output: {object: "[[OBJECT:.*\.o]]"}
|
||||
// CHECK-macho: "ld", inputs: ["[[OBJECT]]"], output: {image: "embed-bitcode"}
|
||||
// CHECK-coff: "swiftc.EXE", inputs: ["{{.*}}embed-bitcode.swift"], output: {llvm-bc: "[[BC:.*\.bc]]"}
|
||||
// CHECK-coff: "swiftc.EXE", inputs: ["[[BC]]"], output: {object: "[[OBJECT:.*\.o]]"}
|
||||
// CHECK-coff: "clang++.exe", inputs: ["[[OBJECT]]"], output: {image: "embed-bitcode"}
|
||||
|
||||
// CHECK-elf: "swift", inputs: ["{{.*}}embed-bitcode.swift"], output: {llvm-bc: "[[BC:.*\.bc]]"}
|
||||
// CHECK-elf: "swift", inputs: ["[[BC]]"], output: {object: "[[OBJECT:.*\.o]]"}
|
||||
@@ -90,23 +93,23 @@
|
||||
// CHECK-LIB-WMO: -parse-stdlib
|
||||
|
||||
// RUN: %target-swiftc_driver -embed-bitcode -c -parse-as-library -emit-module %s %S/../Inputs/empty.swift -module-name ABC 2>&1 -### | %FileCheck %s -check-prefix=CHECK-LIB
|
||||
// CHECK-LIB: swift -frontend
|
||||
// CHECK-LIB: swift{{c?(\.EXE)?"?}} -frontend
|
||||
// CHECK-LIB: -emit-bc
|
||||
// CHECK-LIB: -primary-file
|
||||
// CHECK-LIB: swift -frontend
|
||||
// CHECK-LIB: swift{{c?(\.EXE)?"?}} -frontend
|
||||
// CHECK-LIB: -emit-bc
|
||||
// CHECK-LIB: -primary-file
|
||||
// CHECK-LIB: swift -frontend
|
||||
// CHECK-LIB: swift{{c?(\.EXE)?"?}} -frontend
|
||||
// CHECK-LIB: -c
|
||||
// CHECK-LIB: -embed-bitcode
|
||||
// CHECK-LIB: -disable-llvm-optzns
|
||||
// CHECK-LIB: swift -frontend
|
||||
// CHECK-LIB: swift{{c?(\.EXE)?"?}} -frontend
|
||||
// CHECK-LIB: -c
|
||||
// CHECK-LIB: -embed-bitcode
|
||||
// CHECK-LIB: -disable-llvm-optzns
|
||||
// CHECK-LIB: swift -frontend
|
||||
// CHECK-LIB: swift{{c?(\.EXE)?"?}} -frontend
|
||||
// CHECK-LIB: -emit-module
|
||||
// CHECK-LIB-NOT: swift -frontend
|
||||
// CHECK-LIB-NOT: swift{{c?(\.EXE)?"?}} -frontend
|
||||
|
||||
// RUN: %target-swiftc_driver -embed-bitcode -emit-module %s 2>&1 -### | %FileCheck %s -check-prefix=WARN-EMBED-BITCODE
|
||||
// RUN: %target-swiftc_driver -embed-bitcode -emit-module-path a.swiftmodule %s 2>&1 -### | %FileCheck %s -check-prefix=WARN-EMBED-BITCODE
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-macosx10.9 %s -emit-parseable-module-interface -o %t/foo 2>&1 | %FileCheck %s
|
||||
|
||||
// CHECK: swift -frontend
|
||||
// CHECK: swift{{c?(\.EXE)?"?}} -frontend
|
||||
// CHECK-SAME: emit-interface.swift
|
||||
// CHECK: swift -frontend -merge-modules
|
||||
// CHECK-SAME: -emit-parseable-module-interface-path {{.+}}/foo.swiftinterface
|
||||
// CHECK: bin/ld
|
||||
// CHECK: swift{{c?(\.EXE)?"?}} -frontend -merge-modules
|
||||
// CHECK-SAME: -emit-parseable-module-interface-path {{.+[/\\]}}foo.swiftinterface
|
||||
// CHECK: {{(bin/)?}}ld
|
||||
|
||||
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-macosx10.9 %s -emit-parseable-module-interface -o %t/foo -force-single-frontend-invocation 2>&1 | %FileCheck -check-prefix=CHECK-WHOLE-MODULE %s
|
||||
|
||||
// CHECK-WHOLE-MODULE: swift -frontend
|
||||
// CHECK-WHOLE-MODULE: swift{{c?(\.EXE)?"?}} -frontend
|
||||
// CHECK-WHOLE-MODULE-SAME: emit-interface.swift
|
||||
// CHECK-WHOLE-MODULE-SAME: -emit-parseable-module-interface-path {{.+}}/foo.swiftinterface
|
||||
// CHECK-WHOLE-MODULE-SAME: -emit-parseable-module-interface-path {{.+[/\\]}}foo.swiftinterface
|
||||
// CHECK-WHOLE-MODULE-NOT: -merge-modules
|
||||
// CHECK-WHOLE-MODULE: bin/ld
|
||||
// CHECK-WHOLE-MODULE: {{(bin/)?}}ld
|
||||
|
||||
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-macosx10.9 %s -emit-parseable-module-interface-path %t/unrelated.swiftinterface -o %t/foo -force-single-frontend-invocation 2>&1 | %FileCheck -check-prefix=CHECK-EXPLICIT-PATH %s
|
||||
|
||||
// CHECK-EXPLICIT-PATH: swift -frontend
|
||||
// CHECK-EXPLICIT-PATH: swift{{c?(\.EXE)?"?}} -frontend
|
||||
// CHECK-EXPLICIT-PATH-SAME: emit-interface.swift
|
||||
// CHECK-EXPLICIT-PATH-SAME: -emit-parseable-module-interface-path {{.+}}/unrelated.swiftinterface
|
||||
// CHECK-EXPLICIT-PATH-SAME: -emit-parseable-module-interface-path {{.+[/\\]}}unrelated.swiftinterface
|
||||
|
||||
// Ensure that we emit arguments when we force filelists as well
|
||||
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-macosx10.9 %s -emit-parseable-module-interface -o %t/foo -module-name foo -force-single-frontend-invocation -driver-filelist-threshold=0 2>&1 | %FileCheck -check-prefix=CHECK-FILELIST %s
|
||||
|
||||
// CHECK-FILELIST: swift -frontend
|
||||
// CHECK-FILELIST: swift{{c?(\.EXE)?"?}} -frontend
|
||||
// CHECK-FILELIST-SAME: -supplementary-output-file-map
|
||||
// CHECK-FILELIST-NOT: emit-interface.swift{{ }}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-macosx10.9 %s -emit-objc-header-path %t/foo.h 2>&1 | %FileCheck %s
|
||||
|
||||
// CHECK: swift -frontend
|
||||
// CHECK: swift{{c?(\.EXE)?"?}} -frontend
|
||||
// CHECK-SAME: emit-objc-header.swift
|
||||
// CHECK: swift -frontend -merge-modules
|
||||
// CHECK: swift{{c?(\.EXE)?"?}} -frontend -merge-modules
|
||||
// CHECK-SAME: -emit-objc-header-path {{.+}}/foo.h
|
||||
// CHECK: bin/ld
|
||||
// CHECK: {{(bin/)?}}ld
|
||||
|
||||
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-macosx10.9 %s -emit-objc-header-path %t/foo.h -force-single-frontend-invocation 2>&1 | %FileCheck -check-prefix=CHECK-WHOLE-MODULE %s
|
||||
|
||||
// CHECK-WHOLE-MODULE: swift -frontend
|
||||
// CHECK-WHOLE-MODULE: swift{{c?(\.EXE)?"?}} -frontend
|
||||
// CHECK-WHOLE-MODULE-SAME: emit-objc-header.swift
|
||||
// CHECK-WHOLE-MODULE-SAME: -emit-objc-header-path {{.+}}/foo.h
|
||||
// CHECK-WHOLE-MODULE-NOT: -merge-modules
|
||||
// CHECK-WHOLE-MODULE: bin/ld
|
||||
// CHECK-WHOLE-MODULE: {{(bin/)?}}ld
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// UNSUPPORTED: objc_interop
|
||||
// UNSUPPORTED: win32
|
||||
// Apple's "System Integrity Protection" makes this test fail on OS X.
|
||||
|
||||
// RUN: %swift_driver -target x86_64-unknown-gnu-linux -L/foo/ -driver-use-frontend-path %S/Inputs/print-var.sh %s LD_LIBRARY_PATH | %FileCheck -check-prefix=CHECK${LD_LIBRARY_PATH+_LAX} %s
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// UNSUPPORTED: win32
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: touch %t/a.swift %t/b.swift %t/c.swift
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// UNSUPPORTED: win32
|
||||
// RUN: %swiftc_driver -driver-print-jobs -sanitize=fuzzer,address -resource-dir %S/Inputs/fake-resource-dir/lib/swift/ %s | %FileCheck -check-prefix=LIBFUZZER %s
|
||||
|
||||
// LIBFUZZER: libclang_rt.fuzzer
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
// Clean up the test executable because hard links are expensive.
|
||||
// RUN: rm -f %t/bin/swiftc
|
||||
|
||||
// CHECK: bin/ld{{"? }}
|
||||
// CHECK: {{(bin/)?}}ld{{"? }}
|
||||
// CHECK-NO-RUNTIME-NOT: libclang_rt
|
||||
// CHECK-MACOS-SAME: {{[^ ]+/lib/clang/darwin/libclang_rt.osx.a}}
|
||||
// CHECK-IOS-SAME: {{[^ ]+/lib/clang/darwin/libclang_rt.ios.a}}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// UNSUPPORTED: win32
|
||||
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-macosx10.9 %s 2>&1 > %t.simple.txt
|
||||
// RUN: %FileCheck %s < %t.simple.txt
|
||||
// RUN: %FileCheck -check-prefix SIMPLE %s < %t.simple.txt
|
||||
@@ -88,16 +89,16 @@
|
||||
// CHECK: swift
|
||||
// CHECK: -o [[OBJECTFILE:.*]]
|
||||
|
||||
// CHECK-NEXT: bin/ld{{"? }}
|
||||
// CHECK-NEXT: {{(bin/)?}}ld{{"? }}
|
||||
// CHECK-DAG: [[OBJECTFILE]]
|
||||
// CHECK-DAG: -L [[STDLIB_PATH:[^ ]+/lib/swift/macosx]]
|
||||
// CHECK-DAG: -L [[STDLIB_PATH:[^ ]+(/|\\\\)lib(/|\\\\)swift(/|\\\\)macosx]]
|
||||
// CHECK-DAG: -rpath [[STDLIB_PATH]]
|
||||
// CHECK-DAG: -lSystem
|
||||
// CHECK-DAG: -arch x86_64
|
||||
// CHECK: -o {{[^ ]+}}
|
||||
|
||||
|
||||
// SIMPLE: bin/ld{{"? }}
|
||||
// SIMPLE: {{(bin/)?}}ld{{"? }}
|
||||
// SIMPLE-NOT: -syslibroot
|
||||
// SIMPLE: -macosx_version_min 10.{{[0-9]+}}.{{[0-9]+}}
|
||||
// SIMPLE-NOT: -syslibroot
|
||||
@@ -107,12 +108,12 @@
|
||||
// SIMPLE_STATIC: swift
|
||||
// SIMPLE_STATIC: -o [[OBJECTFILE:.*]]
|
||||
|
||||
// SIMPLE_STATIC-NEXT: bin/ld{{"? }}
|
||||
// SIMPLE_STATIC-NEXT: {{(bin/)?}}ld{{"? }}
|
||||
// SIMPLE_STATIC: [[OBJECTFILE]]
|
||||
// SIMPLE_STATIC: -lobjc
|
||||
// SIMPLE_STATIC: -lSystem
|
||||
// SIMPLE_STATIC: -arch x86_64
|
||||
// SIMPLE_STATIC: -L [[STDLIB_PATH:[^ ]+/lib/swift_static/macosx]]
|
||||
// SIMPLE_STATIC: -L [[STDLIB_PATH:[^ ]+(/|\\\\)lib(/|\\\\)swift_static(/|\\\\)macosx]]
|
||||
// SIMPLE_STATIC: -lc++
|
||||
// SIMPLE_STATIC: -framework Foundation
|
||||
// SIMPLE_STATIC: -force_load_swift_libs
|
||||
@@ -124,9 +125,9 @@
|
||||
// IOS_SIMPLE: swift
|
||||
// IOS_SIMPLE: -o [[OBJECTFILE:.*]]
|
||||
|
||||
// IOS_SIMPLE: bin/ld{{"? }}
|
||||
// IOS_SIMPLE: {{(bin/)?}}ld{{"? }}
|
||||
// IOS_SIMPLE-DAG: [[OBJECTFILE]]
|
||||
// IOS_SIMPLE-DAG: -L {{[^ ]+/lib/swift/iphonesimulator}}
|
||||
// IOS_SIMPLE-DAG: -L {{[^ ]+(/|\\\\)lib(/|\\\\)swift(/|\\\\)iphonesimulator}}
|
||||
// IOS_SIMPLE-DAG: -lSystem
|
||||
// IOS_SIMPLE-DAG: -arch x86_64
|
||||
// IOS_SIMPLE-DAG: -ios_simulator_version_min 7.1.{{[0-9]+}}
|
||||
@@ -136,9 +137,9 @@
|
||||
// tvOS_SIMPLE: swift
|
||||
// tvOS_SIMPLE: -o [[OBJECTFILE:.*]]
|
||||
|
||||
// tvOS_SIMPLE: bin/ld{{"? }}
|
||||
// tvOS_SIMPLE: {{(bin/)?}}ld{{"? }}
|
||||
// tvOS_SIMPLE-DAG: [[OBJECTFILE]]
|
||||
// tvOS_SIMPLE-DAG: -L {{[^ ]+/lib/swift/appletvsimulator}}
|
||||
// tvOS_SIMPLE-DAG: -L {{[^ ]+(/|\\\\)lib(/|\\\\)swift(/|\\\\)appletvsimulator}}
|
||||
// tvOS_SIMPLE-DAG: -lSystem
|
||||
// tvOS_SIMPLE-DAG: -arch x86_64
|
||||
// tvOS_SIMPLE-DAG: -tvos_simulator_version_min 9.0.{{[0-9]+}}
|
||||
@@ -148,9 +149,9 @@
|
||||
// watchOS_SIMPLE: swift
|
||||
// watchOS_SIMPLE: -o [[OBJECTFILE:.*]]
|
||||
|
||||
// watchOS_SIMPLE: bin/ld{{"? }}
|
||||
// watchOS_SIMPLE: {{(bin/)?}}ld{{"? }}
|
||||
// watchOS_SIMPLE-DAG: [[OBJECTFILE]]
|
||||
// watchOS_SIMPLE-DAG: -L {{[^ ]+/lib/swift/watchsimulator}}
|
||||
// watchOS_SIMPLE-DAG: -L {{[^ ]+(/|\\\\)lib(/|\\\\)swift(/|\\\\)watchsimulator}}
|
||||
// watchOS_SIMPLE-DAG: -lSystem
|
||||
// watchOS_SIMPLE-DAG: -arch i386
|
||||
// watchOS_SIMPLE-DAG: -watchos_simulator_version_min 2.0.{{[0-9]+}}
|
||||
@@ -160,11 +161,11 @@
|
||||
// LINUX-x86_64: swift
|
||||
// LINUX-x86_64: -o [[OBJECTFILE:.*]]
|
||||
|
||||
// LINUX-x86_64: clang++{{"? }}
|
||||
// LINUX-x86_64: clang++{{(\.exe)?"? }}
|
||||
// LINUX-x86_64-DAG: -pie
|
||||
// LINUX-x86_64-DAG: [[OBJECTFILE]]
|
||||
// LINUX-x86_64-DAG: -lswiftCore
|
||||
// LINUX-x86_64-DAG: -L [[STDLIB_PATH:[^ ]+/lib/swift]]
|
||||
// LINUX-x86_64-DAG: -L [[STDLIB_PATH:[^ ]+(/|\\\\)lib(/|\\\\)swift(/|\\\\)]]
|
||||
// LINUX-x86_64-DAG: -Xlinker -rpath -Xlinker [[STDLIB_PATH]]
|
||||
// LINUX-x86_64-DAG: -F foo -iframework car -F cdr
|
||||
// LINUX-x86_64-DAG: -framework bar
|
||||
@@ -176,11 +177,11 @@
|
||||
// LINUX-armv6: swift
|
||||
// LINUX-armv6: -o [[OBJECTFILE:.*]]
|
||||
|
||||
// LINUX-armv6: clang++{{"? }}
|
||||
// LINUX-armv6: clang++{{(\.exe)?"? }}
|
||||
// LINUX-armv6-DAG: -pie
|
||||
// LINUX-armv6-DAG: [[OBJECTFILE]]
|
||||
// LINUX-armv6-DAG: -lswiftCore
|
||||
// LINUX-armv6-DAG: -L [[STDLIB_PATH:[^ ]+/lib/swift]]
|
||||
// LINUX-armv6-DAG: -L [[STDLIB_PATH:[^ ]+(/|\\\\)lib(/|\\\\)swift(/|\\\\)]]
|
||||
// LINUX-armv6-DAG: -target armv6-unknown-linux-gnueabihf
|
||||
// LINUX-armv6-DAG: -Xlinker -rpath -Xlinker [[STDLIB_PATH]]
|
||||
// LINUX-armv6-DAG: -F foo -iframework car -F cdr
|
||||
@@ -193,11 +194,11 @@
|
||||
// LINUX-armv7: swift
|
||||
// LINUX-armv7: -o [[OBJECTFILE:.*]]
|
||||
|
||||
// LINUX-armv7: clang++{{"? }}
|
||||
// LINUX-armv7: clang++{{(\.exe)?"? }}
|
||||
// LINUX-armv7-DAG: -pie
|
||||
// LINUX-armv7-DAG: [[OBJECTFILE]]
|
||||
// LINUX-armv7-DAG: -lswiftCore
|
||||
// LINUX-armv7-DAG: -L [[STDLIB_PATH:[^ ]+/lib/swift]]
|
||||
// LINUX-armv7-DAG: -L [[STDLIB_PATH:[^ ]+(/|\\\\)lib(/|\\\\)swift(/|\\\\)]]
|
||||
// LINUX-armv7-DAG: -target armv7-unknown-linux-gnueabihf
|
||||
// LINUX-armv7-DAG: -Xlinker -rpath -Xlinker [[STDLIB_PATH]]
|
||||
// LINUX-armv7-DAG: -F foo -iframework car -F cdr
|
||||
@@ -210,11 +211,11 @@
|
||||
// LINUX-thumbv7: swift
|
||||
// LINUX-thumbv7: -o [[OBJECTFILE:.*]]
|
||||
|
||||
// LINUX-thumbv7: clang++{{"? }}
|
||||
// LINUX-thumbv7: clang++{{(\.exe)?"? }}
|
||||
// LINUX-thumbv7-DAG: -pie
|
||||
// LINUX-thumbv7-DAG: [[OBJECTFILE]]
|
||||
// LINUX-thumbv7-DAG: -lswiftCore
|
||||
// LINUX-thumbv7-DAG: -L [[STDLIB_PATH:[^ ]+/lib/swift]]
|
||||
// LINUX-thumbv7-DAG: -L [[STDLIB_PATH:[^ ]+(/|\\\\)lib(/|\\\\)swift(/|\\\\)]]
|
||||
// LINUX-thumbv7-DAG: -target thumbv7-unknown-linux-gnueabihf
|
||||
// LINUX-thumbv7-DAG: -Xlinker -rpath -Xlinker [[STDLIB_PATH]]
|
||||
// LINUX-thumbv7-DAG: -F foo -iframework car -F cdr
|
||||
@@ -227,11 +228,11 @@
|
||||
// ANDROID-armv7: swift
|
||||
// ANDROID-armv7: -o [[OBJECTFILE:.*]]
|
||||
|
||||
// ANDROID-armv7: clang++{{"? }}
|
||||
// ANDROID-armv7: clang++{{(\.exe)?"? }}
|
||||
// ANDROID-armv7-DAG: -pie
|
||||
// ANDROID-armv7-DAG: [[OBJECTFILE]]
|
||||
// ANDROID-armv7-DAG: -lswiftCore
|
||||
// ANDROID-armv7-DAG: -L [[STDLIB_PATH:[^ ]+/lib/swift]]
|
||||
// ANDROID-armv7-DAG: -L [[STDLIB_PATH:[^ ]+(/|\\\\)lib(/|\\\\)swift]]
|
||||
// ANDROID-armv7-DAG: -target armv7-none-linux-androideabi
|
||||
// ANDROID-armv7-DAG: -F foo -iframework car -F cdr
|
||||
// ANDROID-armv7-DAG: -framework bar
|
||||
@@ -244,10 +245,10 @@
|
||||
// CYGWIN-x86_64: swift
|
||||
// CYGWIN-x86_64: -o [[OBJECTFILE:.*]]
|
||||
|
||||
// CYGWIN-x86_64: clang++{{"? }}
|
||||
// CYGWIN-x86_64: clang++{{(\.exe)?"? }}
|
||||
// CYGWIN-x86_64-DAG: [[OBJECTFILE]]
|
||||
// CYGWIN-x86_64-DAG: -lswiftCore
|
||||
// CYGWIN-x86_64-DAG: -L [[STDLIB_PATH:[^ ]+/lib/swift]]
|
||||
// CYGWIN-x86_64-DAG: -L [[STDLIB_PATH:[^ ]+(/|\\\\)lib(/|\\\\)swift]]
|
||||
// CYGWIN-x86_64-DAG: -Xlinker -rpath -Xlinker [[STDLIB_PATH]]
|
||||
// CYGWIN-x86_64-DAG: -F foo -iframework car -F cdr
|
||||
// CYGWIN-x86_64-DAG: -framework bar
|
||||
@@ -259,9 +260,9 @@
|
||||
// WINDOWS-x86_64: swift
|
||||
// WINDOWS-x86_64: -o [[OBJECTFILE:.*]]
|
||||
|
||||
// WINDOWS-x86_64: clang++{{"? }}
|
||||
// WINDOWS-x86_64: clang++{{(\.exe)?"? }}
|
||||
// WINDOWS-x86_64-DAG: [[OBJECTFILE]]
|
||||
// WINDOWS-x86_64-DAG: -L [[STDLIB_PATH:[^ ]+/lib/swift/windows/x86_64]]
|
||||
// WINDOWS-x86_64-DAG: -L [[STDLIB_PATH:[^ ]+(/|\\\\)lib(/|\\\\)swift(/|\\\\)windows(/|\\\\)x86_64]]
|
||||
// WINDOWS-x86_64-DAG: -F foo -iframework car -F cdr
|
||||
// WINDOWS-x86_64-DAG: -framework bar
|
||||
// WINDOWS-x86_64-DAG: -L baz
|
||||
@@ -270,7 +271,7 @@
|
||||
// WINDOWS-x86_64: -o linker
|
||||
|
||||
|
||||
// COMPLEX: bin/ld{{"? }}
|
||||
// COMPLEX: {{(bin/)?}}ld{{"? }}
|
||||
// COMPLEX-DAG: -dylib
|
||||
// COMPLEX-DAG: -syslibroot {{.*}}/Inputs/clang-importer-sdk
|
||||
// COMPLEX-DAG: -lfoo
|
||||
@@ -283,14 +284,14 @@
|
||||
|
||||
// LINUX_DYNLIB-x86_64: swift
|
||||
// LINUX_DYNLIB-x86_64: -o [[OBJECTFILE:.*]]
|
||||
// LINUX_DYNLIB-x86_64: -o [[AUTOLINKFILE:.*]]
|
||||
// LINUX_DYNLIB-x86_64: -o {{"?}}[[AUTOLINKFILE:.*]]
|
||||
|
||||
// LINUX_DYNLIB-x86_64: clang++{{"? }}
|
||||
// LINUX_DYNLIB-x86_64: clang++{{(\.exe)?"? }}
|
||||
// LINUX_DYNLIB-x86_64-DAG: -shared
|
||||
// LINUX_DYNLIB-x86_64-DAG: -fuse-ld=gold
|
||||
// LINUX_DYNLIB-x86_64-NOT: -pie
|
||||
// LINUX_DYNLIB-x86_64-DAG: -Xlinker -rpath -Xlinker [[STDLIB_PATH:[^ ]+/lib/swift/linux]]
|
||||
// LINUX_DYNLIB-x86_64: [[STDLIB_PATH]]/x86_64/swiftrt.o
|
||||
// LINUX_DYNLIB-x86_64-DAG: -Xlinker -rpath -Xlinker [[STDLIB_PATH:[^ ]+(/|\\\\)lib(/|\\\\)swift(/|\\\\)linux]]
|
||||
// LINUX_DYNLIB-x86_64: [[STDLIB_PATH]]{{/|\\\\}}x86_64{{/|\\\\}}swiftrt.o
|
||||
// LINUX_DYNLIB-x86_64-DAG: [[OBJECTFILE]]
|
||||
// LINUX_DYNLIB-x86_64-DAG: @[[AUTOLINKFILE]]
|
||||
// LINUX_DYNLIB-x86_64-DAG: [[STDLIB_PATH]]
|
||||
@@ -301,8 +302,8 @@
|
||||
// IOS-linker-order: swift
|
||||
// IOS-linker-order: -o [[OBJECTFILE:.*]]
|
||||
|
||||
// IOS-linker-order: bin/ld{{"? }}
|
||||
// IOS-linker-order: -rpath [[STDLIB_PATH:[^ ]+/lib/swift/iphonesimulator]]
|
||||
// IOS-linker-order: {{(bin/)?}}ld{{"? }}
|
||||
// IOS-linker-order: -rpath [[STDLIB_PATH:[^ ]+(/|\\\\)lib(/|\\\\)swift(/|\\\\)iphonesimulator]]
|
||||
// IOS-linker-order: -L foo
|
||||
// IOS-linker-order: -rpath customrpath
|
||||
// IOS-linker-order: -o {{.*}}
|
||||
@@ -310,8 +311,8 @@
|
||||
// LINUX-linker-order: swift
|
||||
// LINUX-linker-order: -o [[OBJECTFILE:.*]]
|
||||
|
||||
// LINUX-linker-order: clang++{{"? }}
|
||||
// LINUX-linker-order: -Xlinker -rpath -Xlinker {{[^ ]+/lib/swift/linux}}
|
||||
// LINUX-linker-order: clang++{{(\.exe)?"? }}
|
||||
// LINUX-linker-order: -Xlinker -rpath -Xlinker {{[^ ]+(/|\\\\)lib(/|\\\\)swift(/|\\\\)linux}}
|
||||
// LINUX-linker-order: -L foo
|
||||
// LINUX-linker-order: -Xlinker -rpath -Xlinker customrpath
|
||||
// LINUX-linker-order: -o {{.*}}
|
||||
@@ -330,32 +331,32 @@
|
||||
// WINDOWS-clang-linker-order: -foo foopath
|
||||
// WINDOWS-clang-linker-order: -o {{.*}}
|
||||
|
||||
// DEBUG: bin/swift
|
||||
// DEBUG-NEXT: bin/swift
|
||||
// DEBUG-NEXT: bin/ld{{"? }}
|
||||
// DEBUG: -add_ast_path {{.*}}/{{[^/]+}}.swiftmodule
|
||||
// DEBUG: bin{{/|\\\\}}swift{{c?(\.EXE)?}}
|
||||
// DEBUG-NEXT: bin{{/|\\\\}}swift{{c?(\.EXE)?}}
|
||||
// DEBUG-NEXT: {{(bin/)?}}ld{{"? }}
|
||||
// DEBUG: -add_ast_path {{.*(/|\\\\)[^/]+}}.swiftmodule
|
||||
// DEBUG: -o linker
|
||||
// DEBUG-NEXT: {{^|bin/}}dsymutil
|
||||
// DEBUG-NEXT: bin{{/|\\\\}}dsymutil
|
||||
// DEBUG: linker
|
||||
// DEBUG: -o linker.dSYM
|
||||
|
||||
// LINK-SWIFTMODULES: bin/swift
|
||||
// LINK-SWIFTMODULES-NEXT: bin/ld{{"? }}
|
||||
// LINK-SWIFTMODULES: bin{{/|\\\\}}swift{{c?(\.EXE)?}}
|
||||
// LINK-SWIFTMODULES-NEXT: {{(bin/)?}}ld{{"? }}
|
||||
// LINK-SWIFTMODULES-SAME: -add_ast_path {{.*}}/a.swiftmodule
|
||||
// LINK-SWIFTMODULES-SAME: -add_ast_path {{.*}}/b.swiftmodule
|
||||
// LINK-SWIFTMODULES-SAME: -o linker
|
||||
|
||||
// COMPILE_AND_LINK: bin/swift
|
||||
// COMPILE_AND_LINK: bin{{/|\\\\}}swift{{c?(\.EXE)?}}
|
||||
// COMPILE_AND_LINK-NOT: /a.o
|
||||
// COMPILE_AND_LINK: linker.swift
|
||||
// COMPILE_AND_LINK-NOT: /a.o
|
||||
// COMPILE_AND_LINK-NEXT: bin/ld{{"? }}
|
||||
// COMPILE_AND_LINK-NEXT: {{(bin/)?}}ld{{"? }}
|
||||
// COMPILE_AND_LINK-DAG: /a.o
|
||||
// COMPILE_AND_LINK-DAG: .o
|
||||
// COMPILE_AND_LINK: -o linker
|
||||
|
||||
|
||||
// FILELIST: bin/ld{{"? }}
|
||||
// FILELIST: {{(bin/)?}}ld{{"? }}
|
||||
// FILELIST-NOT: .o{{"? }}
|
||||
// FILELIST: -filelist {{"?[^-]}}
|
||||
// FILELIST-NOT: .o{{"? }}
|
||||
@@ -364,9 +365,9 @@
|
||||
// FILELIST: -o linker
|
||||
|
||||
|
||||
// INFERRED_NAME_DARWIN: bin/swift
|
||||
// INFERRED_NAME_DARWIN: bin{{/|\\\\}}swift{{c?(\.EXE)?}}
|
||||
// INFERRED_NAME_DARWIN: -module-name LINKER
|
||||
// INFERRED_NAME_DARWIN: bin/ld{{"? }}
|
||||
// INFERRED_NAME_DARWIN: {{(bin/)?}}ld{{"? }}
|
||||
// INFERRED_NAME_DARWIN: -o libLINKER.dylib
|
||||
// INFERRED_NAME_LINUX: -o libLINKER.so
|
||||
// INFERRED_NAME_WINDOWS: -o LINKER.dll
|
||||
@@ -382,8 +383,8 @@
|
||||
// RUN: %hardlink-or-copy(from: %swift_driver_plain, to: %t/DISTINCTIVE-PATH/usr/bin/swiftc)
|
||||
// RUN: %t/DISTINCTIVE-PATH/usr/bin/swiftc -target x86_64-apple-macosx10.9 %s -### | %FileCheck -check-prefix=RELATIVE-LINKER %s
|
||||
|
||||
// RELATIVE-LINKER: /DISTINCTIVE-PATH/usr/bin/swift
|
||||
// RELATIVE-LINKER: /DISTINCTIVE-PATH/usr/bin/ld
|
||||
// RELATIVE-LINKER: {{/|\\\\}}DISTINCTIVE-PATH{{/|\\\\}}usr{{/|\\\\}}bin{{/|\\\\}}swift
|
||||
// RELATIVE-LINKER: {{/|\\\\}}DISTINCTIVE-PATH{{/|\\\\}}usr{{/|\\\\}}bin{{/|\\\\}}ld
|
||||
// RELATIVE-LINKER: -o {{[^ ]+}}
|
||||
|
||||
// Also test arclite detection. This uses xcrun to find arclite when it's not
|
||||
@@ -395,16 +396,16 @@
|
||||
|
||||
// RUN: env PATH=%t/ANOTHER-DISTINCTIVE-PATH/usr/bin %t/DISTINCTIVE-PATH/usr/bin/swiftc -target x86_64-apple-macosx10.9 %s -### | %FileCheck -check-prefix=XCRUN_ARCLITE %s
|
||||
|
||||
// XCRUN_ARCLITE: bin/ld{{"? }}
|
||||
// XCRUN_ARCLITE: /ANOTHER-DISTINCTIVE-PATH/usr/lib/arc/libarclite_macosx.a
|
||||
// XCRUN_ARCLITE: bin{{/|\\\\}}ld
|
||||
// XCRUN_ARCLITE: {{/|\\\\}}ANOTHER-DISTINCTIVE-PATH{{/|\\\\}}usr{{/|\\\\}}lib{{/|\\\\}}arc{{/|\\\\}}libarclite_macosx.a
|
||||
// XCRUN_ARCLITE: -o {{[^ ]+}}
|
||||
|
||||
// RUN: %empty-directory(%t/DISTINCTIVE-PATH/usr/lib/arc)
|
||||
|
||||
// RUN: env PATH=%t/ANOTHER-DISTINCTIVE-PATH/usr/bin %t/DISTINCTIVE-PATH/usr/bin/swiftc -target x86_64-apple-macosx10.9 %s -### | %FileCheck -check-prefix=RELATIVE_ARCLITE %s
|
||||
|
||||
// RELATIVE_ARCLITE: bin/ld{{"? }}
|
||||
// RELATIVE_ARCLITE: /DISTINCTIVE-PATH/usr/lib/arc/libarclite_macosx.a
|
||||
// RELATIVE_ARCLITE: bin{{/|\\\\}}ld
|
||||
// RELATIVE_ARCLITE: {{/|\\\\}}DISTINCTIVE-PATH{{/|\\\\}}usr{{/|\\\\}}lib{{/|\\\\}}arc{{/|\\\\}}libarclite_macosx.a
|
||||
// RELATIVE_ARCLITE: -o {{[^ ]+}}
|
||||
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
// CHECK: "name":"loaded_module_trace"
|
||||
// CHECK: "arch":"{{[^"]*}}"
|
||||
// CHECK: "swiftmodules":[
|
||||
// CHECK: "{{[^"]*}}/Module2.swiftmodule"
|
||||
// CHECK: "{{[^"]*}}/Swift.swiftmodule"
|
||||
// CHECK: "{{[^"]*}}/SwiftOnoneSupport.swiftmodule"
|
||||
// CHECK: "{{[^"]*(/|\\\\)}}Module2.swiftmodule"
|
||||
// CHECK: "{{[^"]*(/|\\\\)}}Swift.swiftmodule"
|
||||
// CHECK: "{{[^"]*(/|\\\\)}}SwiftOnoneSupport.swiftmodule"
|
||||
// CHECK: ]
|
||||
// CHECK: }
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// CHECK: "name":"loaded_module_trace_env"
|
||||
// CHECK: "arch":"{{[^"]*}}"
|
||||
// CHECK: "swiftmodules":[
|
||||
// CHECK: "{{[^"]*}}/Swift.swiftmodule"
|
||||
// CHECK: "{{[^"]*}}/SwiftOnoneSupport.swiftmodule"
|
||||
// CHECK: "{{[^"]*(/|\\\\)}}Swift.swiftmodule"
|
||||
// CHECK: "{{[^"]*(/|\\\\)}}SwiftOnoneSupport.swiftmodule"
|
||||
// CHECK: ]
|
||||
// CHECK: }
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
// CHECK: "name":"loaded_module_trace_multifile"
|
||||
// CHECK: "arch":"{{[^"]*}}"
|
||||
// CHECK: "swiftmodules":[
|
||||
// CHECK: "{{[^"]*}}/Module2.swiftmodule"
|
||||
// CHECK: "{{[^"]*}}/Module.swiftmodule"
|
||||
// CHECK: "{{[^"]*}}/Swift.swiftmodule"
|
||||
// CHECK: "{{[^"]*}}/SwiftOnoneSupport.swiftmodule"
|
||||
// CHECK: "{{[^"]*[/\\]}}Module2.swiftmodule"
|
||||
// CHECK: "{{[^"]*[/\\]}}Module.swiftmodule"
|
||||
// CHECK: "{{[^"]*[/\\]}}Swift.swiftmodule"
|
||||
// CHECK: "{{[^"]*[/\\]}}SwiftOnoneSupport.swiftmodule"
|
||||
// CHECK: ]
|
||||
// CHECK: }
|
||||
|
||||
|
||||
@@ -16,35 +16,35 @@
|
||||
|
||||
// RUN: %swiftc_driver -emit-module -driver-print-jobs -driver-filelist-threshold=0 %s %S/../Inputs/empty.swift -module-name main 2>&1 | %FileCheck -check-prefix FILELISTS %s
|
||||
|
||||
// CHECK: bin/swift{{c?}} -frontend
|
||||
// CHECK: {{bin(/|\\\\)swiftc?(\.EXE)?"?}} -frontend
|
||||
// CHECK: -module-name {{[^ ]+}}
|
||||
// CHECK: -o [[OBJECTFILE:.*]]
|
||||
|
||||
// CHECK-NEXT: bin/swift{{c?}} -frontend
|
||||
// CHECK-NEXT: {{bin(/|\\\\)swiftc?(\.EXE)?"?}} -frontend
|
||||
// CHECK: -emit-module
|
||||
// CHECK: -module-name {{[^ ]+}}
|
||||
// CHECK: -o {{[^ ]+}}
|
||||
|
||||
|
||||
// SIMPLE: bin/swift{{c?}} -frontend
|
||||
// SIMPLE: {{bin(/|\\\\)swiftc?(\.EXE)?"?}} -frontend
|
||||
// SIMPLE: -emit-module
|
||||
// SIMPLE: -primary-file
|
||||
// SIMPLE: -emit-module-doc-path {{[^ ]*}}/merge-module-{{[^ ]*}}.swiftdoc
|
||||
// SIMPLE: -o {{[^ ]*}}/merge-module-{{[^ ]*}}.swiftmodule
|
||||
// SIMPLE: bin/swift{{c?}} -frontend
|
||||
// SIMPLE: -emit-module-doc-path {{[^ ]*[/\\]}}merge-module-{{[^ ]*}}.swiftdoc
|
||||
// SIMPLE: -o {{[^ ]*[/\\]}}merge-module-{{[^ ]*}}.swiftmodule
|
||||
// SIMPLE: {{bin(/|\\\\)swiftc?(\.EXE)?"?}} -frontend
|
||||
// SIMPLE: -emit-module
|
||||
// SIMPLE: -o main.swiftmodule
|
||||
|
||||
|
||||
// COMPLEX: bin/swift{{c?}} -frontend
|
||||
// COMPLEX: {{bin(/|\\\\)swiftc?(\.EXE)?"?}} -frontend
|
||||
// COMPLEX: -emit-module
|
||||
// COMPLEX-DAG: -emit-module-doc-path {{[^ ]*}}/merge-module-{{[^ ]*}}.swiftdoc
|
||||
// COMPLEX-DAG: -emit-module-doc-path {{[^ ]*[/\\]}}merge-module-{{[^ ]*}}.swiftdoc
|
||||
// COMPLEX-DAG: -sdk {{.*}}/Inputs/clang-importer-sdk
|
||||
// COMPLEX-DAG: -foo -bar
|
||||
// COMPLEX-DAG: -F /path/to/frameworks -F /path/to/more/frameworks
|
||||
// COMPLEX-DAG: -I /path/to/headers -I path/to/more/headers
|
||||
// COMPLEX-DAG: -module-cache-path /tmp/modules
|
||||
// COMPLEX: bin/swift{{c?}} -frontend
|
||||
// COMPLEX: {{bin(/|\\\\)swiftc?(\.EXE)?"?}} -frontend
|
||||
// COMPLEX: -emit-module
|
||||
// COMPLEX-DAG: -F /path/to/frameworks -F /path/to/more/frameworks
|
||||
// COMPLEX-DAG: -I /path/to/headers -I path/to/more/headers
|
||||
@@ -52,27 +52,27 @@
|
||||
// COMPLEX: -o sdk.out
|
||||
|
||||
|
||||
// TWO-OUTPUTS: bin/swift{{c?}} -frontend
|
||||
// TWO-OUTPUTS: {{bin(/|\\\\)swiftc?(\.EXE)?"?}} -frontend
|
||||
// TWO-OUTPUTS: -emit-module-path [[MODULE:[^ ]+]]
|
||||
// TWO-OUTPUTS: -emit-module-doc-path {{[^ ]*}}/merge-module-{{[^ ]*}}.swiftdoc
|
||||
// TWO-OUTPUTS: -o {{[^ ]*}}/merge-module-{{[^ ]*}}.o
|
||||
// TWO-OUTPUTS: bin/swift{{c?}} -frontend
|
||||
// TWO-OUTPUTS: -emit-module-doc-path {{[^ ]*[/\\]}}merge-module-{{[^ ]*}}.swiftdoc
|
||||
// TWO-OUTPUTS: -o {{[^ ]*[/\\]}}merge-module-{{[^ ]*}}.o
|
||||
// TWO-OUTPUTS: {{bin(/|\\\\)swiftc?(\.EXE)?"?}} -frontend
|
||||
// TWO-OUTPUTS: -emit-module [[MODULE]]
|
||||
// TWO-OUTPUTS: -o main.swiftmodule
|
||||
|
||||
// THREE-OUTPUTS: bin/swift{{c?}} -frontend
|
||||
// THREE-OUTPUTS: {{bin(/|\\\\)swiftc?(\.EXE)?"?}} -frontend
|
||||
// THREE-OUTPUTS: -emit-module-path [[MODULE:[^ ]+]]
|
||||
// THREE-OUTPUTS: -emit-module-doc-path {{[^ ]*}}/merge-module-{{[^ ]*}}.swiftdoc
|
||||
// THREE-OUTPUTS: -o {{[^ ]*}}/merge-module-{{[^ ]*}}.o
|
||||
// THREE-OUTPUTS: bin/swift{{c?}} -frontend
|
||||
// THREE-OUTPUTS: -emit-module-doc-path {{[^ ]*[/\\]}}merge-module-{{[^ ]*}}.swiftdoc
|
||||
// THREE-OUTPUTS: -o {{[^ ]*[/\\]}}merge-module-{{[^ ]*}}.o
|
||||
// THREE-OUTPUTS: {{bin(/|\\\\)swiftc?(\.EXE)?"?}} -frontend
|
||||
// THREE-OUTPUTS: -emit-module [[MODULE]]
|
||||
// THREE-OUTPUTS: -emit-objc-header-path sdk.foo.h
|
||||
// THREE-OUTPUTS: -o sdk.foo.out
|
||||
|
||||
|
||||
// FILELISTS: bin/swift{{c?}} -frontend
|
||||
// FILELISTS-NEXT: bin/swift{{c?}} -frontend
|
||||
// FILELISTS-NEXT: bin/swift{{c?}} -frontend
|
||||
// FILELISTS: {{bin(/|\\\\)swiftc?(\.EXE)?"?}} -frontend
|
||||
// FILELISTS-NEXT: {{bin(/|\\\\)swiftc?(\.EXE)?"?}} -frontend
|
||||
// FILELISTS-NEXT: {{bin(/|\\\\)swiftc?(\.EXE)?"?}} -frontend
|
||||
// FILELISTS-NOT: .swiftmodule
|
||||
// FILELISTS: -filelist {{[^ ]+}}
|
||||
// FILELISTS-NOT: .swiftmodule
|
||||
@@ -83,15 +83,15 @@
|
||||
// RUN: %FileCheck %s < %t.complex.txt
|
||||
// RUN: %FileCheck -check-prefix MERGE_1 %s < %t.complex.txt
|
||||
|
||||
// MERGE_1: bin/swift{{c?}} -frontend -emit-module -primary-file {{[^ ]+}}/Inputs/main.swift {{[^ ]+}}/Inputs/lib.swift
|
||||
// MERGE_1: {{bin(/|\\\\)swiftc?(\.EXE)?"?}} -frontend -emit-module -primary-file {{[^ ]+[/\\]}}Inputs{{/|\\\\}}main.swift{{"?}} {{[^ ]+[/\\]}}Inputs{{/|\\\\}}lib.swift
|
||||
// MERGE_1: -emit-module-doc-path [[PARTIAL_MODULE_A:[^ ]+]].swiftdoc
|
||||
// MERGE_1: -module-name merge
|
||||
// MERGE_1: -o [[PARTIAL_MODULE_A]].swiftmodule
|
||||
// MERGE_1: bin/swift{{c?}} -frontend -emit-module {{[^ ]+}}/Inputs/main.swift -primary-file {{[^ ]+}}/Inputs/lib.swift
|
||||
// MERGE_1: {{bin(/|\\\\)swiftc?(\.EXE)?"?}} -frontend -emit-module {{[^ ]+[/\\]}}Inputs{{/|\\\\}}main.swift{{"?}} -primary-file {{[^ ]+[/\\]}}Inputs{{/|\\\\}}lib.swift
|
||||
// MERGE_1: -emit-module-doc-path [[PARTIAL_MODULE_B:[^ ]+]].swiftdoc
|
||||
// MERGE_1: -module-name merge
|
||||
// MERGE_1: -o [[PARTIAL_MODULE_B]].swiftmodule
|
||||
// MERGE_1: bin/swift{{c?}} -frontend -merge-modules -emit-module [[PARTIAL_MODULE_A]].swiftmodule [[PARTIAL_MODULE_B]].swiftmodule
|
||||
// MERGE_1: {{bin(/|\\\\)swiftc?(\.EXE)?"?}} -frontend -merge-modules -emit-module [[PARTIAL_MODULE_A]].swiftmodule{{"?}} [[PARTIAL_MODULE_B]].swiftmodule
|
||||
// MERGE_1: -parse-as-library
|
||||
// MERGE_1: -emit-module-doc-path /tmp/modules.swiftdoc
|
||||
// MERGE_1: -module-name merge
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: not %swiftc_driver -c %S/../Inputs/empty.swift -output-file-map %t/something-which-should-not-exist.json 2>&1 | %FileCheck %s
|
||||
//
|
||||
// CHECK: error: unable to load output file map '{{.*}}/something-which-should-not-exist.json': No such file or directory
|
||||
// CHECK: error: unable to load output file map '{{.*}}/something-which-should-not-exist.json': {{[Nn]}}o such file or directory
|
||||
// CHECK-NOT: Assertion failed
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-unknown-linux-gnu -g %s | %FileCheck %s
|
||||
|
||||
// CHECK: bin/swift -frontend{{.*}}-emit-module-path [[MOD:.*\.swiftmodule]]
|
||||
// CHECK: bin/swift {{.*}}-emit-module [[MOD]]
|
||||
// CHECK: bin{{/|\\\\}}swift{{c?(\.EXE)?"?}} -frontend{{.*}}-emit-module-path [[MOD:.*\.swiftmodule]]
|
||||
// CHECK: bin{{/|\\\\}}swift{{c?(\.EXE)?"?}} {{.*}}-emit-module [[MOD]]
|
||||
// CHECK-SAME: -o [[MERGED:.*\.swiftmodule]]
|
||||
// CHECK: bin/swift -modulewrap [[MERGED]] -target x86_64-unknown-linux-gnu -o [[OBJ:.*\.o]]
|
||||
// CHECK: bin/clang++{{.*}} [[OBJ]]
|
||||
// CHECK: bin{{/|\\\\}}swift{{c?(\.EXE)?"?}} -modulewrap [[MERGED]]{{"?}} -target x86_64-unknown-linux-gnu -o [[OBJ:.*\.o]]
|
||||
// CHECK: bin{{/|\\\\}}clang++{{.*}} [[OBJ]]
|
||||
|
||||
@@ -1,50 +1,50 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-swiftc_driver -driver-print-jobs -module-name=ThisModule -wmo -num-threads 4 %S/Inputs/main.swift %s -emit-module -o test.swiftmodule | %FileCheck -check-prefix=MODULE %s
|
||||
// RUN: echo "{\"%s\": {\"assembly\": \"/build/multi-threaded.s\"}, \"%S/Inputs/main.swift\": {\"assembly\": \"/build/main.s\"}}" > %t/ofms.json
|
||||
// RUN: %target-swiftc_driver -driver-print-jobs -module-name=ThisModule -wmo -num-threads 4 %S/Inputs/main.swift %s -output-file-map %t/ofms.json -S | %FileCheck -check-prefix=ASSEMBLY %s
|
||||
// RUN: echo "{\"%/s\": {\"assembly\": \"/build/multi-threaded.s\"}, \"%/S/Inputs/main.swift\": {\"assembly\": \"/build/main.s\"}}" > %t/ofms.json
|
||||
// RUN: %target-swiftc_driver -driver-print-jobs -module-name=ThisModule -wmo -num-threads 4 %/S/Inputs/main.swift %/s -output-file-map %t/ofms.json -S | %FileCheck -check-prefix=ASSEMBLY %s
|
||||
// RUN: %target-swiftc_driver -driver-print-jobs -module-name=ThisModule -wmo -num-threads 4 %S/Inputs/main.swift %s -c | %FileCheck -check-prefix=OBJECT %s
|
||||
// RUN: (cd %t && %target-swiftc_driver -parseable-output -module-name=ThisModule -wmo -num-threads 4 %S/Inputs/main.swift %s -c) 2> %t/parseable-output
|
||||
// RUN: cd %t && %target-swiftc_driver -parseable-output -module-name=ThisModule -wmo -num-threads 4 %S/Inputs/main.swift %s -c 2> %t/parseable-output
|
||||
// RUN: cat %t/parseable-output | %FileCheck -check-prefix=PARSEABLE %s
|
||||
// RUN: (cd %t && env TMPDIR=/tmp %swiftc_driver -driver-print-jobs -module-name=ThisModule -wmo -num-threads 4 %S/Inputs/main.swift %s -o a.out ) | %FileCheck -check-prefix=EXEC %s
|
||||
// RUN: echo "{\"%s\": {\"llvm-bc\": \"%t/multi-threaded.bc\", \"object\": \"%t/multi-threaded.o\"}, \"%S/Inputs/main.swift\": {\"llvm-bc\": \"%t/main.bc\", \"object\": \"%t/main.o\"}}" > %t/ofmo.json
|
||||
// RUN: cd %t && env TMPDIR=/tmp %swiftc_driver -driver-print-jobs -module-name=ThisModule -wmo -num-threads 4 %S/Inputs/main.swift %s -o a.out | %FileCheck -check-prefix=EXEC %s
|
||||
// RUN: echo "{\"%/s\": {\"llvm-bc\": \"%/t/multi-threaded.bc\", \"object\": \"%/t/multi-threaded.o\"}, \"%/S/Inputs/main.swift\": {\"llvm-bc\": \"%/t/main.bc\", \"object\": \"%/t/main.o\"}}" > %t/ofmo.json
|
||||
// RUN: %target-swiftc_driver -module-name=ThisModule -wmo -num-threads 4 %S/Inputs/main.swift %s -emit-dependencies -output-file-map %t/ofmo.json -c
|
||||
// RUN: cat %t/*.d | %FileCheck -check-prefix=DEPENDENCIES %s
|
||||
|
||||
// Check if -embed-bitcode works
|
||||
// RUN: %target-swiftc_driver -driver-print-jobs -module-name=ThisModule -embed-bitcode -wmo -num-threads 4 %S/Inputs/main.swift %s -output-file-map %t/ofmo.json -c | %FileCheck -check-prefix=BITCODE %s
|
||||
// RUN: %target-swiftc_driver -driver-print-jobs -module-name=ThisModule -embed-bitcode -wmo -num-threads 4 %/S/Inputs/main.swift %/s -output-file-map %t/ofmo.json -c | %FileCheck -check-prefix=BITCODE %s
|
||||
|
||||
// Check if -embed-bitcode works with -parseable-output
|
||||
// RUN: %target-swiftc_driver -parseable-output -module-name=ThisModule -embed-bitcode -wmo -num-threads 4 %S/Inputs/main.swift %s -output-file-map %t/ofmo.json -c 2> %t/parseable2
|
||||
// RUN: %target-swiftc_driver -parseable-output -module-name=ThisModule -embed-bitcode -wmo -num-threads 4 %/S/Inputs/main.swift %/s -output-file-map %t/ofmo.json -c 2> %t/parseable2
|
||||
// RUN: cat %t/parseable2 | %FileCheck -check-prefix=PARSEABLE2 %s
|
||||
|
||||
// Check if linking works with -parseable-output
|
||||
// RUN: (cd %t && %target-swiftc_driver -parseable-output -module-name=ThisModule -wmo -num-threads 4 %S/Inputs/main.swift %s -output-file-map %t/ofmo.json -o a.out) 2> %t/parseable3
|
||||
// RUN: cd %t && %target-swiftc_driver -parseable-output -module-name=ThisModule -wmo -num-threads 4 %/S/Inputs/main.swift %/s -output-file-map %t/ofmo.json -o a.out 2> %t/parseable3
|
||||
// RUN: cat %t/parseable3 | %FileCheck -check-prefix=PARSEABLE3 %s
|
||||
|
||||
// MODULE: -frontend
|
||||
// MODULE-DAG: -num-threads 4
|
||||
// MODULE-DAG: {{[^ ]*}}/Inputs/main.swift {{[^ ]*}}/multi-threaded.swift
|
||||
// MODULE-DAG: {{[^ ]*[/\\]}}Inputs{{/|\\\\}}main.swift{{"?}} {{[^ ]*[/\\]}}multi-threaded.swift
|
||||
// MODULE-DAG: -o test.swiftmodule
|
||||
// MODULE-NOT: ld
|
||||
|
||||
// ASSEMBLY: -frontend
|
||||
// ASSEMBLY-DAG: -num-threads 4
|
||||
// ASSEMBLY-DAG: {{[^ ]*}}/Inputs/main.swift {{[^ ]*}}/multi-threaded.swift
|
||||
// ASSEMBLY-DAG: {{[^ ]*[/\\]}}Inputs{{/|\\\\}}main.swift{{"?}} {{[^ ]*[/\\]}}multi-threaded.swift
|
||||
// ASSEMBLY-DAG: -o /build/main.s -o /build/multi-threaded.s
|
||||
// ASSEMBLY-NOT: ld
|
||||
|
||||
// OBJECT: -frontend
|
||||
// OBJECT-DAG: -num-threads 4
|
||||
// OBJECT-DAG: {{[^ ]*}}/Inputs/main.swift {{[^ ]*}}/multi-threaded.swift
|
||||
// OBJECT-DAG: {{[^ ]*[/\\]}}Inputs{{/|\\\\}}main.swift{{"?}} {{[^ ]*[/\\]}}multi-threaded.swift
|
||||
// OBJECT-DAG: -o main.o -o multi-threaded.o
|
||||
// OBJECT-NOT: ld
|
||||
|
||||
// BITCODE: -frontend
|
||||
// BITCODE-DAG: -num-threads 4
|
||||
// BITCODE-DAG: {{[^ ]*}}/Inputs/main.swift {{[^ ]*}}/multi-threaded.swift
|
||||
// BITCODE-DAG: -o {{.*}}/main.bc -o {{.*}}/multi-threaded.bc
|
||||
// BITCODE-DAG: -frontend -c -primary-file {{.*}}/main.bc {{.*}} -o {{[^ ]*}}main.o
|
||||
// BITCODE-DAG: -frontend -c -primary-file {{.*}}/multi-threaded.bc {{.*}} -o {{[^ ]*}}multi-threaded.o
|
||||
// BITCODE-DAG: {{[^ ]*[/\\]}}Inputs{{/|\\\\}}main.swift{{"?}} {{[^ ]*[/\\]}}multi-threaded.swift
|
||||
// BITCODE-DAG: -o {{.*[/\\]}}main.bc -o {{.*[/\\]}}multi-threaded.bc
|
||||
// BITCODE-DAG: -frontend -c -primary-file {{.*[/\\]}}main.bc {{.*}} -o {{[^ ]*}}main.o
|
||||
// BITCODE-DAG: -frontend -c -primary-file {{.*[/\\]}}multi-threaded.bc {{.*}} -o {{[^ ]*}}multi-threaded.o
|
||||
// BITCODE-NOT: ld
|
||||
|
||||
// PARSEABLE: "outputs": [
|
||||
@@ -53,37 +53,37 @@
|
||||
|
||||
// EXEC: -frontend
|
||||
// EXEC-DAG: -num-threads 4
|
||||
// EXEC-DAG: {{[^ ]*}}/Inputs/main.swift {{[^ ]*}}/multi-threaded.swift
|
||||
// EXEC-DAG: -o /tmp/main{{[^ ]*}}.o -o /tmp/multi-threaded{{[^ ]*}}.o
|
||||
// EXEC-DAG: {{[^ ]*[/\\]}}Inputs{{/|\\\\}}main.swift{{"?}} {{[^ ]*[/\\]}}multi-threaded.swift
|
||||
// EXEC-DAG: -o {{.*te?mp.*[/\\]}}main{{[^ ]*}}.o{{"?}} -o {{.*te?mp.*[/\\]}}multi-threaded{{[^ ]*}}.o
|
||||
// EXEC: ld
|
||||
// EXEC: /tmp/main{{[^ ]*}}.o /tmp/multi-threaded{{[^ ]*}}.o
|
||||
// EXEC: {{.*te?mp.*[/\\]}}main{{[^ ]*}}.o{{"?}} {{.*te?mp.*[/\\]}}multi-threaded{{[^ ]*}}.o
|
||||
|
||||
// DEPENDENCIES-DAG: {{.*}}/multi-threaded.o : {{.*}}/multi-threaded.swift {{.*}}/Inputs/main.swift
|
||||
// DEPENDENCIES-DAG: {{.*}}/main.o : {{.*}}/multi-threaded.swift {{.*}}/Inputs/main.swift
|
||||
// DEPENDENCIES-DAG: {{.*}}multi-threaded.o : {{.*[/\\]}}multi-threaded.swift {{.*[/\\]}}Inputs{{[/\\]}}main.swift
|
||||
// DEPENDENCIES-DAG: {{.*}}main.o : {{.*[/\\]}}multi-threaded.swift {{.*[/\\]}}Inputs{{[/\\]}}main.swift
|
||||
|
||||
// PARSEABLE2: "name": "compile"
|
||||
// PARSEABLE2: "outputs": [
|
||||
// PARSEABLE2: "path": "{{.*}}/main.bc"
|
||||
// PARSEABLE2: "path": "{{.*}}/multi-threaded.bc"
|
||||
// PARSEABLE2: "path": "{{.*[/\\]}}main.bc"
|
||||
// PARSEABLE2: "path": "{{.*[/\\]}}multi-threaded.bc"
|
||||
// PARSEABLE2: "name": "backend"
|
||||
// PARSEABLE2: "inputs": [
|
||||
// PARSEABLE2: "{{.*}}/main.bc"
|
||||
// PARSEABLE2: "{{.*[/\\]}}main.bc"
|
||||
// PARSEABLE2: "outputs": [
|
||||
// PARSEABLE2: "path": "{{.*}}/main.o"
|
||||
// PARSEABLE2: "path": "{{.*[/\\]}}main.o"
|
||||
// PARSEABLE2: "name": "backend"
|
||||
// PARSEABLE2: "inputs": [
|
||||
// PARSEABLE2: "{{.*}}/multi-threaded.bc"
|
||||
// PARSEABLE2: "{{.*[/\\]}}multi-threaded.bc"
|
||||
// PARSEABLE2: "outputs": [
|
||||
// PARSEABLE2: "path": "{{.*}}/multi-threaded.o"
|
||||
// PARSEABLE2: "path": "{{.*[/\\]}}multi-threaded.o"
|
||||
|
||||
// PARSEABLE3: "name": "compile"
|
||||
// PARSEABLE3: "outputs": [
|
||||
// PARSEABLE3: "path": "{{.*}}/main.o"
|
||||
// PARSEABLE3: "path": "{{.*}}/multi-threaded.o"
|
||||
// PARSEABLE3: "path": "{{.*}}main.o"
|
||||
// PARSEABLE3: "path": "{{.*}}multi-threaded.o"
|
||||
// PARSEABLE3: "name": "link"
|
||||
// PARSEABLE3: "inputs": [
|
||||
// PARSEABLE3-NEXT: "{{.*}}/main.o"
|
||||
// PARSEABLE3-NEXT: "{{.*}}/multi-threaded.o"
|
||||
// PARSEABLE3-NEXT: "{{.*}}main.o"
|
||||
// PARSEABLE3-NEXT: "{{.*}}multi-threaded.o"
|
||||
// PARSEABLE3: "outputs": [
|
||||
// PARSEABLE3: "path": "a.out"
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
// RUN: %target-swiftc_driver -O %s -o /dev/null 2>&1 | %FileCheck -allow-empty -check-prefix=DEFAULT %s
|
||||
// RUN: %target-swiftc_driver -O -Rpass=sil-inliner %s -o /dev/null 2>&1 | %FileCheck -check-prefix=REMARK_PASSED %s
|
||||
// RUN: %target-swiftc_driver -O -Rpass-missed=sil-inliner %s -o /dev/null 2>&1 | %FileCheck -check-prefix=REMARK_MISSED %s
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-swiftc_driver -O %s -o %t/throwaway 2>&1 | %FileCheck -allow-empty -check-prefix=DEFAULT %s
|
||||
// RUN: %target-swiftc_driver -O -Rpass=sil-inliner %s -o %t/throwaway 2>&1 | %FileCheck -check-prefix=REMARK_PASSED %s
|
||||
// RUN: %target-swiftc_driver -O -Rpass-missed=sil-inliner %s -o %t/throwaway 2>&1 | %FileCheck -check-prefix=REMARK_MISSED %s
|
||||
|
||||
// DEFAULT-NOT: remark
|
||||
// DEFAULT-NOT: remark:
|
||||
|
||||
func big() {
|
||||
print("hello")
|
||||
@@ -38,11 +39,11 @@ func small() {
|
||||
|
||||
func foo() {
|
||||
// REMARK_MISSED-NOT: remark: {{.*}} inlined
|
||||
// REMARK_MISSED: opt-remark.swift:43:2: remark: Not profitable to inline function "null.big()" (cost = {{.*}}, benefit = {{.*}})
|
||||
// REMARK_MISSED: opt-remark.swift:44:2: remark: Not profitable to inline function "throwaway.big()" (cost = {{.*}}, benefit = {{.*}})
|
||||
// REMARK_MISSED-NOT: remark: {{.*}} inlined
|
||||
big()
|
||||
// REMARK_PASSED-NOT: remark: Not profitable
|
||||
// REMARK_PASSED: opt-remark.swift:47:3: remark: "null.small()" inlined into "null.foo()" (cost = {{.*}}, benefit = {{.*}})
|
||||
// REMARK_PASSED: opt-remark.swift:48:3: remark: "throwaway.small()" inlined into "throwaway.foo()" (cost = {{.*}}, benefit = {{.*}})
|
||||
// REMARK_PASSED-NOT: remark: Not profitable
|
||||
small()
|
||||
}
|
||||
|
||||
@@ -11,18 +11,18 @@
|
||||
|
||||
// RUN: %t/usr/bin/swift -sdk "" -deprecated-integrated-repl -### | %FileCheck -check-prefix=INTEGRATED %s
|
||||
|
||||
// INTEGRATED: swift -frontend -repl
|
||||
// INTEGRATED: swift{{c?(\.EXE)?"?}} -frontend -repl
|
||||
// INTEGRATED: -module-name REPL
|
||||
|
||||
|
||||
// RUN: %swift_driver -sdk "" -lldb-repl -### | %FileCheck -check-prefix=LLDB %s
|
||||
// RUN: %swift_driver -sdk "" -lldb-repl -D A -DB -D C -DD -L /path/to/libraries -L /path/to/more/libraries -F /path/to/frameworks -lsomelib -framework SomeFramework -sdk / -I "this folder" -module-name Test -target %target-triple -### | %FileCheck -check-prefix=LLDB-OPTS %s
|
||||
|
||||
// LLDB: lldb{{"?}} {{"?}}--repl=
|
||||
// LLDB: lldb{{(\.exe)?"?}} {{"?}}--repl=
|
||||
// LLDB-NOT: -module-name
|
||||
// LLDB-NOT: -target
|
||||
|
||||
// LLDB-OPTS: lldb{{"?}} "--repl=
|
||||
// LLDB-OPTS: lldb{{(\.exe)?"?}} "--repl=
|
||||
// LLDB-OPTS-DAG: -target {{[^ ]+}}
|
||||
// LLDB-OPTS-DAG: -D A -D B -D C -D D
|
||||
// LLDB-OPTS-DAG: -sdk /
|
||||
|
||||
@@ -83,11 +83,11 @@
|
||||
|
||||
// RUN: %swiftc_driver -incremental %s -### 2>&1 | %FileCheck -check-prefix=INCREMENTAL_WITHOUT_OFM %s
|
||||
// INCREMENTAL_WITHOUT_OFM: warning: ignoring -incremental (currently requires an output file map)
|
||||
// INCREMENTAL_WITHOUT_OFM: swift -frontend
|
||||
// INCREMENTAL_WITHOUT_OFM: swift{{c?(\.EXE)?"?}} -frontend
|
||||
|
||||
// RUN: %swiftc_driver -incremental -output-file-map %S/Inputs/empty-ofm.json %s -### 2>&1 | %FileCheck -check-prefix=INCREMENTAL_WITHOUT_OFM_ENTRY %s
|
||||
// INCREMENTAL_WITHOUT_OFM_ENTRY: ignoring -incremental; output file map has no master dependencies entry ("swift-dependencies" under "")
|
||||
// INCREMENTAL_WITHOUT_OFM_ENTRY: swift -frontend
|
||||
// INCREMENTAL_WITHOUT_OFM_ENTRY: swift{{c?(\.EXE)?"?}} -frontend
|
||||
|
||||
// RUN: %swiftc_driver -driver-print-jobs -enforce-exclusivity=checked %s | %FileCheck -check-prefix=EXCLUSIVITY_CHECKED %s
|
||||
// EXCLUSIVITY_CHECKED: swift
|
||||
|
||||
@@ -6,39 +6,39 @@
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "kind": "began",
|
||||
// CHECK-NEXT: "name": "compile",
|
||||
// CHECK-NEXT: "command": "{{.*}}/swift{{c?}} -frontend -c -primary-file {{.*}}/parseable_output.swift {{.*}} -o {{.*}}/parseable_output-[[OUTPUT:.*]].o",
|
||||
// CHECK-NEXT: "command_executable": "{{.*}}/swift{{c?}}",
|
||||
// CHECK-NEXT: "command": "{{.*[\\/]}}swift{{c?(\.EXE)?(\\")?}} -frontend -c -primary-file {{.*[\\/]}}parseable_output.swift{{(\\")?}} {{.*}} -o {{.*[\\/]}}parseable_output-[[OUTPUT:.*]].o{{(\\")?}}",
|
||||
// CHECK-NEXT: "command_executable": "{{.*[\\/]}}swift{{c?(\.EXE)?}}",
|
||||
// CHECK-NEXT: "command_arguments": [
|
||||
// CHECK-NEXT: "-frontend",
|
||||
// CHECK-NEXT: "-c",
|
||||
// CHECK-NEXT: "-primary-file",
|
||||
// CHECK-NEXT: "{{.*}}/parseable_output.swift",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}parseable_output.swift",
|
||||
// CHECK: "-o",
|
||||
// CHECK-NEXT: "{{.*}}/parseable_output-[[OUTPUT:.*]].o"
|
||||
// CHECK-NEXT: "{{.*[\\/]}}parseable_output-[[OUTPUT:.*]].o"
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "inputs": [
|
||||
// CHECK-NEXT: "{{.*}}/parseable_output.swift"
|
||||
// CHECK-NEXT: "{{.*[\\/]}}parseable_output.swift"
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "outputs": [
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "object",
|
||||
// CHECK-NEXT: "path": "{{.*}}/parseable_output-[[OUTPUT]].o"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}parseable_output-[[OUTPUT]].o"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "dependencies",
|
||||
// CHECK-NEXT: "path": "{{.*}}/parseable_output-[[OUTPUT]].d"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}parseable_output-[[OUTPUT]].d"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "swiftmodule",
|
||||
// CHECK-NEXT: "path": "{{.*}}/parseable_output-[[OUTPUT]].swiftmodule"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}parseable_output-[[OUTPUT]].swiftmodule"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "swiftdoc",
|
||||
// CHECK-NEXT: "path": "{{.*}}/parseable_output-[[OUTPUT]].swiftdoc"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}parseable_output-[[OUTPUT]].swiftdoc"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "diagnostics",
|
||||
// CHECK-NEXT: "path": "{{.*}}/parseable_output-[[OUTPUT]].dia"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}parseable_output-[[OUTPUT]].dia"
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "pid": 1
|
||||
@@ -63,31 +63,31 @@
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "kind": "began",
|
||||
// CHECK-NEXT: "name": "merge-module",
|
||||
// CHECK-NEXT: "command": "{{.*}}/swift{{c?}} -frontend -merge-modules -emit-module {{.*}}/parseable_output-[[OUTPUT]].swiftmodule {{.*}} -o {{.*}}/parseable_output.swift.tmp.swiftmodule",
|
||||
// CHECK-NEXT: "command_executable": "{{.*}}/swift{{c?}}",
|
||||
// CHECK-NEXT: "command": "{{.*[\\/]}}swift{{c?(\.EXE)?(\\")?}} -frontend -merge-modules -emit-module {{.*[\\/]}}parseable_output-[[OUTPUT]].swiftmodule{{(\\")?}} {{.*}} -o {{.*[\\/]}}parseable_output.swift.tmp.swiftmodule{{(\\")?}}",
|
||||
// CHECK-NEXT: "command_executable": "{{.*[\\/]}}swift{{c?(\.EXE)?}}",
|
||||
// CHECK-NEXT: "command_arguments": [
|
||||
// CHECK-NEXT: "-frontend",
|
||||
// CHECK-NEXT: "-merge-modules",
|
||||
// CHECK-NEXT: "-emit-module",
|
||||
// CHECK-NEXT: "{{.*}}/parseable_output-[[OUTPUT]].swiftmodule",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}parseable_output-[[OUTPUT]].swiftmodule",
|
||||
// CHECK: "-o",
|
||||
// CHECK-NEXT: "{{.*}}/parseable_output.swift.tmp.swiftmodule"
|
||||
// CHECK-NEXT: "{{.*[\\/]}}parseable_output.swift.tmp.swiftmodule"
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "inputs": [
|
||||
// CHECK-NEXT: "{{.*}}/parseable_output-[[OUTPUT]].o"
|
||||
// CHECK-NEXT: "{{.*[\\/]}}parseable_output-[[OUTPUT]].o"
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "outputs": [
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "swiftmodule",
|
||||
// CHECK-NEXT: "path": "{{.*}}/parseable_output.swift.tmp.swiftmodule"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}parseable_output.swift.tmp.swiftmodule"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "swiftdoc",
|
||||
// CHECK-NEXT: "path": "{{.*}}/parseable_output.swift.tmp.swiftdoc"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}parseable_output.swift.tmp.swiftdoc"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "objc-header",
|
||||
// CHECK-NEXT: "path": "{{.*}}/parseable_output.swift.tmp.h"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}parseable_output.swift.tmp.h"
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "pid": 2,
|
||||
@@ -112,20 +112,20 @@
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "kind": "began",
|
||||
// CHECK-NEXT: "name": "link",
|
||||
// CHECK-NEXT: "command": "{{.*}}/ld{{(\\")?}} {{.*}}/parseable_output-[[OUTPUT]].o {{.*}} -o {{.*}}/parseable_output.swift.tmp.out",
|
||||
// CHECK-NEXT: "command_executable": "{{.*}}/ld{{(\\")?}}",
|
||||
// CHECK-NEXT: "command": "{{.*[\\/](ld|clang\+\+)(\.exe)?(\\")?.*}}parseable_output-[[OUTPUT]].o{{(\\")?}} {{.*}}-o {{.*[\\/]}}parseable_output.swift.tmp.out{{(\\")?}}",
|
||||
// CHECK-NEXT: "command_executable": "{{.*[\\/](ld|clang\+\+)(\.exe)?}}",
|
||||
// CHECK-NEXT: "command_arguments": [
|
||||
// CHECK-NEXT: "{{.*}}/parseable_output-[[OUTPUT]].o",
|
||||
// CHECK: "{{.*[\\/]}}parseable_output-[[OUTPUT]].o",
|
||||
// CHECK: "-o",
|
||||
// CHECK-NEXT: "{{.*}}/parseable_output.swift.tmp.out"
|
||||
// CHECK-NEXT: "{{.*[\\/]}}parseable_output.swift.tmp.out"
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "inputs": [
|
||||
// CHECK-NEXT: "{{.*}}/parseable_output-[[OUTPUT]].o"
|
||||
// CHECK-NEXT: "{{.*[\\/]}}parseable_output-[[OUTPUT]].o"
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "outputs": [
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "image",
|
||||
// CHECK-NEXT: "path": "{{.*}}/parseable_output.swift.tmp.out"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}parseable_output.swift.tmp.out"
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "pid": 3,
|
||||
|
||||
@@ -6,39 +6,39 @@
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "kind": "began",
|
||||
// CHECK-NEXT: "name": "compile",
|
||||
// CHECK-NEXT: "command": "{{.*}}/swift{{c?}} -frontend -c -primary-file {{.*}}/你好.swift {{.*}} -o {{.*}}/你好-[[OUTPUT:.*]].o",
|
||||
// CHECK-NEXT: "command_executable": "{{.*}}/swift{{c?}}",
|
||||
// CHECK-NEXT: "command": "{{.*[\\/]}}swift{{c?(\.EXE)?(\\")?}} -frontend -c -primary-file {{.*[\\/]}}你好.swift{{(\\")? .*}} -o {{.*[\\/]}}你好-[[OUTPUT:.*]].o{{(\\")?}}",
|
||||
// CHECK-NEXT: "command_executable": "{{.*[\\/]}}swift{{c?(\.EXE)?(\\")?}}",
|
||||
// CHECK-NEXT: "command_arguments": [
|
||||
// CHECK-NEXT: "-frontend",
|
||||
// CHECK-NEXT: "-c",
|
||||
// CHECK-NEXT: "-primary-file",
|
||||
// CHECK-NEXT: "{{.*}}/你好.swift",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}你好.swift",
|
||||
// CHECK: "-o",
|
||||
// CHECK-NEXT: "{{.*}}/你好-[[OUTPUT:.*]].o"
|
||||
// CHECK-NEXT: "{{.*[\\/]}}你好-[[OUTPUT:.*]].o"
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "inputs": [
|
||||
// CHECK-NEXT: "{{.*}}/你好.swift"
|
||||
// CHECK-NEXT: "{{.*[\\/]}}你好.swift"
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "outputs": [
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "object",
|
||||
// CHECK-NEXT: "path": "{{.*}}/你好-[[OUTPUT]].o"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}你好-[[OUTPUT]].o"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "dependencies",
|
||||
// CHECK-NEXT: "path": "{{.*}}/你好-[[OUTPUT]].d"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}你好-[[OUTPUT]].d"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "swiftmodule",
|
||||
// CHECK-NEXT: "path": "{{.*}}/你好-[[OUTPUT]].swiftmodule"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}你好-[[OUTPUT]].swiftmodule"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "swiftdoc",
|
||||
// CHECK-NEXT: "path": "{{.*}}/你好-[[OUTPUT]].swiftdoc"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}你好-[[OUTPUT]].swiftdoc"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "diagnostics",
|
||||
// CHECK-NEXT: "path": "{{.*}}/你好-[[OUTPUT]].dia"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}你好-[[OUTPUT]].dia"
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "pid": 1,
|
||||
@@ -63,31 +63,31 @@
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "kind": "began",
|
||||
// CHECK-NEXT: "name": "merge-module",
|
||||
// CHECK-NEXT: "command": "{{.*}}/swift{{c?}} -frontend -merge-modules -emit-module {{.*}}/你好-[[OUTPUT]].swiftmodule {{.*}} -o {{.*}}/parseable_output_unicode.swift.tmp.swiftmodule",
|
||||
// CHECK-NEXT: "command_executable": "{{.*}}/swift{{c?}}",
|
||||
// CHECK-NEXT: "command": "{{.*[\\/]}}swift{{c?}} -frontend -merge-modules -emit-module {{.*[\\/]}}你好-[[OUTPUT]].swiftmodule {{.*}} -o {{.*[\\/]}}parseable_output_unicode.swift.tmp.swiftmodule",
|
||||
// CHECK-NEXT: "command_executable": "{{.*[\\/]}}swift{{c?}}",
|
||||
// CHECK-NEXT: "command_arguments": [
|
||||
// CHECK-NEXT: "-frontend",
|
||||
// CHECK-NEXT: "-merge-modules",
|
||||
// CHECK-NEXT: "-emit-module",
|
||||
// CHECK-NEXT: "{{.*}}/你好-[[OUTPUT]].swiftmodule",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}你好-[[OUTPUT]].swiftmodule",
|
||||
// CHECK: "-o",
|
||||
// CHECK-NEXT: "{{.*}}/parseable_output_unicode.swift.tmp.swiftmodule"
|
||||
// CHECK-NEXT: "{{.*[\\/]}}parseable_output_unicode.swift.tmp.swiftmodule"
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "inputs": [
|
||||
// CHECK-NEXT: "{{.*}}/你好-[[OUTPUT]].o"
|
||||
// CHECK-NEXT: "{{.*[\\/]}}你好-[[OUTPUT]].o"
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "outputs": [
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "swiftmodule",
|
||||
// CHECK-NEXT: "path": "{{.*}}/parseable_output_unicode.swift.tmp.swiftmodule"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}parseable_output_unicode.swift.tmp.swiftmodule"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "swiftdoc",
|
||||
// CHECK-NEXT: "path": "{{.*}}/parseable_output_unicode.swift.tmp.swiftdoc"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}parseable_output_unicode.swift.tmp.swiftdoc"
|
||||
// CHECK-NEXT: },
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "objc-header",
|
||||
// CHECK-NEXT: "path": "{{.*}}/parseable_output_unicode.swift.tmp.h"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}parseable_output_unicode.swift.tmp.h"
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "pid": 2,
|
||||
@@ -112,20 +112,20 @@
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "kind": "began",
|
||||
// CHECK-NEXT: "name": "link",
|
||||
// CHECK-NEXT: "command": "{{.*}}/ld{{(\\")?}} {{.*}}/你好-[[OUTPUT]].o {{.*}} -o {{.*}}/parseable_output_unicode.swift.tmp.out",
|
||||
// CHECK-NEXT: "command_executable": "{{.*}}/ld{{(\\")?}}",
|
||||
// CHECK-NEXT: "command": "{{.*[\\/]}}ld{{(\\")?}} {{.*[\\/]}}你好-[[OUTPUT]].o {{.*}} -o {{.*[\\/]}}parseable_output_unicode.swift.tmp.out",
|
||||
// CHECK-NEXT: "command_executable": "{{.*[\\/]}}ld{{(\\")?}}",
|
||||
// CHECK-NEXT: "command_arguments": [
|
||||
// CHECK-NEXT: "{{.*}}/你好-[[OUTPUT]].o",
|
||||
// CHECK-NEXT: "{{.*[\\/]}}你好-[[OUTPUT]].o",
|
||||
// CHECK: "-o",
|
||||
// CHECK-NEXT: "{{.*}}/parseable_output_unicode.swift.tmp.out"
|
||||
// CHECK-NEXT: "{{.*[\\/]}}parseable_output_unicode.swift.tmp.out"
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "inputs": [
|
||||
// CHECK-NEXT: "{{.*}}/你好-[[OUTPUT]].o"
|
||||
// CHECK-NEXT: "{{.*[\\/]}}你好-[[OUTPUT]].o"
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "outputs": [
|
||||
// CHECK-NEXT: {
|
||||
// CHECK-NEXT: "type": "image",
|
||||
// CHECK-NEXT: "path": "{{.*}}/parseable_output_unicode.swift.tmp.out"
|
||||
// CHECK-NEXT: "path": "{{.*[\\/]}}parseable_output_unicode.swift.tmp.out"
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "pid": 3,
|
||||
|
||||
@@ -23,33 +23,33 @@
|
||||
// CHECK: swift
|
||||
// CHECK: -profile-generate
|
||||
|
||||
// OSX: bin/ld{{"? }}
|
||||
// OSX: lib/swift/clang/lib/darwin/libclang_rt.profile_osx.a
|
||||
// OSX: {{(bin/)?ld"? }}
|
||||
// OSX: lib{{(\\\\|/)}}swift{{(\\\\|/)}}clang{{(\\\\|/)}}lib{{(\\\\|/)}}darwin{{(\\\\|/)}}libclang_rt.profile_osx.a
|
||||
|
||||
// IOS: bin/ld{{"? }}
|
||||
// IOS: lib/swift/clang/lib/darwin/libclang_rt.profile_ios.a
|
||||
// IOS: {{(bin/)?ld"? }}
|
||||
// IOS: lib{{(\\\\|/)}}swift{{(\\\\|/)}}clang{{(\\\\|/)}}lib{{(\\\\|/)}}darwin{{(\\\\|/)}}libclang_rt.profile_ios.a
|
||||
|
||||
// IOSSIM: bin/ld{{"? }}
|
||||
// IOSSIM: lib/swift/clang/lib/darwin/libclang_rt.profile_iossim.a
|
||||
// IOSSIM: {{(bin/)?ld"? }}
|
||||
// IOSSIM: lib{{(\\\\|/)}}swift{{(\\\\|/)}}clang{{(\\\\|/)}}lib{{(\\\\|/)}}darwin{{(\\\\|/)}}libclang_rt.profile_iossim.a
|
||||
|
||||
// tvOS: bin/ld{{"? }}
|
||||
// tvOS: lib/swift/clang/lib/darwin/libclang_rt.profile_tvos.a
|
||||
// tvOS: {{(bin/)?ld"? }}
|
||||
// tvOS: lib{{(\\\\|/)}}swift{{(\\\\|/)}}clang{{(\\\\|/)}}lib{{(\\\\|/)}}darwin{{(\\\\|/)}}libclang_rt.profile_tvos.a
|
||||
|
||||
// tvOS_SIM: bin/ld{{"? }}
|
||||
// tvOS_SIM: lib/swift/clang/lib/darwin/libclang_rt.profile_tvossim.a
|
||||
// tvOS_SIM: {{(bin/)?ld"? }}
|
||||
// tvOS_SIM: lib{{(\\\\|/)}}swift{{(\\\\|/)}}clang{{(\\\\|/)}}lib{{(\\\\|/)}}darwin{{(\\\\|/)}}libclang_rt.profile_tvossim.a
|
||||
|
||||
// watchOS: bin/ld{{"? }}
|
||||
// watchOS: lib/swift/clang/lib/darwin/libclang_rt.profile_watchos.a
|
||||
// watchOS: {{(bin/)?ld"? }}
|
||||
// watchOS: lib{{(\\\\|/)}}swift{{(\\\\|/)}}clang{{(\\\\|/)}}lib{{(\\\\|/)}}darwin{{(\\\\|/)}}libclang_rt.profile_watchos.a
|
||||
|
||||
// watchOS_SIM: bin/ld{{"? }}
|
||||
// watchOS_SIM: lib/swift/clang/lib/darwin/libclang_rt.profile_watchossim.a
|
||||
// watchOS_SIM: {{(bin/)?ld"? }}
|
||||
// watchOS_SIM: lib{{(\\\\|/)}}swift{{(\\\\|/)}}clang{{(\\\\|/)}}lib{{(\\\\|/)}}darwin{{(\\\\|/)}}libclang_rt.profile_watchossim.a
|
||||
|
||||
// LINUX: clang++{{"? }}
|
||||
// LINUX: lib/swift/clang/lib/linux/libclang_rt.profile-x86_64.a
|
||||
// LINUX: clang++{{(\.exe)?"? }}
|
||||
// LINUX: lib{{(\\\\|/)}}swift{{(\\\\|/)}}clang{{(\\\\|/)}}lib{{(\\\\|/)}}linux{{(\\\\|/)}}libclang_rt.profile-x86_64.a
|
||||
// LINUX: -u__llvm_profile_runtime
|
||||
|
||||
// WINDOWS: clang++{{"? }}
|
||||
// WINDOWS: lib/swift/clang/lib/windows/clang_rt.profile-x86_64.lib
|
||||
// WINDOWS: clang++{{(\.exe)?"? }}
|
||||
// WINDOWS: lib{{(\\\\|/)}}swift{{(\\\\|/)}}clang{{(\\\\|/)}}lib{{(\\\\|/)}}windows{{(\\\\|/)}}clang_rt.profile-x86_64.lib
|
||||
// WINDOWS: -u__llvm_profile_runtime
|
||||
|
||||
// RUN: not %swiftc_driver -driver-print-jobs -profile-generate -profile-use=/dev/null %s 2>&1 | %FileCheck -check-prefix=MIX_GEN_USE %s
|
||||
@@ -60,4 +60,4 @@
|
||||
|
||||
// RUN: %swiftc_driver -driver-print-jobs -profile-use=/dev/null %s | %FileCheck -check-prefix=USE_DEVNULL %s
|
||||
// USE_DEVNULL: swift
|
||||
// USE_DEVNULL: -profile-use=/dev/null
|
||||
// USE_DEVNULL: -profile-use={{/dev/null|(.*local\\\\temp\\\\.*profiling-[^ ]*.o)}}
|
||||
|
||||
@@ -43,9 +43,9 @@
|
||||
/*
|
||||
* Bad Argument Tests
|
||||
*/
|
||||
// RUN: not %swiftc_driver -resource-dir %S/Inputs/fake-resource-dir/lib/swift/ -driver-print-jobs -sanitize=address,unknown %s 2>&1 | %FileCheck -check-prefix=BADARG %s
|
||||
// RUN: not %swiftc_driver -resource-dir %S/Inputs/fake-resource-dir/lib/swift/ -driver-print-jobs -sanitize=address -sanitize=unknown %s 2>&1 | %FileCheck -check-prefix=BADARG %s
|
||||
// RUN: not %swiftc_driver -resource-dir %S/Inputs/fake-resource-dir/lib/swift/ -driver-print-jobs -sanitize=address,thread %s 2>&1 | %FileCheck -check-prefix=INCOMPATIBLESANITIZERS %s
|
||||
// RUN: not %swiftc_driver -resource-dir %S/Inputs/fake-resource-dir/lib/swift/ -driver-print-jobs -target x86_64-apple-macosx10.9 -sanitize=address,unknown %s 2>&1 | %FileCheck -check-prefix=BADARG %s
|
||||
// RUN: not %swiftc_driver -resource-dir %S/Inputs/fake-resource-dir/lib/swift/ -driver-print-jobs -target x86_64-apple-macosx10.9 -sanitize=address -sanitize=unknown %s 2>&1 | %FileCheck -check-prefix=BADARG %s
|
||||
// RUN: not %swiftc_driver -resource-dir %S/Inputs/fake-resource-dir/lib/swift/ -driver-print-jobs -target x86_64-apple-macosx10.9 -sanitize=address,thread %s 2>&1 | %FileCheck -check-prefix=INCOMPATIBLESANITIZERS %s
|
||||
|
||||
/*
|
||||
* Make sure we don't accidentally add the sanitizer library path when building libraries or modules
|
||||
@@ -58,22 +58,22 @@
|
||||
// ASAN: swift
|
||||
// ASAN: -sanitize=address
|
||||
|
||||
// ASAN_OSX: lib/swift/clang/lib/darwin/libclang_rt.asan_osx_dynamic.dylib
|
||||
// ASAN_IOSSIM: lib/swift/clang/lib/darwin/libclang_rt.asan_iossim_dynamic.dylib
|
||||
// ASAN_IOS: lib/swift/clang/lib/darwin/libclang_rt.asan_ios_dynamic.dylib
|
||||
// ASAN_tvOS_SIM: lib/swift/clang/lib/darwin/libclang_rt.asan_tvossim_dynamic.dylib
|
||||
// ASAN_tvOS: lib/swift/clang/lib/darwin/libclang_rt.asan_tvos_dynamic.dylib
|
||||
// ASAN_watchOS_SIM: lib/swift/clang/lib/darwin/libclang_rt.asan_watchossim_dynamic.dylib
|
||||
// ASAN_watchOS: lib/swift/clang/lib/darwin/libclang_rt.asan_watchos_dynamic.dylib
|
||||
// ASAN_LINUX: lib/swift/clang/lib/linux/libclang_rt.asan-x86_64.a
|
||||
// ASAN_WINDOWS: lib/swift/clang/lib/windows/clang_rt.asan-x86_64.lib
|
||||
// ASAN_OSX: lib{{/|\\\\}}swift{{/|\\\\}}clang{{/|\\\\}}lib{{/|\\\\}}darwin{{/|\\\\}}libclang_rt.asan_osx_dynamic.dylib
|
||||
// ASAN_IOSSIM: lib{{/|\\\\}}swift{{/|\\\\}}clang{{/|\\\\}}lib{{/|\\\\}}darwin{{/|\\\\}}libclang_rt.asan_iossim_dynamic.dylib
|
||||
// ASAN_IOS: lib{{/|\\\\}}swift{{/|\\\\}}clang{{/|\\\\}}lib{{/|\\\\}}darwin{{/|\\\\}}libclang_rt.asan_ios_dynamic.dylib
|
||||
// ASAN_tvOS_SIM: lib{{/|\\\\}}swift{{/|\\\\}}clang{{/|\\\\}}lib{{/|\\\\}}darwin{{/|\\\\}}libclang_rt.asan_tvossim_dynamic.dylib
|
||||
// ASAN_tvOS: lib{{/|\\\\}}swift{{/|\\\\}}clang{{/|\\\\}}lib{{/|\\\\}}darwin{{/|\\\\}}libclang_rt.asan_tvos_dynamic.dylib
|
||||
// ASAN_watchOS_SIM: lib{{/|\\\\}}swift{{/|\\\\}}clang{{/|\\\\}}lib{{/|\\\\}}darwin{{/|\\\\}}libclang_rt.asan_watchossim_dynamic.dylib
|
||||
// ASAN_watchOS: lib{{/|\\\\}}swift{{/|\\\\}}clang{{/|\\\\}}lib{{/|\\\\}}darwin{{/|\\\\}}libclang_rt.asan_watchos_dynamic.dylib
|
||||
// ASAN_LINUX: lib{{/|\\\\}}swift{{/|\\\\}}clang{{/|\\\\}}lib{{/|\\\\}}linux{{/|\\\\}}libclang_rt.asan-x86_64.a
|
||||
// ASAN_WINDOWS: lib{{/|\\\\}}swift{{/|\\\\}}clang{{/|\\\\}}lib{{/|\\\\}}windows{{/|\\\\}}clang_rt.asan-x86_64.lib
|
||||
|
||||
// ASAN: -rpath @executable_path
|
||||
|
||||
// TSAN: swift
|
||||
// TSAN: -sanitize=thread
|
||||
|
||||
// TSAN_OSX: lib/swift/clang/lib/darwin/libclang_rt.tsan_osx_dynamic.dylib
|
||||
// TSAN_OSX: lib{{/|\\\\}}swift{{/|\\\\}}clang{{/|\\\\}}lib{{/|\\\\}}darwin{{/|\\\\}}libclang_rt.tsan_osx_dynamic.dylib
|
||||
// TSAN_OSX_32: unsupported option '-sanitize=thread' for target 'x86-apple-macosx10.9'
|
||||
// TSAN_IOSSIM: unsupported option '-sanitize=thread' for target 'x86_64-apple-ios7.1'
|
||||
// TSAN_IOS: unsupported option '-sanitize=thread' for target 'arm64-apple-ios7.1'
|
||||
@@ -82,7 +82,7 @@
|
||||
// TSAN_watchOS_SIM: unsupported option '-sanitize=thread' for target 'i386-apple-watchos2.0'
|
||||
// TSAN_watchOS: unsupported option '-sanitize=thread' for target 'armv7k-apple-watchos2.0'
|
||||
// FUZZER_NONEXISTENT: unsupported option '-sanitize=fuzzer' for target 'x86_64-apple-macosx10.9'
|
||||
// TSAN_LINUX: lib/swift/clang/lib/linux/libclang_rt.tsan-x86_64.a
|
||||
// TSAN_LINUX: lib{{/|\\\\}}swift{{/|\\\\}}clang{{/|\\\\}}lib{{/|\\\\}}linux{{/|\\\\}}libclang_rt.tsan-x86_64.a
|
||||
// TSAN_WINDOWS: unsupported option '-sanitize=thread' for target 'x86_64-unknown-windows-msvc'
|
||||
|
||||
// TSAN: -rpath @executable_path
|
||||
@@ -90,15 +90,15 @@
|
||||
// UBSAN: swift
|
||||
// UBSAN: -sanitize=undefined
|
||||
|
||||
// UBSAN_OSX: lib/swift/clang/lib/darwin/libclang_rt.ubsan_osx_dynamic.dylib
|
||||
// UBSAN_IOSSIM: lib/swift/clang/lib/darwin/libclang_rt.ubsan_iossim_dynamic.dylib
|
||||
// UBSAN_IOS: lib/swift/clang/lib/darwin/libclang_rt.ubsan_ios_dynamic.dylib
|
||||
// UBSAN_tvOS_SIM: lib/swift/clang/lib/darwin/libclang_rt.ubsan_tvossim_dynamic.dylib
|
||||
// UBSAN_tvOS: lib/swift/clang/lib/darwin/libclang_rt.ubsan_tvos_dynamic.dylib
|
||||
// UBSAN_watchOS_SIM: lib/swift/clang/lib/darwin/libclang_rt.ubsan_watchossim_dynamic.dylib
|
||||
// UBSAN_watchOS: lib/swift/clang/lib/darwin/libclang_rt.ubsan_watchos_dynamic.dylib
|
||||
// UBSAN_LINUX: lib/swift/clang/lib/linux/libclang_rt.ubsan-x86_64.a
|
||||
// UBSAN_WINDOWS: lib/swift/clang/lib/windows/clang_rt.ubsan-x86_64.lib
|
||||
// UBSAN_OSX: lib{{/|\\\\}}swift{{/|\\\\}}clang{{/|\\\\}}lib{{/|\\\\}}darwin{{/|\\\\}}libclang_rt.ubsan_osx_dynamic.dylib
|
||||
// UBSAN_IOSSIM: lib{{/|\\\\}}swift{{/|\\\\}}clang{{/|\\\\}}lib{{/|\\\\}}darwin{{/|\\\\}}libclang_rt.ubsan_iossim_dynamic.dylib
|
||||
// UBSAN_IOS: lib{{/|\\\\}}swift{{/|\\\\}}clang{{/|\\\\}}lib{{/|\\\\}}darwin{{/|\\\\}}libclang_rt.ubsan_ios_dynamic.dylib
|
||||
// UBSAN_tvOS_SIM: lib{{/|\\\\}}swift{{/|\\\\}}clang{{/|\\\\}}lib{{/|\\\\}}darwin{{/|\\\\}}libclang_rt.ubsan_tvossim_dynamic.dylib
|
||||
// UBSAN_tvOS: lib{{/|\\\\}}swift{{/|\\\\}}clang{{/|\\\\}}lib{{/|\\\\}}darwin{{/|\\\\}}libclang_rt.ubsan_tvos_dynamic.dylib
|
||||
// UBSAN_watchOS_SIM: lib{{/|\\\\}}swift{{/|\\\\}}clang{{/|\\\\}}lib{{/|\\\\}}darwin{{/|\\\\}}libclang_rt.ubsan_watchossim_dynamic.dylib
|
||||
// UBSAN_watchOS: lib{{/|\\\\}}swift{{/|\\\\}}clang{{/|\\\\}}lib{{/|\\\\}}darwin{{/|\\\\}}libclang_rt.ubsan_watchos_dynamic.dylib
|
||||
// UBSAN_LINUX: lib{{/|\\\\}}swift{{/|\\\\}}clang{{/|\\\\}}lib{{/|\\\\}}linux{{/|\\\\}}libclang_rt.ubsan-x86_64.a
|
||||
// UBSAN_WINDOWS: lib{{/|\\\\}}swift{{/|\\\\}}clang{{/|\\\\}}lib{{/|\\\\}}windows{{/|\\\\}}clang_rt.ubsan-x86_64.lib
|
||||
|
||||
// UBSAN: -rpath @executable_path
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// XFAIL: freebsd, linux
|
||||
// XFAIL: freebsd, linux, win32
|
||||
|
||||
// Test SDK detection for immediate mode.
|
||||
// RUN: %empty-directory(%t)
|
||||
|
||||
@@ -8,39 +8,39 @@
|
||||
// RUN: env SDKROOT=%S/../Inputs/clang-importer-sdk %swiftc_driver_plain -target x86_64-unknown-freebsd -g -driver-print-jobs %s 2>&1 | %FileCheck %s --check-prefix FREEBSD
|
||||
|
||||
// OSX-NOT: warning: no such SDK:
|
||||
// OSX: bin/swift
|
||||
// OSX: Driver/sdk.swift
|
||||
// OSX: bin{{/|\\\\}}swift
|
||||
// OSX: Driver{{/|\\\\}}sdk.swift
|
||||
// OSX: -sdk {{.*}}/Inputs/clang-importer-sdk
|
||||
// OSX-NEXT: bin/swift
|
||||
// OSX-NEXT: bin{{/|\\\\}}swift
|
||||
// OSX: -sdk {{.*}}/Inputs/clang-importer-sdk
|
||||
// OSX: bin/{{.+}} {{.*}}.o{{[ "]}}
|
||||
// OSX: {{.*}}.o{{[ "]}}
|
||||
// OSX: {{-syslibroot|--sysroot}} {{.*}}/Inputs/clang-importer-sdk
|
||||
|
||||
// LINUX-NOT: warning: no such SDK:
|
||||
// LINUX: bin/swift
|
||||
// LINUX: Driver/sdk.swift
|
||||
// LINUX: bin{{/|\\\\}}swift
|
||||
// LINUX: Driver{{/|\\\\}}sdk.swift
|
||||
// LINUX: -sdk {{.*}}/Inputs/clang-importer-sdk
|
||||
// LINUX-NEXT: bin/swift
|
||||
// LINUX-NEXT: bin{{/|\\\\}}swift
|
||||
// LINUX: -sdk {{.*}}/Inputs/clang-importer-sdk
|
||||
// LINUX: bin/{{.+}} {{.*}}swiftrt.o
|
||||
// LINUX: {{.*}}swiftrt.o
|
||||
// LINUX: {{-syslibroot|--sysroot}} {{.*}}/Inputs/clang-importer-sdk
|
||||
|
||||
// FREEBSD-NOT: warning: no such SDK:
|
||||
// FREEBSD: bin/swift
|
||||
// FREEBSD: Driver/sdk.swift
|
||||
// FREEBSD: bin{{/|\\\\}}swift
|
||||
// FREEBSD: Driver{{/|\\\\}}sdk.swift
|
||||
// FREEBSD: -sdk {{.*}}/Inputs/clang-importer-sdk
|
||||
// FREEBSD-NEXT: bin/swift
|
||||
// FREEBSD-NEXT: bin{{/|\\\\}}swift
|
||||
// FREEBSD: -sdk {{.*}}/Inputs/clang-importer-sdk
|
||||
// FREEBSD: bin/{{.+}} {{.*}}swiftrt.o
|
||||
// FREEBSD: {{.*}}swiftrt.o
|
||||
// FREEBSD: {{-syslibroot|--sysroot}} {{.*}}/Inputs/clang-importer-sdk
|
||||
|
||||
// WINDOWS-NOT: warning: no such SDK:
|
||||
// WINDOWS: bin/swift
|
||||
// WINDOWS: Driver/sdk.swift
|
||||
// WINDOWS: bin{{/|\\\\}}swift
|
||||
// WINDOWS: Driver{{/|\\\\}}sdk.swift
|
||||
// WINDOWS: -sdk {{.*}}/Inputs/clang-importer-sdk
|
||||
// WINDOWS-NEXT: bin/swift
|
||||
// WINDOWS-NEXT: bin{{/|\\\\}}swift
|
||||
// WINDOWS: -sdk {{.*}}/Inputs/clang-importer-sdk
|
||||
// WINDOWS: bin/{{.+}} {{.*}}swiftrt.o
|
||||
// WINDOWS: {{.*}}swiftrt.o
|
||||
// WINDOWS: {{-I}} {{.*}}/Inputs/clang-importer-sdk
|
||||
|
||||
// RUN: %swift_driver -driver-print-jobs -repl -sdk %S/Inputs/nonexistent-sdk 2>&1 | %FileCheck %s --check-prefix=SDKWARNING
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Statically link a "hello world" program
|
||||
// XFAIL: linux
|
||||
// XFAIL: linux, win32
|
||||
// REQUIRES: static_stdlib
|
||||
// REQUIRES: executable_test
|
||||
|
||||
|
||||
@@ -7,17 +7,17 @@
|
||||
|
||||
// CLANGSUB: swift
|
||||
// CLANGSUB-SAME: -o [[OBJECTFILE:.*]]
|
||||
// CLANGSUB: swift-autolink-extract [[OBJECTFILE]]
|
||||
// CLANGSUB-SAME: -o [[AUTOLINKFILE:.*]]
|
||||
// CLANGSUB: {{[^ ]+}}/Inputs/fake-toolchain/clang++
|
||||
// CLANGSUB: swift-autolink-extract{{(\.exe)?"?}} [[OBJECTFILE]]
|
||||
// CLANGSUB-SAME: -o {{"?}}[[AUTOLINKFILE:.*]]
|
||||
// CLANGSUB: {{[^ ]+(\\\\|/)}}Inputs{{/|\\\\}}fake-toolchain{{/|\\\\}}clang++
|
||||
// CLANGSUB-DAG: [[OBJECTFILE]]
|
||||
// CLANGSUB-DAG: @[[AUTOLINKFILE]]
|
||||
// CLANGSUB: -o tools_directory
|
||||
|
||||
// BINUTILS: swift
|
||||
// BINUTILS-SAME: -o [[OBJECTFILE:.*]]
|
||||
// BINUTILS: swift-autolink-extract [[OBJECTFILE]]
|
||||
// BINUTILS-SAME: -o [[AUTOLINKFILE:.*]]
|
||||
// BINUTILS: swift-autolink-extract{{(\.exe)?"?}} [[OBJECTFILE]]
|
||||
// BINUTILS-SAME: -o {{"?}}[[AUTOLINKFILE:.*]]
|
||||
// BINUTILS: clang++
|
||||
// BINUTILS-DAG: [[OBJECTFILE]]
|
||||
// BINUTILS-DAG: @[[AUTOLINKFILE]]
|
||||
@@ -32,5 +32,5 @@
|
||||
|
||||
// LDSUB: swift
|
||||
// LDSUB-SAME: -o [[OBJECTFILE:.*]]
|
||||
// LDSUB: {{[^ ]+}}/Inputs/fake-toolchain/ld [[OBJECTFILE]]
|
||||
// LDSUB: {{[^ ]+(\\\\|/)}}Inputs{{/|\\\\}}fake-toolchain{{(\\\\|/)ld"?}} [[OBJECTFILE]]
|
||||
// LDSUB: -o tools_directory
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
// LINK-elf: 1: swift-autolink-extract, {0}, autolink
|
||||
// LINK-elf: 2: link, {0, 1}, image
|
||||
|
||||
// LINK-coff: 0: input
|
||||
// LINK-coff: 1: link, {0}, image
|
||||
|
||||
// LINK-SWIFTMODULES: 0: input, "{{.*}}.swiftmodule", swiftmodule
|
||||
// LINK-SWIFTMODULES: 1: link, {0}, image
|
||||
|
||||
|
||||
@@ -1,96 +1,96 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %S/Inputs -c main.swift | %FileCheck %s -check-prefix=INPUT
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %S/Inputs -c %S/Inputs/main.swift | %FileCheck %s -check-prefix=INPUT
|
||||
// INPUT: SOURCE_DIR/test/Driver/Inputs/main.swift
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %/S/Inputs -c main.swift | %FileCheck %s -check-prefix=INPUT
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %/S/Inputs -c %/S/Inputs/main.swift | %FileCheck %s -check-prefix=INPUT
|
||||
// INPUT: SOURCE_DIR/test/Driver/Inputs{{/|\\\\}}main.swift
|
||||
|
||||
// Relative -working-directory...
|
||||
// RUN: cd %S && %swiftc_driver -driver-print-jobs -working-directory Inputs -c %S/Inputs/main.swift | %FileCheck %s -check-prefix=INPUT
|
||||
// RUN: cd %S && %swiftc_driver -driver-print-jobs -working-directory Inputs -c %/S/Inputs/main.swift | %FileCheck %s -check-prefix=INPUT
|
||||
|
||||
// -working-directory=
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory=%S/Inputs -c %S/Inputs/main.swift | %FileCheck %s -check-prefix=INPUT
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory=%S/Inputs -c %/S/Inputs/main.swift | %FileCheck %s -check-prefix=INPUT
|
||||
|
||||
// In another driver mode.
|
||||
// RUN: cd %t && %swift_driver -driver-print-jobs -working-directory %S/Inputs -F. | %FileCheck %s -check-prefix=REPL
|
||||
// RUN: cd %t && %swift_driver -driver-print-jobs -deprecated-integrated-repl -working-directory %S/Inputs -F. | %FileCheck %s -check-prefix=REPL
|
||||
// REPL: -F SOURCE_DIR/test/Driver/Inputs/.
|
||||
// RUN: cd %t && %swift_driver -driver-print-jobs -working-directory %/S/Inputs -F. | %FileCheck %s -check-prefix=REPL
|
||||
// RUN: cd %t && %swift_driver -driver-print-jobs -deprecated-integrated-repl -working-directory %/S/Inputs -F. | %FileCheck %s -check-prefix=REPL
|
||||
// REPL: -F {{\\?"?}}SOURCE_DIR/test/Driver/Inputs{{(\\\\(\\\\)?)|/}}.
|
||||
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory=%S/Inputs -c -module-name m main.swift lib.swift | %FileCheck %s -check-prefix=MULTI_INPUT
|
||||
// MULTI_INPUT: SOURCE_DIR/test/Driver/Inputs/main.swift
|
||||
// MULTI_INPUT-SAME: SOURCE_DIR/test/Driver/Inputs/lib.swift
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory=%/S/Inputs -c -module-name m main.swift lib.swift | %FileCheck %s -check-prefix=MULTI_INPUT
|
||||
// MULTI_INPUT: SOURCE_DIR/test/Driver/Inputs{{/|\\\\}}main.swift
|
||||
// MULTI_INPUT-SAME: SOURCE_DIR/test/Driver/Inputs{{/|\\\\}}lib.swift
|
||||
|
||||
// Using --
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory=%S/Inputs -c -module-name m -- main.swift lib.swift | %FileCheck %s -check-prefix=MULTI_INPUT
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory=%/S/Inputs -c -module-name m -- main.swift lib.swift | %FileCheck %s -check-prefix=MULTI_INPUT
|
||||
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %S/Inputs -c %s -F . | %FileCheck %s -check-prefix=SEARCH_PATH
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %S/Inputs -c %s -F. | %FileCheck %s -check-prefix=SEARCH_PATH
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %S/Inputs -c %s -F=. | %FileCheck %s -check-prefix=SEARCH_PATH
|
||||
// SEARCH_PATH: -F SOURCE_DIR/test/Driver/Inputs/.
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %/S/Inputs -c %/s -F . | %FileCheck %s -check-prefix=SEARCH_PATH
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %/S/Inputs -c %/s -F. | %FileCheck %s -check-prefix=SEARCH_PATH
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %/S/Inputs -c %/s -F=. | %FileCheck %s -check-prefix=SEARCH_PATH
|
||||
// SEARCH_PATH: -F {{"?}}SOURCE_DIR/test/Driver/Inputs{{/|\\\\}}.
|
||||
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %S/Inputs -emit-executable %s -L . | %FileCheck %s -check-prefix=L_PATH
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %S/Inputs -emit-executable %s -L. | %FileCheck %s -check-prefix=L_PATH
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %S/Inputs -emit-executable %s -L=. | %FileCheck %s -check-prefix=L_PATH
|
||||
// L_PATH: -L SOURCE_DIR/test/Driver/Inputs/.
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %/S/Inputs -emit-executable %/s -L . | %FileCheck %s -check-prefix=L_PATH
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %/S/Inputs -emit-executable %/s -L. | %FileCheck %s -check-prefix=L_PATH
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %/S/Inputs -emit-executable %/s -L=. | %FileCheck %s -check-prefix=L_PATH
|
||||
// L_PATH: -L {{"?}}SOURCE_DIR/test/Driver/Inputs{{/|\\\\}}.
|
||||
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %S/Inputs -c %s -disable-bridging-pch -import-objc-header bridging-header.h | %FileCheck %s -check-prefix=OBJC_HEADER1
|
||||
// OBJC_HEADER1: -import-objc-header SOURCE_DIR/test/Driver/Inputs/bridging-header.h
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %/S/Inputs -c %/s -disable-bridging-pch -import-objc-header bridging-header.h | %FileCheck %s -check-prefix=OBJC_HEADER1
|
||||
// OBJC_HEADER1: -import-objc-header {{"?}}SOURCE_DIR/test/Driver/Inputs{{/|\\\\}}bridging-header.h
|
||||
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %S/Inputs -c %s -enable-bridging-pch -import-objc-header bridging-header.h | %FileCheck %s -check-prefix=OBJC_HEADER2
|
||||
// OBJC_HEADER2: SOURCE_DIR/test/Driver/Inputs/bridging-header.h {{.*}}-emit-pch
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %/S/Inputs -c %/s -enable-bridging-pch -import-objc-header bridging-header.h | %FileCheck %s -check-prefix=OBJC_HEADER2
|
||||
// OBJC_HEADER2: SOURCE_DIR/test/Driver/Inputs{{/|\\\\}}bridging-header.h{{"? .*}}-emit-pch
|
||||
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %S/Inputs -c %s -o main.o | %FileCheck %s -check-prefix=OUTPUT_OBJ
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %S/Inputs -c %s -o %S/Inputs/main.o | %FileCheck %s -check-prefix=OUTPUT_OBJ
|
||||
// OUTPUT_OBJ: -o SOURCE_DIR/test/Driver/Inputs/main.o
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %/S/Inputs -c %/s -o main.o | %FileCheck %s -check-prefix=OUTPUT_OBJ
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %/S/Inputs -c %/s -o %/S/Inputs/main.o | %FileCheck %s -check-prefix=OUTPUT_OBJ
|
||||
// OUTPUT_OBJ: -o {{"?}}SOURCE_DIR/test/Driver/Inputs{{/|\\\\}}main.o
|
||||
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %S/Inputs -c %s -module-cache-path mcp | %FileCheck %s -check-prefix=ARG_IS_PATH
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %S/Inputs -c %s -module-cache-path %S/Inputs/mcp | %FileCheck %s -check-prefix=ARG_IS_PATH
|
||||
// ARG_IS_PATH: -module-cache-path SOURCE_DIR/test/Driver/Inputs/mcp
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %/S/Inputs -c %/s -module-cache-path mcp | %FileCheck %s -check-prefix=ARG_IS_PATH
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %/S/Inputs -c %/s -module-cache-path %/S/Inputs/mcp | %FileCheck %s -check-prefix=ARG_IS_PATH
|
||||
// ARG_IS_PATH: -module-cache-path {{"?}}SOURCE_DIR/test/Driver/Inputs{{\\\\|/}}mcp
|
||||
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %S/Inputs -emit-executable %s -o main | %FileCheck %s -check-prefix=OUTPUT_EXE
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %S/Inputs -emit-executable %s -o %S/Inputs/main | %FileCheck %s -check-prefix=OUTPUT_EXE
|
||||
// OUTPUT_EXE: -o SOURCE_DIR/test/Driver/Inputs/main
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %/S/Inputs -emit-executable %/s -o main | %FileCheck %s -check-prefix=OUTPUT_EXE
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %/S/Inputs -emit-executable %/s -o %/S/Inputs/main | %FileCheck %s -check-prefix=OUTPUT_EXE
|
||||
// OUTPUT_EXE: -o {{"?}}SOURCE_DIR/test/Driver/Inputs{{\\\\|/}}main
|
||||
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %S/Inputs -emit-ir %s -o - | %FileCheck %s -check-prefix=OUTPUT_STDOUT
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %/S/Inputs -emit-ir %/s -o - | %FileCheck %s -check-prefix=OUTPUT_STDOUT
|
||||
// OUTPUT_STDOUT: -o -
|
||||
|
||||
// RUN: echo "{\"main.swift\": {\"object\": \"main-modified.o\"}}" > %t/ofmo.json
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %S/Inputs -c main.swift -output-file-map %t/ofmo.json | %FileCheck %s -check-prefix=OUTPUT_FILE_MAP_1
|
||||
// OUTPUT_FILE_MAP_1: -o SOURCE_DIR/test/Driver/Inputs/main-modified.o
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %/S/Inputs -c main.swift -output-file-map %t/ofmo.json | %FileCheck %s -check-prefix=OUTPUT_FILE_MAP_1
|
||||
// OUTPUT_FILE_MAP_1: -o {{"?}}SOURCE_DIR/test/Driver/Inputs{{\\\\|/}}main-modified.o
|
||||
|
||||
// -output-file-map itself
|
||||
// RUN: echo "{\"main.swift\": {\"object\": \"main-modified.o\"}}" > %t/ofmo2.json
|
||||
// RUN: touch %t/main.swift
|
||||
// RUN: cd %S && %swiftc_driver -driver-print-jobs -working-directory %t -c main.swift -output-file-map ofmo2.json | %FileCheck %s -check-prefix=OUTPUT_FILE_MAP_2
|
||||
// RUN: cd %S && %swiftc_driver -driver-print-jobs -working-directory %/t -c main.swift -output-file-map ofmo2.json | %FileCheck %s -check-prefix=OUTPUT_FILE_MAP_2
|
||||
// -output-file-map= is an alias for -output-file-map
|
||||
// RUN: cd %S && %swiftc_driver -driver-print-jobs -working-directory %t -c main.swift -output-file-map=ofmo2.json | %FileCheck %s -check-prefix=OUTPUT_FILE_MAP_2
|
||||
// RUN: cd %S && %swiftc_driver -driver-print-jobs -working-directory %/t -c main.swift -output-file-map=ofmo2.json | %FileCheck %s -check-prefix=OUTPUT_FILE_MAP_2
|
||||
// OUTPUT_FILE_MAP_2: BUILD_DIR{{.*}}main-modified.o
|
||||
|
||||
// RUN: %empty-directory(%t/sub)
|
||||
// RUN: echo "{\"\": {\"swift-dependencies\": \"br.swiftdeps\"}}" > %t/sub/ofmo.json
|
||||
// RUN: touch %t/sub/a.swift %t/sub/b.swift
|
||||
// RUN: cd %t && %swiftc_driver -incremental -working-directory %t/sub -emit-dependencies -c -module-name ab a.swift b.swift -output-file-map=%t/sub/ofmo.json
|
||||
// RUN: cd %t && %swiftc_driver -incremental -working-directory %/t/sub -emit-dependencies -c -module-name ab a.swift b.swift -output-file-map=%/t/sub/ofmo.json
|
||||
// RUN: ls %t/sub/br.swiftdeps
|
||||
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %S/Inputs -Xcc -working-directory -Xcc %t -c %s | %FileCheck %s -check-prefix=CLANG
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %/S/Inputs -Xcc -working-directory -Xcc %/t -c %/s | %FileCheck %s -check-prefix=CLANG
|
||||
// CLANG: -Xcc -working-directory -Xcc SOURCE_DIR
|
||||
// CLANG-SAME: -Xcc -working-directory -Xcc BUILD_DIR
|
||||
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %S/Inputs -c main.swift | %FileCheck %s -check-prefix=OUTPUT_IMPLICIT_OBJ
|
||||
// OUTPUT_IMPLICIT_OBJ: -o SOURCE_DIR/test/Driver/Inputs/main.o
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %/S/Inputs -c main.swift | %FileCheck %s -check-prefix=OUTPUT_IMPLICIT_OBJ
|
||||
// OUTPUT_IMPLICIT_OBJ: -o {{"?}}SOURCE_DIR/test/Driver/Inputs{{\\\\|/}}main.o
|
||||
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %S/Inputs -emit-module main.swift | %FileCheck %s -check-prefix=OUTPUT_IMPLICIT_MODULE
|
||||
// OUTPUT_IMPLICIT_MODULE: -emit-module-doc-path SOURCE_DIR/test/Driver/Inputs/main.swiftdoc
|
||||
// OUTPUT_IMPLICIT_MODULE-SAME: -o SOURCE_DIR/test/Driver/Inputs/main.swiftmodule
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %/S/Inputs -emit-module main.swift | %FileCheck %s -check-prefix=OUTPUT_IMPLICIT_MODULE
|
||||
// OUTPUT_IMPLICIT_MODULE: -emit-module-doc-path {{"?}}SOURCE_DIR/test/Driver/Inputs{{\\\\|/}}main.swiftdoc
|
||||
// OUTPUT_IMPLICIT_MODULE-SAME: -o {{"?}}SOURCE_DIR/test/Driver/Inputs{{\\\\|/}}main.swiftmodule
|
||||
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %S/Inputs -emit-executable main.swift | %FileCheck %s -check-prefix=OUTPUT_IMPLICIT_EXE
|
||||
// OUTPUT_IMPLICIT_EXE: -o SOURCE_DIR/test/Driver/Inputs/main
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %/S/Inputs -emit-executable main.swift | %FileCheck %s -check-prefix=OUTPUT_IMPLICIT_EXE
|
||||
// OUTPUT_IMPLICIT_EXE: -o {{"?}}SOURCE_DIR/test/Driver/Inputs{{\\\\|/}}main
|
||||
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %S/Inputs -emit-module -emit-executable main.swift | %FileCheck %s -check-prefix=OUTPUT_IMPLICIT_EXE_AND_MODULE
|
||||
// OUTPUT_IMPLICIT_EXE_AND_MODULE: -emit-module-doc-path SOURCE_DIR/test/Driver/Inputs/main.swiftdoc
|
||||
// OUTPUT_IMPLICIT_EXE_AND_MODULE-SAME: -o SOURCE_DIR/test/Driver/Inputs/main.swiftmodule
|
||||
// OUTPUT_IMPLICIT_EXE_AND_MODULE: -o SOURCE_DIR/test/Driver/Inputs/main
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %/S/Inputs -emit-module -emit-executable main.swift | %FileCheck %s -check-prefix=OUTPUT_IMPLICIT_EXE_AND_MODULE
|
||||
// OUTPUT_IMPLICIT_EXE_AND_MODULE: -emit-module-doc-path {{"?}}SOURCE_DIR/test/Driver/Inputs{{\\\\|/}}main.swiftdoc
|
||||
// OUTPUT_IMPLICIT_EXE_AND_MODULE-SAME: -o {{"?}}SOURCE_DIR/test/Driver/Inputs{{\\\\|/}}main.swiftmodule
|
||||
// OUTPUT_IMPLICIT_EXE_AND_MODULE: -o {{"?}}SOURCE_DIR/test/Driver/Inputs{{\\\\|/}}main
|
||||
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %S/Inputs -emit-module -emit-executable main.swift -o not_main | %FileCheck %s -check-prefix=OUTPUT_IMPLICIT_EXPLICIT
|
||||
// OUTPUT_IMPLICIT_EXPLICIT: -emit-module-doc-path SOURCE_DIR/test/Driver/Inputs/not_main.swiftdoc
|
||||
// OUTPUT_IMPLICIT_EXPLICIT-SAME: -o SOURCE_DIR/test/Driver/Inputs/not_main.swiftmodule
|
||||
// OUTPUT_IMPLICIT_EXPLICIT: -o SOURCE_DIR/test/Driver/Inputs/not_main
|
||||
// RUN: cd %t && %swiftc_driver -driver-print-jobs -working-directory %/S/Inputs -emit-module -emit-executable main.swift -o not_main | %FileCheck %s -check-prefix=OUTPUT_IMPLICIT_EXPLICIT
|
||||
// OUTPUT_IMPLICIT_EXPLICIT: -emit-module-doc-path {{"?}}SOURCE_DIR/test/Driver/Inputs{{\\\\|/}}not_main.swiftdoc
|
||||
// OUTPUT_IMPLICIT_EXPLICIT-SAME: -o {{"?}}SOURCE_DIR/test/Driver/Inputs{{\\\\|/}}not_main.swiftmodule
|
||||
// OUTPUT_IMPLICIT_EXPLICIT: -o {{"?}}SOURCE_DIR/test/Driver/Inputs{{\\\\|/}}not_main
|
||||
|
||||
@@ -291,4 +291,3 @@ const long long $ss21_ObjectiveCBridgeableMp[1] = {0};
|
||||
|
||||
SWIFT_RUNTIME_STDLIB_INTERNAL
|
||||
const long long $ss7KeyPathCMo[1] = {0};
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// REQUIRES: shell
|
||||
// RUN: %empty-directory(%t)
|
||||
|
||||
// This limit was chosen because multi-threaded compilation broke here on OS X
|
||||
|
||||
Reference in New Issue
Block a user