34 lines · cpp
1// RUN: rm -rf %t2// RUN: mkdir %t3// RUN: split-file %s %t4// RUN: mkdir -p %t/prebuilt_modules5//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.pcm11//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 %s15 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.pcm22//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 %s26 27//--- mismatching_module.cppm28export module mismatching_module;29 30//--- use.cpp31import mismatching_module;32// CHECK: error: POSIX thread support was enabled in precompiled file '{{.*[/|\\\\]}}mismatching_module.pcm' but is currently disabled33// CHECK-NEXT: module file {{.*[/|\\\\]}}mismatching_module.pcm cannot be loaded due to a configuration mismatch with the current compilation34