-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Update LLVM reference #1090
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
Update LLVM reference #1090
Conversation
|
llvm/llvm-project@0c66af9 has broken our test machinery again. |
|
Okay I'll go make a PR to fix this sometime this week. |
I'm sure it's nothing complicated: our "run specific tests" incantations still work properly, it's only invocation via ctest that complains that "You seem to be running Lit directly -- you should be running Lit through |
|
I am curious when libc++-abi would have an option to switch to your STL implementation (not Intel's one), during CMake's execution |
|
Dropping this here for added visibility https://reviews.llvm.org/D81866 At least it is intented to enable support for other vendors such as MSVC |
|
Hey folks! Next time feel free to drop me a line personally, I'll be happy to help out. So, first question to help out is: do you run the CMake configuration step prior to running the tests? If you do (which is the intended way to use the test suite), then you can put the Lit configuration file of your choice in The second question I have is what config file do you currently use? I can help you write the from-scratch config file from the one you're using today. The upside is that you'll have a lot more control over how you're running the test suite, it'll be a lot simpler and it can be checked into libcxx's repo as-is. |
|
@cbezault So I spent some more time looking at your setup and it looks like you've got quite a bit of copy-pasted code from libcxx in your tree :) Ideally, the minimal integration would be: Then, just running Note that this CMake configuration step is really necessary because Lit won't find the right config file if there's no config map generated for the test source directory you're running into. It's inconvenient and I'd rather have something like At least, the CMake configuration step doesn't configure all of LLVM, only libcxx. If that's still too much, we can probably work on adding a |
|
Oh, and the benefit is that you should not, in theory, need any Python code beyond that config file. |
|
Hi @idionne. We do not currently run any of the the LLVM CMake scripts. The only thing we take from the submodule is the As to your point concerning not needing any python besides the |
|
Looks like that’s for you, not me! :) |
Thanks!
Would it be an option to simply run @AUTO_GEN_COMMENT@
LIBCXX_ROOT = "@LIBCXX_SOURCE_DIR@"
INSTALL_ROOT = "@CMAKE_BINARY_DIR@"
COMPILER = "@CMAKE_CXX_COMPILER@"
EXEC_ROOT = "@LIBCXX_BINARY_DIR@"
import os
import pipes
import site
import sys
site.addsitedir(os.path.join(LIBCXX_ROOT, 'utils'))
import libcxx.test.features
import libcxx.test.format
import libcxx.test.newconfig
import libcxx.test.params
# Configure basic properties of the test suite
config.name = 'msvc-stl'
config.test_source_root = os.path.join(LIBCXX_ROOT, 'test')
config.test_format = libcxx.test.format.CxxStandardLibraryTest() # Use your format here instead
config.recursiveExpansionLimit = 10
config.test_exec_root = EXEC_ROOT
# Configure basic substitutions
runPy = os.path.join(LIBCXX_ROOT, 'utils', 'run.py')
config.substitutions.append(('%{cxx}', '<msvc-compiler>'))
config.substitutions.append(('%{flags}', '<your-msvc-compile-flags>'))
config.substitutions.append(('%{compile_flags}', '<your-msvc-compile-flags>'))
config.substitutions.append(('%{link_flags}', '<your-msvc-link-flags>'))
config.substitutions.append(('%{exec}', '{} {} --execdir %T -- '.format(pipes.quote(sys.executable), pipes.quote(runPy))))
# Add parameters and features to the config
libcxx.test.newconfig.configure(
libcxx.test.params.DEFAULT_PARAMETERS,
libcxx.test.features.DEFAULT_FEATURES,
config,
lit_config
) |
|
In the case of the libcxx teststuite it would probably be fine to re-run the tests as two passes under two configurations. However, for our own tests we run each individual test under a comprehensive (and sometimes different per test) set of configurations. Those configurations live in our If the setup you're proposing above could be adapted so that it can be changed for each test that would work. Right now I create a LIT test for each of the configurations we want to run each of the actual test cpp files under. If the substitutions can be modified on a per LIT test basis inside of our test format this could work. |
Hmm, although that isn't the way it's intended to work, I believe you could duplicate the |
|
The way forward I see is to have a |
Ah, right. Indeed, you can tweak the config object when creating a |
|
@ldionne Something that I noticed was pretty pervasive in |
I don't understand what you're suggesting. I think it might be simpler for me to understand if you open a simple Phabricator review for discussion -- WDYT? |
|
When I have a minute I'll make a Phabricator review with my proposed solution. |
|
For posterity: @cbezault's changes seem to have the test runner working again, I pushed a change to skip a couple of new failing tests. Once I have a clean run I'm going to bump the LLVM reference up to current again, cleanup any new failures, and publish this PR (make it non-draft). |
We correctly deprecated `atomic_init` when implementing P0883R2, but missed that the effects changed as well.
|
Fixed a bug in I had a clean local test run at one point, but now libc++ tests runs are failing again: |
I can't see such a change in P0083R2 (Splicing maps and sets), perhaps that's the wrong paper number? |
Yes it is - sorry. P0883R2 was the winning number. |
|
Thanks for getting us back in sync with LLVM! 🚀 |
Update our LLVM reference to pickup test suite changes, unskip three tests that now pass, and skip 21 tests that fail.
Also fixes a bug in
std::atomic_initfound by new tests: WG21-P0883 deprecatedatomic_initand changed its effects to be equivalent to a relaxed store. We had implemented the deprecation, but missed the effect change.Incorporates a change to our test machinery by Curtis to avoid reliance on libc++'s
lit.cfg.