[PATCH] D34841: [lit/libcxx] Fix a remaining reference to lit.util.capture() in custom libcxx/Darwin code.

David L. Jones via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 5 15:12:35 PDT 2017


dlj added a comment.

In https://reviews.llvm.org/D34841#800110, @mzolotukhin wrote:

> There are still more uses of `lit.util.capture`. I fixed one of them in r307201 (it broke PGO builds), but there are still some remaining:


D'oh

/shamecube

>   ./test/lit.cfg:    llvm_src_root = lit.util.capture(['llvm-config', '--src-root']).strip()
>   ./test/lit.cfg:    llvm_obj_root = lit.util.capture(['llvm-config', '--obj-root']).strip()
>   ./test/Unit/lit.cfg:    llvm_src_root = lit.util.capture(['llvm-config', '--src-root']).strip()
>   ./test/Unit/lit.cfg:    llvm_obj_root = lit.util.capture(['llvm-config', '--obj-root']).strip()
>   ./tools/clang/test/lit.cfg:    llvm_src_root = lit.util.capture(['llvm-config', '--src-root']).strip()
>   ./tools/clang/test/lit.cfg:    llvm_obj_root = lit.util.capture(['llvm-config', '--obj-root']).strip()
>   ./tools/clang/test/Unit/lit.cfg:    llvm_src_root = lit.util.capture(['llvm-config', '--src-root']).strip()
>   ./tools/clang/test/Unit/lit.cfg:    llvm_obj_root = lit.util.capture(['llvm-config', '--obj-root']).strip()
> 
> 
> I wonder why they didn't cause any problems (or why we didn't find the problems).

So by my reading of those local config files, the calls are in the context of out-of-tree builds or other erroneous cases:

  # Otherwise, we haven't loaded the site specific configuration (the user is
  # probably trying to run on a test file directly, and either the site
  # configuration hasn't been created by the build system, or we are in an
  # out-of-tree build situation).

All of my builds are out-of-tree (and CMake generates the files correctly), so I'm guessing the cases you found are some other configuration that triggers the same branch. I'm not sure //how// that would happen, but I'm pretty confident that it can.

> Do we need to change them the same way?

I think that should work. (The Py2/Py3 differences shouldn't matter with llvm-config.) I'm not sure I will be able to test the fix, though, unless I can figure out how to repro.

Do you have any hints for how I might be able to tickle the errors you found?


https://reviews.llvm.org/D34841





More information about the llvm-commits mailing list