3 // RUN: split-file %s %t
4 // RUN: mkdir -p %t/prebuilt_modules
6 // RUN: %clang_cc1 -triple %itanium_abi_triple \
7 // RUN: -std=c++20 -fprebuilt-module-path=%t/prebuilt-modules \
8 // RUN: -emit-module-interface -pthread -DBUILD_MODULE \
9 // RUN: %t/mismatching_module.cppm -o \
10 // RUN: %t/prebuilt_modules/mismatching_module.pcm
12 // RUN: not %clang_cc1 -triple %itanium_abi_triple -std=c++20 \
13 // RUN: -fprebuilt-module-path=%t/prebuilt_modules -DCHECK_MISMATCH \
14 // RUN: %t/use.cpp 2>&1 | FileCheck %s
16 // Test again with reduced BMI.
17 // RUN: %clang_cc1 -triple %itanium_abi_triple \
18 // RUN: -std=c++20 -fprebuilt-module-path=%t/prebuilt-modules \
19 // RUN: -emit-reduced-module-interface -pthread -DBUILD_MODULE \
20 // RUN: %t/mismatching_module.cppm -o \
21 // RUN: %t/prebuilt_modules/mismatching_module.pcm
23 // RUN: not %clang_cc1 -triple %itanium_abi_triple -std=c++20 \
24 // RUN: -fprebuilt-module-path=%t/prebuilt_modules -DCHECK_MISMATCH \
25 // RUN: %t/use.cpp 2>&1 | FileCheck %s
27 //--- mismatching_module.cppm
28 export module mismatching_module
;
31 import mismatching_module
;
32 // CHECK: error: POSIX thread support was enabled in AST file '{{.*[/|\\\\]}}mismatching_module.pcm' but is currently disabled
33 // CHECK-NEXT: module file {{.*[/|\\\\]}}mismatching_module.pcm cannot be loaded due to a configuration mismatch with the current compilation