[Lldb-commits] [PATCH] D133973: [test] Fix LLDB tests with just-built libcxx when using a target directory.
Jordan Rupprecht via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Sep 16 07:46:00 PDT 2022
rupprecht added inline comments.
================
Comment at: lldb/test/API/lit.cfg.py:176
if platform.system() != 'Windows':
- if is_configured('llvm_include_dir') and is_configured('llvm_libs_dir'):
- dotest_cmd += ['--libcxx-include-dir', os.path.join(config.llvm_include_dir, 'c++', 'v1')]
- dotest_cmd += ['--libcxx-library-dir', config.llvm_libs_dir]
+ if is_configured('libcxx_include_dir') and is_configured('libcxx_libs_dir'):
+ dotest_cmd += ['--libcxx-include-dir', config.libcxx_include_dir]
----------------
fdeazeve wrote:
> Isn't this always going to return true? (same for `is_configured (libcxx_include_target_dir)`).
>
> `is_configured` returns the empty string when the CMake variables are empty, and the empty string converts to True
Since this is a python file, it should follow the python rules where an empty string is treated as false:
```
$ python3
Python 3.10.6 (main, Aug 10 2022, 11:19:32) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> x = ''
>>> 'foo' if x else 'bar'
'bar'
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133973/new/
https://reviews.llvm.org/D133973
More information about the lldb-commits
mailing list