|
| 1 | +// REQUIRES: OS=macosx |
| 2 | +// RUN: %empty-directory(%t) |
| 3 | +// RUN: split-file %s %t |
| 4 | + |
| 5 | +// RUN: RC_DEBUG_OPTIONS=1 %target-swift-frontend -scan-dependencies -o %t/deps.json -I %t \ |
| 6 | +// RUN: -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib \ |
| 7 | +// RUN: -g -file-compilation-dir %t -Xcc -ferror-limit=1 \ |
| 8 | +// RUN: %t/test.swift -module-name Test -swift-version 5 -experimental-clang-importer-direct-cc1-scan |
| 9 | +// RUN: %FileCheck %s --check-prefix CHECK-DIRECT-CC1-SCAN --input-file=%t/deps.json |
| 10 | + |
| 11 | +// CHECK-DIRECT-CC1-SCAN-NOT: -dwarf-debug-flags |
| 12 | + |
| 13 | +// RUN: %{python} %S/../CAS/Inputs/BuildCommandExtractor.py %t/deps.json A > %t/A.cmd |
| 14 | +// RUN: %swift_frontend_plain @%t/A.cmd |
| 15 | + |
| 16 | +// RUN: %{python} %S/../CAS/Inputs/GenerateExplicitModuleMap.py %t/deps.json > %t/map.json |
| 17 | +// RUN: %{python} %S/../CAS/Inputs/BuildCommandExtractor.py %t/deps.json Test > %t/MyApp.cmd |
| 18 | +// RUN: echo "\"-disable-implicit-string-processing-module-import\"" >> %t/MyApp.cmd |
| 19 | +// RUN: echo "\"-disable-implicit-concurrency-module-import\"" >> %t/MyApp.cmd |
| 20 | +// RUN: echo "\"-disable-implicit-swift-modules\"" >> %t/MyApp.cmd |
| 21 | +// RUN: echo "\"-explicit-swift-module-map-file\"" >> %t/MyApp.cmd |
| 22 | +// RUN: echo "\"%t/map.json\"" >> %t/MyApp.cmd |
| 23 | + |
| 24 | +// RUN: %target-swift-frontend -module-name Test -O @%t/MyApp.cmd %t/test.swift -parse-stdlib \ |
| 25 | +// RUN: -g -c -o %t/test.o -debug-info-store-invocation |
| 26 | + |
| 27 | +// RUN: %llvm-dwarfdump %t/test.o --recurse-depth=0 | %FileCheck %s --check-prefix=FLAGS |
| 28 | +// FLAGS: DW_AT_APPLE_flags |
| 29 | +// FLAGS-SAME: -target |
| 30 | + |
| 31 | +//--- A.swiftinterface |
| 32 | +// swift-interface-format-version: 1.0 |
| 33 | +// swift-module-flags: -module-name A -O -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-stdlib -user-module-version 1.0 |
| 34 | +public func a() { } |
| 35 | + |
| 36 | +//--- test.swift |
| 37 | +import A |
| 38 | +func test() {} |
0 commit comments