brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 143a00f Raw
36 lines · c
1// RUN: rm -rf %t2// RUN: mkdir -p %t/implicit-invalidate-common3// RUN: cp -r %S/Inputs/implicit-invalidate-common %t/4// RUN: echo '#include "A.h"' > %t/A.c5// RUN: echo '#include "B.h"' > %t/B.c6 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.txt12// 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.txt15// RUN: FileCheck %s --implicit-check-not "remark:" --input-file %t/initial_build.txt16 17// Update module 'Common' and build with the populated module cache. Module18// 'Common' still should be built only once. Note that we are using the same19// flags for A.c and B.c to avoid building Common.pcm at different paths.20//21// RUN: echo ' // ' >> %t/implicit-invalidate-common/Common.h22// 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.txt25// 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.txt28// RUN: FileCheck %s --implicit-check-not "remark:" --input-file %t/incremental_build.txt29 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'36