| 1 | // RUN: rm -rf %t |
| 2 | // RUN: mkdir -p %t/prebuilt_modules |
| 3 | // |
| 4 | // RUN: %clang_cc1 -triple %itanium_abi_triple \ |
| 5 | // RUN: -fmodules-ts -fprebuilt-module-path=%t/prebuilt-modules \ |
| 6 | // RUN: -emit-module-interface -pthread -DBUILD_MODULE \ |
| 7 | // RUN: %s -o %t/prebuilt_modules/mismatching_module.pcm |
| 8 | // |
| 9 | // RUN: not %clang_cc1 -triple %itanium_abi_triple -fmodules-ts \ |
| 10 | // RUN: -fprebuilt-module-path=%t/prebuilt_modules -DCHECK_MISMATCH \ |
| 11 | // RUN: %s 2>&1 | FileCheck %s |
| 12 | |
| 13 | #ifdef BUILD_MODULE |
| 14 | export module mismatching_module; |
| 15 | #endif |
| 16 | |
| 17 | #ifdef CHECK_MISMATCH |
| 18 | import mismatching_module; |
| 19 | // CHECK: error: POSIX thread support was enabled in PCH file but is currently disabled |
| 20 | // CHECK-NEXT: module file {{.*[/|\\\\]}}mismatching_module.pcm cannot be loaded due to a configuration mismatch with the current compilation |
| 21 | #endif |
| 22 | |
| 23 | |