Skip to content

Conversation

lukel97
Copy link
Contributor

@lukel97 lukel97 commented Aug 13, 2025

When cross-compiling LLVM test-suite to run on another machine, you usually need to pass a toolchain file and -DTEST_SUITE_REMOTE_HOST to CMake.

This adds two flags to the CLI to make it more convenient to configure these (as opposed to passing in -DCMAKE_TOOLCHAIN_FILE/-DTEST_SUITE_REMOTE_HOST)

When cross-compiling LLVM test-suite to run on another machine, you usually need to pass a toolchain file and -DTEST_SUITE_REMOTE_HOST to CMake.

This adds two flags to the CLI to make it more convenient to configure these (as opposed to passing in -DCMAKE_TOOLCHAIN_FILE/-DTEST_SUITE_REMOTE_HOST)
Copy link
Contributor

@DavidSpickett DavidSpickett left a comment

Choose a reason for hiding this comment

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

I rarely use LNT but I assume there is a way to pass these options but it's something like:

lnt --extra-cmake-stuff "A=B;C=D"

Which is a bit free form and more guess work of what to pass?

@lukel97
Copy link
Contributor Author

lukel97 commented Aug 13, 2025

I rarely use LNT but I assume there is a way to pass these options but it's something like:

lnt --extra-cmake-stuff "A=B;C=D"

Which is a bit free form and more guess work of what to pass?

Yup, all this is a more explicit way of writing lnt runtest test-suite -DTEST_SUITE_REMOTE_HOST=... -DCMAKE_TOOLCHAIN_FILE=.... I figured having the explicit CLI makes it more discoverable and acts as a bit of documentation. We have other arguments like --cc, --cflags, --benchmarking-only that do the same thing and just forward CMake variables.

Copy link
Contributor

@DavidSpickett DavidSpickett left a comment

Choose a reason for hiding this comment

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

In some sense a CMake toolchain file is also a nicer, discoverable way, to pass a bunch of random things you can use normal options for. Same motivations.

So this LGTM.

I'd say wait for someone else to approve but we don't have many reviewers here in LNT. Wait it a day or two in case anyone else wants to comment, otherwise go ahead with this.

@lukel97 lukel97 merged commit 11b8842 into llvm:main Aug 18, 2025
1 check 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