[libcxx-commits] [PATCH] D81846: [libc++] Allow specifying custom Lit config files

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jun 16 08:16:10 PDT 2020


ldionne added a comment.

In D81846#2094828 <https://reviews.llvm.org/D81846#2094828>, @gargaroff wrote:

> Thanks for this patch. This definitely gets rid of one of the most annoying shortcomings we have at the moment, which is the need to run lit directly when we want to use a custom config.
>  So with this patch, if I want to use a custom config, I would simply copy-paste all the settings I care about from `lit.site.cfg.in`, add my own configuration logic and I'd be ready to go?


Basically. However, with the new format, you don't really need that much boilerplate. Look at e.g. `libcxx/test/configs/libcxx-trunk-shared.cfg.in` in this patch: https://reviews.llvm.org/D81866.

> I would be okay with this as this solves my exact use-case, even though in a slightly different manner. I'm not a huge fan of having to copy-paste the config I'm interested in, because then I'd be concerned that the default config might change without me noticing. Would it be possible to load the default config from a custom config or is copy-pasting the stuff we're interested in the recommended way of setting up tests in this case?

Ideally we wouldn't need to copy-paste a lot of stuff. It would help me to better understand your specific setup. How do you configure the test suite? Is there some code I can see somewhere?

> By the way, I know this isn't directly related to this patch, but is there a minimum list of required configuration parameters for the new format?

It's documented in the new test format here: https://github.com/llvm/llvm-project/blob/master/libcxx/utils/libcxx/test/newformat.py#L139. Basically, you need to provide the following Lit substitutions and you're all done:

  %{cxx}           - A command that can be used to invoke the compiler
  %{compile_flags} - Flags to use when compiling a test case
  %{link_flags}    - Flags to use when linking a test case
  %{flags}         - Flags to use either when compiling or linking a test case
  %{exec}          - A command to prefix the execution of executables




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81846/new/

https://reviews.llvm.org/D81846





More information about the libcxx-commits mailing list