|
19 | 19 | // Compile the module.
|
20 | 20 | // RUN: %clang_cc1 -cc1 -fmodules -fimplicit-module-maps -fdisable-module-hash -fmodules-cache-path=%t/modules-cache -fsyntax-only -isystem %t/Inputs -fmodules-validate-system-headers -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session %s
|
21 | 21 | // RUN: %clang_cc1 -cc1 -fmodules -fimplicit-module-maps -fdisable-module-hash -fmodules-cache-path=%t/modules-cache-user -fsyntax-only -I %t/Inputs -fmodules-validate-system-headers -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session %s
|
| 22 | +// RUN: %clang_cc1 -cc1 -fmodules -fimplicit-module-maps -fdisable-module-hash -fmodules-cache-path=%t/modules-cache-user-no-force -fsyntax-only -I %t/Inputs -fno-modules-force-validate-user-headers -fmodules-validate-system-headers -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session %s |
22 | 23 | // RUN: ls -R %t/modules-cache | grep Foo.pcm.timestamp
|
23 | 24 | // RUN: ls -R %t/modules-cache | grep Bar.pcm.timestamp
|
24 | 25 | // RUN: ls -R %t/modules-cache-user | grep Foo.pcm.timestamp
|
25 | 26 | // RUN: ls -R %t/modules-cache-user | grep Bar.pcm.timestamp
|
| 27 | +// RUN: ls -R %t/modules-cache-user-no-force | grep Foo.pcm.timestamp |
| 28 | +// RUN: ls -R %t/modules-cache-user-no-force | grep Bar.pcm.timestamp |
26 | 29 | // RUN: cp %t/modules-cache/Foo.pcm %t/modules-to-compare/Foo-before.pcm
|
27 | 30 | // RUN: cp %t/modules-cache/Bar.pcm %t/modules-to-compare/Bar-before.pcm
|
28 | 31 | // RUN: cp %t/modules-cache-user/Foo.pcm %t/modules-to-compare/Foo-before-user.pcm
|
29 | 32 | // RUN: cp %t/modules-cache-user/Bar.pcm %t/modules-to-compare/Bar-before-user.pcm
|
| 33 | +// RUN: cp %t/modules-cache-user-no-force/Foo.pcm %t/modules-to-compare/Foo-before-user-no-force.pcm |
| 34 | +// RUN: cp %t/modules-cache-user-no-force/Bar.pcm %t/modules-to-compare/Bar-before-user-no-force.pcm |
30 | 35 |
|
31 | 36 | // ===
|
32 | 37 | // Use it, and make sure that we did not recompile it.
|
33 | 38 | // RUN: %clang_cc1 -cc1 -fmodules -fimplicit-module-maps -fdisable-module-hash -fmodules-cache-path=%t/modules-cache -fsyntax-only -isystem %t/Inputs -fmodules-validate-system-headers -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session %s
|
34 | 39 | // RUN: %clang_cc1 -cc1 -fmodules -fimplicit-module-maps -fdisable-module-hash -fmodules-cache-path=%t/modules-cache-user -fsyntax-only -I %t/Inputs -fmodules-validate-system-headers -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session %s
|
| 40 | +// RUN: %clang_cc1 -cc1 -fmodules -fimplicit-module-maps -fdisable-module-hash -fmodules-cache-path=%t/modules-cache-use-no-force -fsyntax-only -I %t/Inputs -fno-modules-force-validate-user-headers -fmodules-validate-system-headers -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session %s |
35 | 41 | // RUN: ls -R %t/modules-cache | grep Foo.pcm.timestamp
|
36 | 42 | // RUN: ls -R %t/modules-cache | grep Bar.pcm.timestamp
|
37 | 43 | // RUN: ls -R %t/modules-cache-user | grep Foo.pcm.timestamp
|
38 | 44 | // RUN: ls -R %t/modules-cache-user | grep Bar.pcm.timestamp
|
| 45 | +// RUN: ls -R %t/modules-cache-user-no-force | grep Foo.pcm.timestamp |
| 46 | +// RUN: ls -R %t/modules-cache-user-no-force | grep Bar.pcm.timestamp |
39 | 47 | // RUN: cp %t/modules-cache/Foo.pcm %t/modules-to-compare/Foo-after.pcm
|
40 | 48 | // RUN: cp %t/modules-cache/Bar.pcm %t/modules-to-compare/Bar-after.pcm
|
41 | 49 | // RUN: cp %t/modules-cache-user/Foo.pcm %t/modules-to-compare/Foo-after-user.pcm
|
42 | 50 | // RUN: cp %t/modules-cache-user/Bar.pcm %t/modules-to-compare/Bar-after-user.pcm
|
| 51 | +// RUN: cp %t/modules-cache-user-no-force/Foo.pcm %t/modules-to-compare/Foo-after-user-no-force.pcm |
| 52 | +// RUN: cp %t/modules-cache-user-no-force/Bar.pcm %t/modules-to-compare/Bar-after-user-no-force.pcm |
43 | 53 |
|
44 | 54 | // RUN: diff %t/modules-to-compare/Foo-before.pcm %t/modules-to-compare/Foo-after.pcm
|
45 | 55 | // RUN: diff %t/modules-to-compare/Bar-before.pcm %t/modules-to-compare/Bar-after.pcm
|
46 | 56 | // RUN: diff %t/modules-to-compare/Foo-before-user.pcm %t/modules-to-compare/Foo-after-user.pcm
|
47 | 57 | // RUN: diff %t/modules-to-compare/Bar-before-user.pcm %t/modules-to-compare/Bar-after-user.pcm
|
| 58 | +// RUN: diff %t/modules-to-compare/Foo-before-user-no-force.pcm %t/modules-to-compare/Foo-after-user-no-force.pcm |
| 59 | +// RUN: diff %t/modules-to-compare/Bar-before-user-no-force.pcm %t/modules-to-compare/Bar-after-user-no-force.pcm |
48 | 60 |
|
49 | 61 | // ===
|
50 | 62 | // Change the sources.
|
|
53 | 65 |
|
54 | 66 | // ===
|
55 | 67 | // Use the module, and make sure that we did not recompile it if foo.h or
|
56 |
| -// module.modulemap are system files, even though the sources changed. |
| 68 | +// module.modulemap are system files or user files with force validation disabled, |
| 69 | +// even though the sources changed. |
57 | 70 | // RUN: %clang_cc1 -cc1 -fmodules -fimplicit-module-maps -fdisable-module-hash -fmodules-cache-path=%t/modules-cache -fsyntax-only -isystem %t/Inputs -fmodules-validate-system-headers -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session %s
|
58 | 71 | // RUN: %clang_cc1 -cc1 -fmodules -fimplicit-module-maps -fdisable-module-hash -fmodules-cache-path=%t/modules-cache-user -fsyntax-only -I %t/Inputs -fmodules-validate-system-headers -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session %s
|
| 72 | +// RUN: %clang_cc1 -cc1 -fmodules -fimplicit-module-maps -fdisable-module-hash -fmodules-cache-path=%t/modules-cache-user-no-force -fsyntax-only -I %t/Inputs -fno-modules-force-validate-user-headers -fmodules-validate-system-headers -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session %s |
59 | 73 | // RUN: ls -R %t/modules-cache | grep Foo.pcm.timestamp
|
60 | 74 | // RUN: ls -R %t/modules-cache | grep Bar.pcm.timestamp
|
61 | 75 | // RUN: ls -R %t/modules-cache-user | grep Foo.pcm.timestamp
|
62 | 76 | // RUN: ls -R %t/modules-cache-user | grep Bar.pcm.timestamp
|
| 77 | +// RUN: ls -R %t/modules-cache-user-no-force | grep Foo.pcm.timestamp |
| 78 | +// RUN: ls -R %t/modules-cache-user-no-force | grep Bar.pcm.timestamp |
63 | 79 | // RUN: cp %t/modules-cache/Foo.pcm %t/modules-to-compare/Foo-after.pcm
|
64 | 80 | // RUN: cp %t/modules-cache/Bar.pcm %t/modules-to-compare/Bar-after.pcm
|
65 | 81 | // RUN: cp %t/modules-cache-user/Foo.pcm %t/modules-to-compare/Foo-after-user.pcm
|
66 | 82 | // RUN: cp %t/modules-cache-user/Bar.pcm %t/modules-to-compare/Bar-after-user.pcm
|
| 83 | +// RUN: cp %t/modules-cache-user-no-force/Foo.pcm %t/modules-to-compare/Foo-after-user-no-force.pcm |
| 84 | +// RUN: cp %t/modules-cache-user-no-force/Bar.pcm %t/modules-to-compare/Bar-after-user-no-force.pcm |
67 | 85 |
|
68 | 86 | // RUN: diff %t/modules-to-compare/Foo-before.pcm %t/modules-to-compare/Foo-after.pcm
|
69 | 87 | // RUN: diff %t/modules-to-compare/Bar-before.pcm %t/modules-to-compare/Bar-after.pcm
|
70 |
| -// When foo.h is a user header, we will always validate it. |
| 88 | +// When foo.h is an user header, we will validate it by default. |
71 | 89 | // RUN: not diff %t/modules-to-compare/Foo-before-user.pcm %t/modules-to-compare/Foo-after-user.pcm
|
72 | 90 | // RUN: not diff %t/modules-to-compare/Bar-before-user.pcm %t/modules-to-compare/Bar-after-user.pcm
|
| 91 | +// When foo.h is an user header, we will not validate it if force validation is turned off. |
| 92 | +// RUN: diff %t/modules-to-compare/Foo-before-user-no-force.pcm %t/modules-to-compare/Foo-after-user-no-force.pcm |
| 93 | +// RUN: diff %t/modules-to-compare/Bar-before-user-no-force.pcm %t/modules-to-compare/Bar-after-user-no-force.pcm |
73 | 94 |
|
74 | 95 | // ===
|
75 | 96 | // Recompile the module if the today's date is before 01 January 2100.
|
76 | 97 | // RUN: %clang_cc1 -cc1 -fmodules -fimplicit-module-maps -fdisable-module-hash -fmodules-cache-path=%t/modules-cache -fsyntax-only -isystem %t/Inputs -fmodules-validate-system-headers -fbuild-session-timestamp=4102441200 -fmodules-validate-once-per-build-session %s
|
| 98 | +// RUN: %clang_cc1 -cc1 -fmodules -fimplicit-module-maps -fdisable-module-hash -fmodules-cache-path=%t/modules-cache-user -fsyntax-only -I %t/Inputs -fno-modules-force-validate-user-headers -fmodules-validate-system-headers -fbuild-session-timestamp=4102441200 -fmodules-validate-once-per-build-session %s |
| 99 | +// RUN: %clang_cc1 -cc1 -fmodules -fimplicit-module-maps -fdisable-module-hash -fmodules-cache-path=%t/modules-cache-user-no-force -fsyntax-only -I %t/Inputs -fno-modules-force-validate-user-headers -fmodules-validate-system-headers -fbuild-session-timestamp=4102441200 -fmodules-validate-once-per-build-session %s |
77 | 100 | // RUN: ls -R %t/modules-cache | grep Foo.pcm.timestamp
|
78 | 101 | // RUN: ls -R %t/modules-cache | grep Bar.pcm.timestamp
|
| 102 | +// RUN: ls -R %t/modules-cache-user | grep Foo.pcm.timestamp |
| 103 | +// RUN: ls -R %t/modules-cache-user | grep Bar.pcm.timestamp |
| 104 | +// RUN: ls -R %t/modules-cache-user-no-force | grep Foo.pcm.timestamp |
| 105 | +// RUN: ls -R %t/modules-cache-user-no-force | grep Bar.pcm.timestamp |
79 | 106 | // RUN: cp %t/modules-cache/Foo.pcm %t/modules-to-compare/Foo-after.pcm
|
80 | 107 | // RUN: cp %t/modules-cache/Bar.pcm %t/modules-to-compare/Bar-after.pcm
|
| 108 | +// RUN: cp %t/modules-cache-user/Foo.pcm %t/modules-to-compare/Foo-after-user.pcm |
| 109 | +// RUN: cp %t/modules-cache-user/Bar.pcm %t/modules-to-compare/Bar-after-user.pcm |
| 110 | +// RUN: cp %t/modules-cache-user-no-force/Foo.pcm %t/modules-to-compare/Foo-after-user-no-force.pcm |
| 111 | +// RUN: cp %t/modules-cache-user-no-force/Bar.pcm %t/modules-to-compare/Bar-after-user-no-force.pcm |
81 | 112 |
|
82 | 113 | // RUN: not diff %t/modules-to-compare/Foo-before.pcm %t/modules-to-compare/Foo-after.pcm
|
83 | 114 | // RUN: not diff %t/modules-to-compare/Bar-before.pcm %t/modules-to-compare/Bar-after.pcm
|
| 115 | +// RUN: not diff %t/modules-to-compare/Foo-before-user.pcm %t/modules-to-compare/Foo-after-user.pcm |
| 116 | +// RUN: not diff %t/modules-to-compare/Bar-before-user.pcm %t/modules-to-compare/Bar-after-user.pcm |
| 117 | +// RUN: not diff %t/modules-to-compare/Foo-before-user-no-force.pcm %t/modules-to-compare/Foo-after-user-no-force.pcm |
| 118 | +// RUN: not diff %t/modules-to-compare/Bar-before-user-no-force.pcm %t/modules-to-compare/Bar-after-user-no-force.pcm |
0 commit comments