-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
[libcxx] Add LIBCXX_HAS_TERMINAL_AVAILABLE
CMake option to disable print
terminal checks
#99259
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
set(LIBCXX_HAS_TERMINAL_AVAILABLE OFF CACHE BOOL "") | ||
|
||
# Speed up the CI | ||
set(LIBCXX_TEST_PARAMS "enable_modules=clang" CACHE STRING "") | ||
set(LIBCXXABI_TEST_PARAMS "${LIBCXX_TEST_PARAMS}" CACHE STRING "") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you run the test suite with
LIBCXX_HAS_NO_TERMINAL
, I assume you see at least a few tests failing, right? At least some tests forstd::print
should be failing. We would need to add something similar tollvm-project/libcxx/utils/libcxx/test/features.py
Line 383 in d1b2940
XFAIL
orUNSUPPORTED
the right tests based on it.For ultimate consistency, I think I would request that you actually add a new CI job for this setting. You can look at what we're doing in e.g.
llvm-project/libcxx/utils/ci/run-buildbot
Line 467 in d1b2940
llvm-project/.github/workflows/libcxx-build-and-test.yaml
Line 148 in d1b2940
In practice, it's probably way overkill to add an actual CI configuration just for this tiny setting, but this is what we've been doing and I'd like us to be consistent. I will make it a priority to figure out a story for merging some of these CI jobs together -- I think we probably want to have a nightly build with all the individual configurations, but have the per-PR CI only run a few merged configurations. But anyway, I'll handle that part, you only need to add a new job like we've done for the other carve-outs like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try to find which tests fail and add a config for it.
How much latency will this add to the bot runs? I feel like what is essentially just
ifdef (false)
isn't worth the extra five minutes it takes to do a fresh build + test, but I can add it if you want.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mordante We should have a test that exercises how we print to a stream (based on whether it's a terminal), and that test should fail (or at least have to be conditionalized) when terminal support is disabled. Do you agree that we're missing coverage right now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some sh tests in
/data/src/llvm/libcxx/test/std/input.output/iostream.format/print.fun/
. These sh tests are marked// UNSUPPORTED: no-filesystem
@jhuber6 Are you running the test with filesystem disabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was done with a default x64 Linux build, so it should've had filesystem unless that's off by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I'm assuming since this patch adds it to the CI it'd at least be caught pretty fast if I'm incorrect.