[lld][WebAssembly] Reinstate mistakenly disabled test. NFC
[llvm-project.git] / clang / test / Modules / implicit-invalidate-common.c
blob143a00ff37a8ebe0e8888db27cc4913d595b76c3
1 // RUN: rm -rf %t
2 // RUN: mkdir -p %t/implicit-invalidate-common
3 // RUN: cp -r %S/Inputs/implicit-invalidate-common %t/
4 // RUN: echo '#include "A.h"' > %t/A.c
5 // RUN: echo '#include "B.h"' > %t/B.c
7 // Build with an empty module cache. Module 'Common' should be built only once.
8 //
9 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/Cache \
10 // RUN: -fsyntax-only -I %t/implicit-invalidate-common -Rmodule-build \
11 // RUN: %t/A.c 2> %t/initial_build.txt
12 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/Cache \
13 // RUN: -fsyntax-only -I %t/implicit-invalidate-common -Rmodule-build \
14 // RUN: %t/B.c 2>> %t/initial_build.txt
15 // RUN: FileCheck %s --implicit-check-not "remark:" --input-file %t/initial_build.txt
17 // Update module 'Common' and build with the populated module cache. Module
18 // 'Common' still should be built only once. Note that we are using the same
19 // flags for A.c and B.c to avoid building Common.pcm at different paths.
21 // RUN: echo ' // ' >> %t/implicit-invalidate-common/Common.h
22 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/Cache \
23 // RUN: -fsyntax-only -I %t/implicit-invalidate-common -Rmodule-build \
24 // RUN: %t/A.c 2> %t/incremental_build.txt
25 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/Cache \
26 // RUN: -fsyntax-only -I %t/implicit-invalidate-common -Rmodule-build \
27 // RUN: %t/B.c 2>> %t/incremental_build.txt
28 // RUN: FileCheck %s --implicit-check-not "remark:" --input-file %t/incremental_build.txt
30 // CHECK: remark: building module 'A'
31 // CHECK: remark: building module 'Common'
32 // CHECK: remark: finished building module 'Common'
33 // CHECK: remark: finished building module 'A'
34 // CHECK: remark: building module 'B'
35 // CHECK: remark: finished building module 'B'