fdeazeve 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]
----------------
rupprecht wrote:
> 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'
> ```
Oh, my bad. I had been bitten by `if('0')` in a similar context recently, so I 
was a bit paranoid here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133973

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
  • [Lldb-commits]... Jordan Rupprecht via Phabricator via lldb-commits
    • [Lldb-com... Jonas Devlieghere via Phabricator via lldb-commits
    • [Lldb-com... Jordan Rupprecht via Phabricator via lldb-commits
    • [Lldb-com... Felipe de Azevedo Piovezan via Phabricator via lldb-commits
    • [Lldb-com... Felipe de Azevedo Piovezan via Phabricator via lldb-commits
    • [Lldb-com... Jordan Rupprecht via Phabricator via lldb-commits
    • [Lldb-com... Felipe de Azevedo Piovezan via Phabricator via lldb-commits
    • [Lldb-com... Felipe de Azevedo Piovezan via Phabricator via lldb-commits
    • [Lldb-com... Jonas Devlieghere via Phabricator via lldb-commits
    • [Lldb-com... Jordan Rupprecht via Phabricator via lldb-commits
    • [Lldb-com... Jordan Rupprecht via Phabricator via lldb-commits

Reply via email to