Skip to content

[ATFE] Run llvmlibc tests against generated sysroot matching final multilib layout.#879

Merged
simpal01 merged 1 commit into
arm:arm-softwarefrom
simpal01:test-sysroot
Jul 1, 2026
Merged

[ATFE] Run llvmlibc tests against generated sysroot matching final multilib layout.#879
simpal01 merged 1 commit into
arm:arm-softwarefrom
simpal01:test-sysroot

Conversation

@simpal01

@simpal01 simpal01 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

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 sysroot

@simpal01
simpal01 requested a review from a team as a code owner June 10, 2026 08:30
vhscampos
vhscampos previously approved these changes Jun 25, 2026

@vhscampos vhscampos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

…ltilib layout.

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 optimized common-header
layout when enabled. 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 is particularly important for the layered multilib 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. Using a generated test sysroot
ensures tests resolve files exactly as they will in the final packaged
multilib installation

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 sysroot
@simpal01
simpal01 merged commit f5987ff into arm:arm-software Jul 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants