This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Unconditionally enable module tests when they're supported
AbandonedPublic

Authored by ldionne on Jul 19 2019, 11:09 AM.

Details

Reviewers
EricWF
Summary

I don't see the point in allowing the modules tests to be disabled when
the compiler supports them, and in enabling the modules tests when the
compiler doesn't support them (which is currently an error in lit anyway).

This commit solves the problem that if the compiler supports modules but
enable_modules=True is not passed explicitly to lit, the command-line
defines from __config_site won't be populated properly and the tests
will fail.

Event Timeline

ldionne created this revision.Jul 19 2019, 11:09 AM
EricWF added inline comments.Jul 29 2019, 2:41 PM
libcxx/utils/libcxx/test/config.py
1014

This doesn't enable the "module tests". That's done above when "modules-support" is added. This code enables using modules for *every test in the testsuite*.

Although it makes the test suite run a lot faster, I'm not sure we want to enable it by default. We at least need some buildbots that test non-modular configurations.

Is turning modules on all the time the intent of your patch?

ldionne abandoned this revision.Jul 30 2019, 4:53 AM
ldionne marked an inline comment as done.
ldionne added inline comments.
libcxx/utils/libcxx/test/config.py
1014

Is turning modules on all the time the intent of your patch?

Nope, that wasn't my intent. I see you've committed a similar fix here: https://github.com/llvm-project/libcxx/commit/20ea9e39b862b1effdf799293c5ae855203b86f4

I'm closing this.