aboutsummaryrefslogtreecommitdiff
path: root/mlir/lib/Bindings/Python/IRModule.cpp
diff options
context:
space:
mode:
authorGeoffrey Martin-Noble <gcmn@google.com>2021-12-09 17:17:00 -0800
committerGeoffrey Martin-Noble <gcmn@google.com>2021-12-20 11:49:42 -0800
commite8b5b7218263e7b1c0b0466cc3c71ff88748935d (patch)
tree239ce622b48611b6b343fd6d36c5c10501be93b5 /mlir/lib/Bindings/Python/IRModule.cpp
parent6a556ecaf4c3ab9082a8be67d5509d2dfc13e5d3 (diff)
downloadllvm-e8b5b7218263e7b1c0b0466cc3c71ff88748935d.zip
llvm-e8b5b7218263e7b1c0b0466cc3c71ff88748935d.tar.gz
llvm-e8b5b7218263e7b1c0b0466cc3c71ff88748935d.tar.bz2
[lit] Support relative path arguments
Currently the behavior with relative paths is pretty broken. It differs between external shell and internal shell because the path resolution is done with a different working directory. With the internal shell, it's resolved relative to the directory from which lit is executed, whereas with the external shell it's resolved relative to where the test case is executed. To make matters worse, using the internal shell the filepath to binaries looked up with `which` is returned relative to the directory from which lit is executed, but then executed from the test execution directory. That means that relative paths with the internal shell give a `[Errno 2] No such file or directory` error instead of the expected `command not found`. To address these issues this patch makes lit interpret relative paths as relative to the directory from which lit was invoked and modifies `which` to return absolute paths, matching the behavior of its namesake unix function. See https://groups.google.com/g/llvm-dev/c/KzMWlOXR98Y/m/QJoqn0U5HAAJ Reviewed By: yln Differential Revision: https://reviews.llvm.org/D115486
Diffstat (limited to 'mlir/lib/Bindings/Python/IRModule.cpp')
0 files changed, 0 insertions, 0 deletions