Files
carbon-lang/toolchain/install/run_tool.py
T
Jon Ross-Perkins c7057eff89 Improve install_paths handling for relative paths. (#4331)
Because install_paths is not presently validated, and it's resolved
after the `SetWorkingDirForBazel` call, if a relative path is used with
bazel then it would fail silently. This starts making the driver share
install path errors, and starts changing how `//toolchain` launches
`carbon`.

Note the implementation is still brittle and will break with symlinks.
That's something I plan to address as part of busyboxing.
2024-09-23 22:26:53 +00:00

20 lines
470 B
Python

#!/usr/bin/env python3
"""Runs the tool specified in argv.
This script is essentially just a bounce-through to get an appropriate arg0.
See the TODO in run_tool.bzl.
"""
__copyright__ = """
Part of the Carbon Language project, under the Apache License v2.0 with LLVM
Exceptions. See /LICENSE for license information.
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
"""
import os
import sys
if __name__ == "__main__":
os.execv(sys.argv[1], sys.argv[1:])