Skip to content

[runtimes] Fix check-runtimes when target-specific compiler-rt tests are disabled #73610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

tstellar
Copy link
Collaborator

It's possible to pass options like -DRUNTIMES_aarch64-linux-android21_LLVM_INCLUDE_TESTS=OFF to cmake which will disable tests for specific compiler-rt targets. llvm/runtimes/CMakeLists.txt assumes that when LLVM_INCLUDE_TESTS is enabled that each target's compiler-rt tests will run too, but this is not the case when the option above is used.

With this patch, the check-runtimes target will do nothing when these options are used instead of emitting an error. It also fixes the test-depends target with this config.

This fix should allow 7f215b1 to be re-committed.

…are disabled

It's possible to pass options like -DRUNTIMES_aarch64-linux-android21_LLVM_INCLUDE_TESTS=OFF
to cmake which will disable tests for specific compiler-rt targets.
llvm/runtimes/CMakeLists.txt assumes that when LLVM_INCLUDE_TESTS is
enabled that each target's compiler-rt tests will run too, but this
is not the case when the option above is used.

With this patch, the check-runtimes target will do nothing when these
options are used instead of emitting an error.  It also fixes the
test-depends target with this config.

This fix should allow 7f215b1 to
be re-committed.
@petrhosek
Copy link
Member

The alternative approach I had in mind is definining an empty runtimes-test-depends target in the runtimes build when LLVM_INCLUDE_TESTS is disabled similarly to what we do for the response file:

else()
# Create empty files so the parent build can use these unconditionally.
file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/lit.tests)
endif()

I implemented that approach in #73629.

@tstellar
Copy link
Collaborator Author

Closing in favor of #73629

@tstellar tstellar closed this Dec 11, 2023
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