|
| 1 | +// REQUIRES: OS=windows-msvc |
| 2 | + |
| 3 | +// Test building the CRT module with C++ interop enabled on Windows |
| 4 | + |
| 5 | +// RUN: %empty-directory(%t) |
| 6 | +// RUN: split-file %s %t |
| 7 | +// RUN: %target-swift-frontend -scan-dependencies -module-name Test \ |
| 8 | +// RUN: -module-cache-path %t/clang-module-cache -disable-objc-interop \ |
| 9 | +// RUN: -cxx-interoperability-mode=default \ |
| 10 | +// RUN: -parse-stdlib -module-load-mode prefer-serialized \ |
| 11 | +// RUN: %t/Test.swift -o %t/deps.json -I %t 2>&1 |
| 12 | + |
| 13 | +// RUN: %{python} %S/../CAS/Inputs/BuildCommandExtractor.py %t/deps.json clang:SAL > %t/SAL.cmd |
| 14 | +// RUN: %{python} %S/../CAS/Inputs/BuildCommandExtractor.py %t/deps.json clang:vcruntime > %t/vcruntime.cmd |
| 15 | +// RUN: %{python} %S/../CAS/Inputs/BuildCommandExtractor.py %t/deps.json clang:SwiftShims > %t/SwiftShims.cmd |
| 16 | +// RUN: %{python} %S/../CAS/Inputs/BuildCommandExtractor.py %t/deps.json Swift > %t/Swift.cmd |
| 17 | +// RUN: %{python} %S/../CAS/Inputs/BuildCommandExtractor.py %t/deps.json clang:_Builtin_stddef > %t/_Builtin_stddef.cmd |
| 18 | +// RUN: %{python} %S/../CAS/Inputs/BuildCommandExtractor.py %t/deps.json clang:corecrt > %t/corecrt.cmd |
| 19 | +// RUN: %{python} %S/../CAS/Inputs/BuildCommandExtractor.py %t/deps.json clang:std_config > %t/std_config.cmd |
| 20 | +// RUN: %{python} %S/../CAS/Inputs/BuildCommandExtractor.py %t/deps.json clang:_float > %t/_float.cmd |
| 21 | +// RUN: %{python} %S/../CAS/Inputs/BuildCommandExtractor.py %t/deps.json clang:_fenv > %t/_fenv.cmd |
| 22 | +// RUN: %{python} %S/../CAS/Inputs/BuildCommandExtractor.py %t/deps.json clang:_stdlib > %t/_stdlib.cmd |
| 23 | +// RUN: %{python} %S/../CAS/Inputs/BuildCommandExtractor.py %t/deps.json clang:_malloc > %t/_malloc.cmd |
| 24 | +// RUN: %{python} %S/../CAS/Inputs/BuildCommandExtractor.py %t/deps.json clang:_Builtin_intrinsics > %t/_Builtin_intrinsics.cmd |
| 25 | +// RUN: %{python} %S/../CAS/Inputs/BuildCommandExtractor.py %t/deps.json clang:ucrt > %t/ucrt.cmd |
| 26 | +// RUN: %{python} %S/../CAS/Inputs/BuildCommandExtractor.py %t/deps.json clang:std > %t/std.cmd |
| 27 | +// RUN: %{python} %S/../CAS/Inputs/BuildCommandExtractor.py %t/deps.json clang:_complex > %t/_complex.cmd |
| 28 | +// RUN: %{python} %S/../CAS/Inputs/BuildCommandExtractor.py %t/deps.json clang:SwiftOverlayShims > %t/SwiftOverlayShims.cmd |
| 29 | +// RUN: %{python} %S/../CAS/Inputs/BuildCommandExtractor.py %t/deps.json CRT > %t/CRT.cmd |
| 30 | + |
| 31 | +// Remove the candidate module file flag to force building from the swiftinterface file. |
| 32 | +// RUN: cat %t/CRT.cmd | sed '/candidate-module-file/d; /CRT.swiftmodule.*swiftmodule/d' > %t/CRT.mod.cmd |
| 33 | + |
| 34 | +// RUN: %swift_frontend_plain @%t/SAL.cmd 2>&1 |
| 35 | +// RUN: %swift_frontend_plain @%t/vcruntime.cmd 2>&1 |
| 36 | +// RUN: %swift_frontend_plain @%t/SwiftShims.cmd 2>&1 |
| 37 | +// RUN: %swift_frontend_plain @%t/Swift.cmd 2>&1 |
| 38 | +// RUN: %swift_frontend_plain @%t/_Builtin_stddef.cmd 2>&1 |
| 39 | +// RUN: %swift_frontend_plain @%t/corecrt.cmd 2>&1 |
| 40 | +// RUN: %swift_frontend_plain @%t/std_config.cmd 2>&1 |
| 41 | +// RUN: %swift_frontend_plain @%t/_float.cmd 2>&1 |
| 42 | +// RUN: %swift_frontend_plain @%t/_fenv.cmd 2>&1 |
| 43 | +// RUN: %swift_frontend_plain @%t/_stdlib.cmd 2>&1 |
| 44 | +// RUN: %swift_frontend_plain @%t/_malloc.cmd 2>&1 |
| 45 | +// RUN: %swift_frontend_plain @%t/_Builtin_intrinsics.cmd 2>&1 |
| 46 | +// RUN: %swift_frontend_plain @%t/ucrt.cmd 2>&1 |
| 47 | +// RUN: %swift_frontend_plain @%t/std.cmd 2>&1 |
| 48 | +// RUN: %swift_frontend_plain @%t/_complex.cmd 2>&1 |
| 49 | +// RUN: %swift_frontend_plain @%t/SwiftOverlayShims.cmd 2>&1 |
| 50 | +// RUN: %swift_frontend_plain @%t/CRT.mod.cmd 2>&1 |
| 51 | + |
| 52 | +//--- Test.swift |
| 53 | +import CRT |
| 54 | + |
0 commit comments