[PATCH] D154130: [lit][clang] Avoid realpath on Windows due to MAX_PATH limitations

Tristan Labelle via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 28 10:20:49 PDT 2023


MrTrillian marked an inline comment as done.
MrTrillian added inline comments.


================
Comment at: llvm/utils/lit/lit/LitConfig.py:192
         f = f.f_back.f_back
-        file = os.path.abspath(inspect.getsourcefile(f))
+        file = lit.util.abs_path_preserve_drive(inspect.getsourcefile(f))
         line = inspect.getlineno(f)
----------------
benlangmuir wrote:
> Why are you changing abspath (here and elsewhere)? I understand why you are changing realpath -> lit.util.abs_path_preserve_drive, but what's the issue with bare abspath?
> Why are you changing abspath (here and elsewhere)? I understand why you are changing realpath -> lit.util.abs_path_preserve_drive, but what's the issue with bare abspath?

You're right, this is overzealous. I think it made more sense with an older iteration of this code. I removed it.


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

https://reviews.llvm.org/D154130



More information about the cfe-commits mailing list