Commit f5987ff
authored
[ATFE] Run llvmlibc tests against generated sysroot matching final multilib layout. (#879)
LLVM libc tests now run against a generated build-tree sysroot so tests
can be compiled and linked using the same multilib layout that will be
installed in the final package.
LLVM libc tests need to resolve headers and libraries through the
multilib layout, including the optimised common-header layout when
enabled. So the ATFE build system passes --sysroot when compiling and
linking these tests. Before this change, that sysroot pointed at the
runtimes tmp_install area, which is created as a per-variant temporary
install directory. That layout is useful while building each variant,
but it does not work in the layered layout where minor variants contain
only the payload required for their subarchive and rely on content
inherited from base variants. As a result, individual per-variant
temporary install directories no longer represent a complete view of the
installed sysroot and are not suitable as test environments. Building a
dedicated test sysroot lets the tests exercise the generated multilib
package structure instead of relying only on per-variant temporary
install directories.
This patch:
- Adds LLVM_LIBC_TEST_SYSROOT.
- When C_LIBRARY=llvmlibc, creates a new target: llvmlibc-test-sysroot.
- That target deletes/recreates the test sysroot, copies either:
- multilib-optimised/ if header optimisation is enabled, or
- multilib/ otherwise.
- For LLVM libc tests, the test compile and link options now include: -
--sysroot=<LLVM_LIBC_TEST_SYSROOT>. - the variant's multilib flags
- A dependency from LLVM libc check targets to the generated test
sysroot1 parent 3274cb2 commit f5987ff
2 files changed
Lines changed: 50 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
124 | 143 | | |
125 | 144 | | |
126 | 145 | | |
| |||
247 | 266 | | |
248 | 267 | | |
249 | 268 | | |
| 269 | + | |
250 | 270 | | |
251 | 271 | | |
252 | 272 | | |
| |||
334 | 354 | | |
335 | 355 | | |
336 | 356 | | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
337 | 364 | | |
338 | 365 | | |
339 | 366 | | |
| |||
432 | 459 | | |
433 | 460 | | |
434 | 461 | | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| 104 | + | |
103 | 105 | | |
104 | 106 | | |
105 | 107 | | |
| |||
798 | 800 | | |
799 | 801 | | |
800 | 802 | | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
801 | 815 | | |
802 | 816 | | |
803 | 817 | | |
| |||
882 | 896 | | |
883 | 897 | | |
884 | 898 | | |
| 899 | + | |
885 | 900 | | |
886 | 901 | | |
887 | 902 | | |
| |||
0 commit comments