gfxstream: Handle tmp folder explicitly on codegen

Avoid getting different relative folders for tmp folder when the
code is generated from different checkout locations.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31400>
This commit is contained in:
Serdar Kocdemir 2024-09-26 17:49:25 +01:00 committed by Marge Bot
parent 73ac603f9d
commit 27295ca4d0

View file

@ -234,7 +234,8 @@ def banner_command(argv):
paths removed."""
def makePosixRelative(someArg):
if os.path.exists(someArg):
# Do not use relative for /tmp/ to avoid effects of checkout location
if os.path.exists(someArg) and someArg != "/tmp/":
return str(PurePosixPath(Path(os.path.relpath(someArg))))
return someArg